Skip to content

128-reviva#130

Merged
VianneyMI merged 34 commits into
mainfrom
128-revival
May 27, 2025
Merged

128-reviva#130
VianneyMI merged 34 commits into
mainfrom
128-revival

Conversation

@VianneyMI
Copy link
Copy Markdown
Owner

@VianneyMI VianneyMI commented May 20, 2025

Description

  • Revamped online documentation (without publishing the changes yet)
  • Refactored tests to follow the package structure so that it is easier to know where is the test for a given function.

@VianneyMI VianneyMI linked an issue May 20, 2025 that may be closed by this pull request
6 tasks
with open('docs/index.md', 'r') as index_file:
with open("docs/index.md", "r", encoding="utf-8") as index_file:
index = index_file.readlines()
assert readme == index, f"""README.md and docs/index.md files are not in sync.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[black-format] reported by reviewdog 🐶

Suggested change
assert readme == index, f"""README.md and docs/index.md files are not in sync.
assert (
readme == index
), f"""README.md and docs/index.md files are not in sync.

Comment on lines +69 to +71
assert all(checks_constants_in_enum) and all(checks_enum_in_constants), (
error_message
)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[black-format] reported by reviewdog 🐶

Suggested change
assert all(checks_constants_in_enum) and all(checks_enum_in_constants), (
error_message
)
assert all(checks_constants_in_enum) and all(
checks_enum_in_constants
), error_message

@@ -0,0 +1,120 @@
import pytest
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Ruff] reported by reviewdog 🐶
F401 [*] pytest imported but unused

AggregationVariableEnum,
Dollar,
DollarDollar,
CLUSTER_TIME,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Ruff] reported by reviewdog 🐶
F401 [*] monggregate.dollar.CLUSTER_TIME imported but unused

Dollar,
DollarDollar,
CLUSTER_TIME,
NOW,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Ruff] reported by reviewdog 🐶
F401 [*] monggregate.dollar.NOW imported but unused

DollarDollar,
CLUSTER_TIME,
NOW,
ROOT,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Ruff] reported by reviewdog 🐶
F401 [*] monggregate.dollar.ROOT imported but unused

CLUSTER_TIME,
NOW,
ROOT,
CURRENT,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Ruff] reported by reviewdog 🐶
F401 [*] monggregate.dollar.CURRENT imported but unused


# NOTE: This should raise a ValueError
with pytest.raises(ValueError):
project = Project(include=True, exclude=True, fields=["field1", "field2"])
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Ruff] reported by reviewdog 🐶
F841 Local variable project is assigned to but never used

assert issubclass(DummyStage, Stage)

with pytest.raises(TypeError):
dummy_stage = DummyStage()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Ruff] reported by reviewdog 🐶
F841 Local variable dummy_stage is assigned to but never used

@@ -0,0 +1,33 @@
"""Tests for the UnionWith stage."""

import pytest
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Ruff] reported by reviewdog 🐶
F401 [*] pytest imported but unused

@@ -0,0 +1,26 @@
"""Tests for the Unset stage."""

import pytest
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Ruff] reported by reviewdog 🐶
F401 [*] pytest imported but unused

@@ -0,0 +1,36 @@
"""Tests for the Unwind stage."""

import pytest
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Ruff] reported by reviewdog 🐶
F401 [*] pytest imported but unused

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit

mypy

tests/tests_monggregate/test_pipeline.py|98 col 5| Use "-> None" if function does not return a value
tests/tests_monggregate/test_pipeline.py|109 col 5| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/test_pipeline.py|109 col 5| Use "-> None" if function does not return a value
tests/tests_monggregate/test_pipeline.py|118 col 5| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/test_pipeline.py|118 col 5| Use "-> None" if function does not return a value
tests/tests_monggregate/test_pipeline.py|127 col 5| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/test_pipeline.py|127 col 5| Use "-> None" if function does not return a value
tests/tests_monggregate/test_pipeline.py|139 col 5| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/test_pipeline.py|139 col 5| Use "-> None" if function does not return a value
tests/tests_monggregate/test_pipeline.py|150 col 5| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/test_pipeline.py|150 col 5| Use "-> None" if function does not return a value
tests/tests_monggregate/test_fields.py|8 col 5| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/test_fields.py|8 col 5| Use "-> None" if function does not return a value
tests/tests_monggregate/test_fields.py|19 col 5| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/test_fields.py|19 col 5| Use "-> None" if function does not return a value
tests/tests_monggregate/test_fields.py|28 col 5| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/test_fields.py|28 col 5| Use "-> None" if function does not return a value
tests/tests_monggregate/test_fields.py|37 col 5| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/test_fields.py|37 col 5| Use "-> None" if function does not return a value
tests/tests_monggregate/test_fields.py|50 col 5| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/test_fields.py|50 col 5| Use "-> None" if function does not return a value
tests/tests_monggregate/test_fields.py|61 col 5| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/test_fields.py|61 col 5| Use "-> None" if function does not return a value
tests/tests_monggregate/test_fields.py|71 col 5| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/test_fields.py|71 col 5| Use "-> None" if function does not return a value
tests/tests_monggregate/test_fields.py|84 col 5| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/test_fields.py|84 col 5| Use "-> None" if function does not return a value
tests/tests_monggregate/test_fields.py|99 col 5| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/test_fields.py|99 col 5| Use "-> None" if function does not return a value
tests/tests_monggregate/test_fields.py|110 col 5| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/test_fields.py|110 col 5| Use "-> None" if function does not return a value
tests/tests_monggregate/test_fields.py|119 col 5| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/test_fields.py|119 col 5| Use "-> None" if function does not return a value
tests/tests_monggregate/test_fields.py|128 col 5| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/test_fields.py|128 col 5| Use "-> None" if function does not return a value
tests/tests_monggregate/test_fields.py|140 col 1| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/test_fields.py|140 col 1| Use "-> None" if function does not return a value
tests/tests_monggregate/test_dollar.py|23 col 5| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/test_dollar.py|23 col 5| Use "-> None" if function does not return a value
tests/tests_monggregate/test_dollar.py|39 col 5| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/test_dollar.py|39 col 5| Use "-> None" if function does not return a value
tests/tests_monggregate/test_dollar.py|77 col 5| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/test_dollar.py|77 col 5| Use "-> None" if function does not return a value
tests/tests_monggregate/test_dollar.py|83 col 5| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/test_dollar.py|83 col 5| Use "-> None" if function does not return a value
tests/tests_monggregate/test_dollar.py|89 col 5| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/test_dollar.py|89 col 5| Use "-> None" if function does not return a value
tests/tests_monggregate/test_dollar.py|95 col 5| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/test_dollar.py|95 col 5| Use "-> None" if function does not return a value
tests/tests_monggregate/test_dollar.py|111 col 5| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/test_dollar.py|111 col 5| Use "-> None" if function does not return a value
tests/tests_monggregate/test_dollar.py|117 col 5| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/test_dollar.py|117 col 5| Use "-> None" if function does not return a value
tests/tests_monggregate/test_base.py|22 col 1| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/test_base.py|22 col 1| Use "-> None" if function does not return a value
tests/tests_monggregate/test_base.py|33 col 1| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/test_base.py|33 col 1| Use "-> None" if function does not return a value
tests/tests_monggregate/test_base.py|49 col 1| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/test_base.py|49 col 1| Use "-> None" if function does not return a value
tests/tests_monggregate/test_base.py|69 col 5| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/test_base.py|69 col 5| Use "-> None" if function does not return a value
tests/tests_monggregate/test_base.py|78 col 5| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/test_base.py|78 col 5| Use "-> None" if function does not return a value
tests/tests_monggregate/test_base.py|94 col 5| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/test_base.py|94 col 5| Use "-> None" if function does not return a value
tests/tests_monggregate/test_base.py|113 col 5| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/test_base.py|113 col 5| Use "-> None" if function does not return a value
tests/tests_monggregate/tests_search/test_commons.py|5 col 1| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/tests_search/test_commons.py|5 col 1| Use "-> None" if function does not return a value
tests/tests_monggregate/tests_search/test_commons.py|21 col 1| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/tests_search/test_commons.py|21 col 1| Use "-> None" if function does not return a value
tests/tests_monggregate/tests_search/operators/test_text.py|6 col 1| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/tests_search/operators/test_text.py|6 col 1| Use "-> None" if function does not return a value
tests/tests_monggregate/tests_operators/test_operator.py|5 col 1| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/tests_operators/test_operator.py|5 col 1| Use "-> None" if function does not return a value
tests/tests_monggregate/tests_operators/test_operator.py|12 col 9| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/tests_operators/test_operator.py|12 col 9| Use "-> None" if function does not return a value
tests/tests_monggregate/tests_operators/array/test_filter.py|5 col 1| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/tests_operators/array/test_filter.py|5 col 1| Use "-> None" if function does not return a value
tests/tests_monggregate/tests_operators/array/test_filter.py|43 col 1| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/tests_operators/array/test_filter.py|43 col 1| Use "-> None" if function does not return a value
tests/tests_monggregate/tests_operators/arithmetic/test_arithmetic.py|8 col 1| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/tests_operators/arithmetic/test_arithmetic.py|8 col 1| Use "-> None" if function does not return a value
tests/tests_monggregate/tests_operators/arithmetic/test_arithmetic.py|22 col 1| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/tests_operators/arithmetic/test_arithmetic.py|22 col 1| Use "-> None" if function does not return a value
tests/tests_monggregate/tests_operators/arithmetic/test_arithmetic.py|30 col 9| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/tests_operators/arithmetic/test_arithmetic.py|30 col 9| Use "-> None" if function does not return a value
tests/tests_monggregate/tests_operators/arithmetic/test_add.py|5 col 1| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/tests_operators/arithmetic/test_add.py|5 col 1| Use "-> None" if function does not return a value
tests/tests_monggregate/tests_operators/arithmetic/test_add.py|26 col 1| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/tests_operators/arithmetic/test_add.py|26 col 1| Use "-> None" if function does not return a value
tests/tests_monggregate/tests_operators/accumulators/test_sum.py|5 col 1| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/tests_operators/accumulators/test_sum.py|5 col 1| Use "-> None" if function does not return a value
tests/tests_monggregate/tests_operators/accumulators/test_sum.py|24 col 1| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/tests_operators/accumulators/test_sum.py|24 col 1| Use "-> None" if function does not return a value
tests/tests_monggregate/tests_operators/accumulators/test_avg.py|5 col 1| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/tests_operators/accumulators/test_avg.py|5 col 1| Use "-> None" if function does not return a value
tests/tests_monggregate/tests_operators/accumulators/test_avg.py|20 col 1| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/tests_operators/accumulators/test_avg.py|20 col 1| Use "-> None" if function does not return a value
tests/tests_monggregate/tests_operators/accumulators/test_avg.py|28 col 1| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/tests_operators/accumulators/test_avg.py|28 col 1| Use "-> None" if function does not return a value
tests/tests_monggregate/tests_operators/accumulators/test_accumulator.py|5 col 1| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/tests_operators/accumulators/test_accumulator.py|5 col 1| Use "-> None" if function does not return a value
tests/tests_monggregate/tests_operators/accumulators/test_accumulator.py|22 col 1| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/tests_operators/accumulators/test_accumulator.py|22 col 1| Use "-> None" if function does not return a value
tests/tests_monggregate/tests_operators/accumulators/test_accumulator.py|30 col 9| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/tests_operators/accumulators/test_accumulator.py|30 col 9| Use "-> None" if function does not return a value

Comment thread src/monggregate/dollar.py

def __getattr__(self, name)->str|Any:
"""Overloads the __getattr__ method.
def __getattr__(self, name) -> str | Any:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [mypy] reported by reviewdog 🐶
Function is missing a type annotation for one or more arguments [no-untyped-def]

"as":self.name
"$lookup": {
"from": self.right,
"let": self.let,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [mypy] reported by reviewdog 🐶
Dict entry 1 has incompatible type "str": "dict[Any, Any] | None"; expected "str": "str | None" [dict-item]

"$lookup": {
"from": self.right,
"let": self.let,
"pipeline": self.pipeline,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [mypy] reported by reviewdog 🐶
Dict entry 2 has incompatible type "str": "list[dict[Any, Any]] | None"; expected "str": "str | None" [dict-item]

"from": self.right,
"localField": self.right_on,
"foreignField": self.right_on,
"let": self.let,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [mypy] reported by reviewdog 🐶
Dict entry 3 has incompatible type "str": "dict[Any, Any] | None"; expected "str": "str | None" [dict-item]

"localField": self.right_on,
"foreignField": self.right_on,
"let": self.let,
"pipeline": self.pipeline,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [mypy] reported by reviewdog 🐶
Dict entry 4 has incompatible type "str": "list[dict[Any, Any]] | None"; expected "str": "str | None" [dict-item]


assert pipeline[0].expression == {"$match": {"name": "John"}}

def test__getitem__index_out_of_range(self):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [mypy] reported by reviewdog 🐶
Function is missing a return type annotation [no-untyped-def]


assert pipeline[0].expression == {"$match": {"name": "John"}}

def test__getitem__index_out_of_range(self):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [mypy] reported by reviewdog 🐶
Use "-> None" if function does not return a value

with pytest.raises(IndexError):
pipeline[2]

def test__setitem__(self):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [mypy] reported by reviewdog 🐶
Function is missing a return type annotation [no-untyped-def]

with pytest.raises(IndexError):
pipeline[2]

def test__setitem__(self):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [mypy] reported by reviewdog 🐶
Use "-> None" if function does not return a value


assert isinstance(pipeline[index], Project)

def test__setitem__index_out_of_range(self):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [mypy] reported by reviewdog 🐶
Function is missing a return type annotation [no-untyped-def]

Comment thread tests/test_structure.py
full_test_path = test_root / expected_test_file

if not full_test_path.exists():
src_full_path = src_root / src_file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Ruff] reported by reviewdog 🐶
F841 Local variable src_full_path is assigned to but never used

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit

mypy

tests/tests_monggregate/test_fields.py|110 col 5| Use "-> None" if function does not return a value
tests/tests_monggregate/test_fields.py|119 col 5| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/test_fields.py|119 col 5| Use "-> None" if function does not return a value
tests/tests_monggregate/test_fields.py|128 col 5| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/test_fields.py|128 col 5| Use "-> None" if function does not return a value
tests/tests_monggregate/test_fields.py|140 col 1| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/test_fields.py|140 col 1| Use "-> None" if function does not return a value
tests/tests_monggregate/test_dollar.py|23 col 5| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/test_dollar.py|23 col 5| Use "-> None" if function does not return a value
tests/tests_monggregate/test_dollar.py|39 col 5| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/test_dollar.py|39 col 5| Use "-> None" if function does not return a value
tests/tests_monggregate/test_dollar.py|77 col 5| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/test_dollar.py|77 col 5| Use "-> None" if function does not return a value
tests/tests_monggregate/test_dollar.py|83 col 5| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/test_dollar.py|83 col 5| Use "-> None" if function does not return a value
tests/tests_monggregate/test_dollar.py|89 col 5| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/test_dollar.py|89 col 5| Use "-> None" if function does not return a value
tests/tests_monggregate/test_dollar.py|95 col 5| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/test_dollar.py|95 col 5| Use "-> None" if function does not return a value
tests/tests_monggregate/test_dollar.py|111 col 5| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/test_dollar.py|111 col 5| Use "-> None" if function does not return a value
tests/tests_monggregate/test_dollar.py|117 col 5| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/test_dollar.py|117 col 5| Use "-> None" if function does not return a value
tests/tests_monggregate/test_base.py|22 col 1| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/test_base.py|22 col 1| Use "-> None" if function does not return a value
tests/tests_monggregate/test_base.py|33 col 1| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/test_base.py|33 col 1| Use "-> None" if function does not return a value
tests/tests_monggregate/test_base.py|49 col 1| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/test_base.py|49 col 1| Use "-> None" if function does not return a value
tests/tests_monggregate/test_base.py|69 col 5| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/test_base.py|69 col 5| Use "-> None" if function does not return a value
tests/tests_monggregate/test_base.py|78 col 5| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/test_base.py|78 col 5| Use "-> None" if function does not return a value
tests/tests_monggregate/test_base.py|94 col 5| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/test_base.py|94 col 5| Use "-> None" if function does not return a value
tests/tests_monggregate/test_base.py|113 col 5| Function is missing a return type annotation [no-untyped-def]
tests/tests_monggregate/test_base.py|113 col 5| Use "-> None" if function does not return a value


assert isinstance(pipeline[index], Project)

def test__setitem__index_out_of_range(self):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [mypy] reported by reviewdog 🐶
Use "-> None" if function does not return a value

with pytest.raises(IndexError):
pipeline[index] = Project(fields=["name", "age"], include=True)

def test__delitem__(self):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [mypy] reported by reviewdog 🐶
Function is missing a return type annotation [no-untyped-def]

with pytest.raises(IndexError):
pipeline[index] = Project(fields=["name", "age"], include=True)

def test__delitem__(self):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [mypy] reported by reviewdog 🐶
Use "-> None" if function does not return a value

del pipeline[0]
assert pipeline.export() == [{"$match": {"name": "John"}}]

def test__len__(self):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [mypy] reported by reviewdog 🐶
Function is missing a return type annotation [no-untyped-def]

del pipeline[0]
assert pipeline.export() == [{"$match": {"name": "John"}}]

def test__len__(self):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [mypy] reported by reviewdog 🐶
Use "-> None" if function does not return a value

reason="This passes but should fail. Need to be fixed in the code"
)

def test_validate_edge_case_single_dollar(self):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [mypy] reported by reviewdog 🐶
Function is missing a return type annotation [no-untyped-def]

reason="This passes but should fail. Need to be fixed in the code"
)

def test_validate_edge_case_single_dollar(self):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [mypy] reported by reviewdog 🐶
Use "-> None" if function does not return a value

class TestVariable:
"""Test the Variable class."""

def test_validate_valid_variable(self):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [mypy] reported by reviewdog 🐶
Function is missing a return type annotation [no-untyped-def]

class TestVariable:
"""Test the Variable class."""

def test_validate_valid_variable(self):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [mypy] reported by reviewdog 🐶
Use "-> None" if function does not return a value

# Assert
assert result == variable

def test_validate_invalid_variable_without_dollars(self):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [mypy] reported by reviewdog 🐶
Function is missing a return type annotation [no-untyped-def]

@VianneyMI VianneyMI removed a link to an issue May 27, 2025
6 tasks
@VianneyMI VianneyMI marked this pull request as ready for review May 27, 2025 21:26
@VianneyMI VianneyMI merged commit 4b65c90 into main May 27, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant