Skip to content

79 add linting and formatting to ci #111

79 add linting and formatting to ci

79 add linting and formatting to ci #111

Triggered via pull request December 9, 2023 13:46
Status Success
Total duration 51s
Artifacts

python-app.yml

on: pull_request
build
33s
build
lint-and-format-backend
43s
lint-and-format-backend
Fit to window
Zoom out
Zoom in

Annotations

10 errors and 20 warnings
lint-and-format-backend: monggregate/utils.py#L79
[mypy] reported by reviewdog 🐶 List comprehension has incompatible type List[str | None]; expected List[str] [misc] Raw Output: /home/runner/work/monggregate/monggregate/monggregate/utils.py:79:18: error: List comprehension has incompatible type List[str | None]; expected List[str] [misc]
lint-and-format-backend: monggregate/utils.py#L81
[mypy] reported by reviewdog 🐶 List comprehension has incompatible type List[str | None]; expected List[str] [misc] Raw Output: /home/runner/work/monggregate/monggregate/monggregate/utils.py:81:18: error: List comprehension has incompatible type List[str | None]; expected List[str] [misc]
lint-and-format-backend: monggregate/base.py#L19
[mypy] reported by reviewdog 🐶 Name "pyd" already defined (by an import) [no-redef] Raw Output: /home/runner/work/monggregate/monggregate/monggregate/base.py:19:5: error: Name "pyd" already defined (by an import) [no-redef]
lint-and-format-backend: monggregate/base.py#L53
[mypy] reported by reviewdog 🐶 Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value] Raw Output: /home/runner/work/monggregate/monggregate/monggregate/base.py:53:16: error: Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
lint-and-format-backend: monggregate/search/commons/fuzzy.py#L15
[mypy] reported by reviewdog 🐶 Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value] Raw Output: /home/runner/work/monggregate/monggregate/monggregate/search/commons/fuzzy.py:15:16: error: Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
lint-and-format-backend: monggregate/search/commons/count.py#L46
[mypy] reported by reviewdog 🐶 Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value] Raw Output: /home/runner/work/monggregate/monggregate/monggregate/search/commons/count.py:46:16: error: Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
lint-and-format-backend: monggregate/search/commons/count.py#L57
[mypy] reported by reviewdog 🐶 Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value] Raw Output: /home/runner/work/monggregate/monggregate/monggregate/search/commons/count.py:57:16: error: Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
lint-and-format-backend: monggregate/operators/type_/type_.py#L107
[mypy] reported by reviewdog 🐶 Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value] Raw Output: /home/runner/work/monggregate/monggregate/monggregate/operators/type_/type_.py:107:16: error: Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[Any, Any]") [return-value]
lint-and-format-backend: monggregate/stages/unwind.py#L114
[mypy] reported by reviewdog 🐶 Incompatible types in assignment (expression has type "Literal[True]", target has type "str") [assignment] Raw Output: /home/runner/work/monggregate/monggregate/monggregate/stages/unwind.py:114:52: error: Incompatible types in assignment (expression has type "Literal[True]", target has type "str") [assignment]
lint-and-format-backend: monggregate/stages/unwind.py#L116
[mypy] reported by reviewdog 🐶 Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[str, dict[Any, Any]]") [return-value] Raw Output: /home/runner/work/monggregate/monggregate/monggregate/stages/unwind.py:116:17: error: Incompatible return value type (got "dict[Any, Any] | list[dict[Any, Any]]", expected "dict[str, dict[Any, Any]]") [return-value]
lint-and-format-backend: monggregate/expressions.py#L350
[mypy] reported by reviewdog 🐶 This violates the Liskov substitution principle Raw Output: /home/runner/work/monggregate/monggregate/monggregate/expressions.py:350:22: note: This violates the Liskov substitution principle
lint-and-format-backend: monggregate/expressions.py#L350
[mypy] reported by reviewdog 🐶 See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides Raw Output: /home/runner/work/monggregate/monggregate/monggregate/expressions.py:350:22: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
lint-and-format-backend: monggregate/expressions.py#L350
[mypy] reported by reviewdog 🐶 It is recommended for "__eq__" to work with arbitrary objects, for example: Raw Output: /home/runner/work/monggregate/monggregate/monggregate/expressions.py:350:22: note: It is recommended for "__eq__" to work with arbitrary objects, for example:
lint-and-format-backend: monggregate/expressions.py#L350
[mypy] reported by reviewdog 🐶 def __eq__(self, other: object) -> bool: Raw Output: /home/runner/work/monggregate/monggregate/monggregate/expressions.py:350:22: note: def __eq__(self, other: object) -> bool:
lint-and-format-backend: monggregate/expressions.py#L350
[mypy] reported by reviewdog 🐶 if not isinstance(other, Expression): Raw Output: /home/runner/work/monggregate/monggregate/monggregate/expressions.py:350:22: note: if not isinstance(other, Expression):
lint-and-format-backend: monggregate/expressions.py#L350
[mypy] reported by reviewdog 🐶 return NotImplemented Raw Output: /home/runner/work/monggregate/monggregate/monggregate/expressions.py:350:22: note: return NotImplemented
lint-and-format-backend: monggregate/expressions.py#L350
[mypy] reported by reviewdog 🐶 return <logic to compare two Expression instances> Raw Output: /home/runner/work/monggregate/monggregate/monggregate/expressions.py:350:22: note: return <logic to compare two Expression instances>
lint-and-format-backend: monggregate/expressions.py#L405
[mypy] reported by reviewdog 🐶 This violates the Liskov substitution principle Raw Output: /home/runner/work/monggregate/monggregate/monggregate/expressions.py:405:22: note: This violates the Liskov substitution principle
lint-and-format-backend: monggregate/expressions.py#L405
[mypy] reported by reviewdog 🐶 See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides Raw Output: /home/runner/work/monggregate/monggregate/monggregate/expressions.py:405:22: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
lint-and-format-backend: monggregate/search/operators/compound.py#L155
[mypy] reported by reviewdog 🐶 "autocomplete" of "Compound" defined here Raw Output: /home/runner/work/monggregate/monggregate/monggregate/search/operators/compound.py:155:5: note: "autocomplete" of "Compound" defined here
lint-and-format-backend: monggregate/__init__.py#L3
[Ruff] reported by reviewdog 🐶 F401 [*] `monggregate.expressions.Expression` imported but unused Raw Output: monggregate/__init__.py:3:37: F401 [*] `monggregate.expressions.Expression` imported but unused
lint-and-format-backend: monggregate/__init__.py#L4
[Ruff] reported by reviewdog 🐶 F401 [*] `monggregate.dollar.S` imported but unused Raw Output: monggregate/__init__.py:4:32: F401 [*] `monggregate.dollar.S` imported but unused
lint-and-format-backend: monggregate/__init__.py#L4
[Ruff] reported by reviewdog 🐶 F401 [*] `monggregate.dollar.SS` imported but unused Raw Output: monggregate/__init__.py:4:35: F401 [*] `monggregate.dollar.SS` imported but unused
lint-and-format-backend: monggregate/__init__.py#L5
[Ruff] reported by reviewdog 🐶 F401 [*] `monggregate.pipeline.Pipeline` imported but unused Raw Output: monggregate/__init__.py:5:34: F401 [*] `monggregate.pipeline.Pipeline` imported but unused
lint-and-format-backend: monggregate/_run.py#L4
[Ruff] reported by reviewdog 🐶 F401 `pymongo.command_cursor.CommandCursor` imported but unused; consider using `importlib.util.find_spec` to test for availability Raw Output: monggregate/_run.py:4:40: F401 `pymongo.command_cursor.CommandCursor` imported but unused; consider using `importlib.util.find_spec` to test for availability
lint-and-format-backend: monggregate/expressions.py#L10
[Ruff] reported by reviewdog 🐶 F401 [*] `monggregate.base.pyd` imported but unused Raw Output: monggregate/expressions.py:10:41: F401 [*] `monggregate.base.pyd` imported but unused
lint-and-format-backend: monggregate/expressions.py#L67
[Ruff] reported by reviewdog 🐶 F821 Undefined name `variable` Raw Output: monggregate/expressions.py:67:19: F821 Undefined name `variable`
lint-and-format-backend: monggregate/expressions.py#L68
[Ruff] reported by reviewdog 🐶 F841 Local variable `variable` is assigned to but never used Raw Output: monggregate/expressions.py:68:13: F841 Local variable `variable` is assigned to but never used
lint-and-format-backend: monggregate/expressions.py#L68
[Ruff] reported by reviewdog 🐶 F821 Undefined name `variable` Raw Output: monggregate/expressions.py:68:30: F821 Undefined name `variable`
lint-and-format-backend: monggregate/operators/__init__.py#L4
[Ruff] reported by reviewdog 🐶 F401 [*] `monggregate.operators.operator.Operator` imported but unused Raw Output: monggregate/operators/__init__.py:4:44: F401 [*] `monggregate.operators.operator.Operator` imported but unused