Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

72 expressions improvements #117

Merged
merged 16 commits into from
Apr 23, 2024
Merged

72 expressions improvements #117

merged 16 commits into from
Apr 23, 2024

Conversation

VianneyMI
Copy link
Owner

No description provided.

@VianneyMI VianneyMI linked an issue Apr 21, 2024 that may be closed by this pull request
@@ -61,7 +61,7 @@ def test_stage(self)->None:

with pytest.raises(TypeError):
# Checking that Stage cannot be instantiated
stage = Stage(statement={}) # pylint: disable=abstract-class-instantiated
stage = Stage(expression={}) # pylint: disable=abstract-class-instantiated
Copy link
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 stage is assigned to but never used

Copy link
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

src/monggregate/operators/objects/merge_objects.py|74 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/comparison/ne.py|63 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/comparison/lte.py|62 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/comparison/lt.py|61 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/comparison/gte.py|61 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/comparison/gt.py|62 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/comparison/eq.py|66 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/comparison/cmp.py|68 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/boolean/or_.py|59 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/boolean/not_.py|58 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/boolean/and_.py|82 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/array/sort_array.py|127 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/array/size.py|58 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/array/min_n.py|73 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/array/max_n.py|74 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/array/last.py|130 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/array/is_array.py|51 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/array/in_.py|69 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/array/first.py|120 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/array/filter.py|114 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/array/array_to_object.py|96 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/accumulators/sum.py|128 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/accumulators/push.py|62 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/accumulators/min.py|119 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/accumulators/max.py|119 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/accumulators/last.py|90 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/accumulators/first.py|97 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/accumulators/count.py|75 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/accumulators/avg.py|110 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/stages/bucket_auto.py|171 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/stages/bucket.py|123 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/search/operators/autocomplete.py|176 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/strings/date_to_string.py|130 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/strings/date_from_string.py|122 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/strings/concat.py|56 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/date/millisecond.py|186 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/conditional/switch.py|104 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/conditional/if_null.py|80 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/conditional/cond.py|143 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/arithmetic/subtract.py|77 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/arithmetic/pow.py|77 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/arithmetic/multiply.py|56 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/arithmetic/divide.py|61 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/arithmetic/add.py|57 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/search/operators/compound.py|127 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/search/collectors/facet.py|279 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/search/collectors/facet.py|304 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/search/collectors/facet.py|326 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/search/collectors/facet.py|392 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/stages/search/search_meta.py|121 col 23| Item "None" of "Facet | Autocomplete | Compound | Equals | Exists | MoreLikeThis | Range | Regex | Text | Wildcard | None" has no attribute "expression" [union-attr]
src/monggregate/stages/search/search_meta.py|127 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[str, dict[Any, Any]]") [return-value]
src/monggregate/stages/search/search.py|131 col 23| Item "None" of "Facet | Autocomplete | Compound | Equals | Exists | MoreLikeThis | Range | Regex | Text | Wildcard | None" has no attribute "expression" [union-attr]
src/monggregate/stages/search/search.py|137 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[str, dict[Any, Any]]") [return-value]
src/monggregate/pipeline.py|115 col 5| Signature of "expression" incompatible with supertype "BaseModel" [override]
src/monggregate/pipeline.py|115 col 5| Superclass:
src/monggregate/pipeline.py|115 col 5| dict[Any, Any]
src/monggregate/pipeline.py|115 col 5| Subclass:
src/monggregate/pipeline.py|115 col 5| list[dict[Any, Any]]
src/monggregate/pipeline.py|118 col 17| List comprehension has incompatible type List[dict[Any, Any] | dict[str, dict[Any, Any]] | Any | None]; expected List[dict[Any, Any]] [misc]
tests/test_stages.py|64 col 21| Cannot instantiate abstract class "Stage" with abstract attribute "expression" [abstract]

def to_expression(self)->dict:
"""Converts an instance of a class inheriting from BaseModel to an expression"""

return self.express(self)
Copy link
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 🐶
Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]

@@ -49,7 +54,7 @@
def __call__(self)->dict:
"""Makes an instance of any class inheriting from this class callable"""

return self.resolve(self.statement)
return self.express(self.expression)
Copy link
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 🐶
Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]


return self.resolve(self.dict(by_alias=True))
return self.express(self.dict(by_alias=True))
Copy link
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 🐶
Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]


return self.resolve(self.dict(by_alias=True))
return self.express(self.dict(by_alias=True))
Copy link
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 🐶
Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]


return self.resolve(self.dict(by_alias=True))
return self.express(self.dict(by_alias=True))
Copy link
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 🐶
Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]

@@ -127,5 +127,5 @@ def statement(self) -> dict:
else:
params["lte"] = self.lte

return self.resolve({"range":params})
return self.express({"range":params})
Copy link
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 🐶
Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]


return self.resolve({
return self.express({
Copy link
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 🐶
Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]


return self.resolve({
return self.express({
Copy link
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 🐶
Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]


return self.resolve({
return self.express({
Copy link
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 🐶
Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]

def statement(self) -> dict:
return self.resolve({
def expression(self) -> dict:
return self.express({
Copy link
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 🐶
Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]

Copy link
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

src/monggregate/stages/bucket.py|123 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/search/operators/autocomplete.py|176 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/strings/date_to_string.py|130 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/strings/date_from_string.py|122 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/strings/concat.py|56 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/date/millisecond.py|186 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/conditional/switch.py|104 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/conditional/if_null.py|80 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/conditional/cond.py|143 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/arithmetic/subtract.py|77 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/arithmetic/pow.py|77 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/arithmetic/multiply.py|56 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/arithmetic/divide.py|61 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/operators/arithmetic/add.py|57 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/search/operators/compound.py|127 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/expressions.py|287 col 39| Unexpected keyword argument "operand" for "MaxN" [call-arg]
src/monggregate/expressions.py|287 col 39| Unexpected keyword argument "limit" for "MaxN" [call-arg]
src/monggregate/expressions.py|294 col 39| Unexpected keyword argument "operand" for "MinN" [call-arg]
src/monggregate/expressions.py|294 col 39| Unexpected keyword argument "limit" for "MinN" [call-arg]
src/monggregate/expressions.py|308 col 39| Unexpected keyword argument "operand" for "SortArray" [call-arg]
src/monggregate/expressions.py|308 col 39| Unexpected keyword argument "by" for "SortArray" [call-arg]
src/monggregate/expressions.py|442 col 39| Unexpected keyword argument "operand" for "Switch" [call-arg]
src/monggregate/expressions.py|451 col 39| Missing named argument "timezone" for "Millisecond" [call-arg]
src/monggregate/expressions.py|483 col 39| Unexpected keyword argument "operand" for "DateFromString" [call-arg]
src/monggregate/expressions.py|490 col 39| Unexpected keyword argument "operand" for "DateToString" [call-arg]
src/monggregate/search/collectors/facet.py|279 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/search/collectors/facet.py|304 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/search/collectors/facet.py|326 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/search/collectors/facet.py|392 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
src/monggregate/stages/search/search_meta.py|121 col 23| Item "None" of "Facet | Autocomplete | Compound | Equals | Exists | MoreLikeThis | Range | Regex | Text | Wildcard | None" has no attribute "expression" [union-attr]
src/monggregate/stages/search/search_meta.py|127 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[str, dict[Any, Any]]") [return-value]
src/monggregate/stages/search/search.py|131 col 23| Item "None" of "Facet | Autocomplete | Compound | Equals | Exists | MoreLikeThis | Range | Regex | Text | Wildcard | None" has no attribute "expression" [union-attr]
src/monggregate/stages/search/search.py|137 col 16| Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[str, dict[Any, Any]]") [return-value]
src/monggregate/pipeline.py|115 col 5| Signature of "expression" incompatible with supertype "BaseModel" [override]
src/monggregate/pipeline.py|115 col 5| Superclass:
src/monggregate/pipeline.py|115 col 5| dict[Any, Any]
src/monggregate/pipeline.py|115 col 5| Subclass:
src/monggregate/pipeline.py|115 col 5| list[dict[Any, Any]]
tests/test_stages.py|64 col 21| Cannot instantiate abstract class "Stage" with abstract attribute "expression" [abstract]

return self.resolve({
"$mergeObjects" : self.expression
def expression(self) -> dict:
return self.express({
Copy link
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 🐶
Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]


return self.resolve({
return self.express({
Copy link
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 🐶
Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]


return self.resolve({
return self.express({
Copy link
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 🐶
Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]


return self.resolve({
return self.express({
Copy link
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 🐶
Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]


return self.resolve({
return self.express({
Copy link
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 🐶
Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]


return self.resolve({
"$last" : self.expression
return self.express({
Copy link
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 🐶
Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]


return self.resolve({
"$first" : self.expression
return self.express({
Copy link
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 🐶
Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]


return self.resolve({
return self.express({
Copy link
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 🐶
Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]


return self.resolve({
"$avg" : self.expression
return self.express({
Copy link
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 🐶
Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]


# NOTE : maybe it would be better to use _to_unique_list here
# or to further validate by.
return self.resolve({
return self.express({
Copy link
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 🐶
Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]

@@ -2,17 +2,29 @@

# Standard Library imports
#----------------------------
from abc import ABC
from abc import ABC, abstractmethod
Copy link
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 [*] abc.abstractmethod imported but unused

@VianneyMI VianneyMI marked this pull request as ready for review April 23, 2024 20:42
@VianneyMI VianneyMI merged commit 3bb0933 into main Apr 23, 2024
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.

Expressions improvements
1 participant