PySyft
PySyft copied to clipboard
🍼 [WIP] [Padawan contrib] Existing linters update
Description
Please include a summary of the change, the motivation, and any additional context that will help others understand your PR. If it closes one or more open issues, please tag them as described here.
Affected Dependencies
List any dependencies that are required for this change.
bandit 1.7.8 -> 1.7.9 mypy 0.10.0 -> 0.11.2 ruff 0.4.7 -> 0.6.2
E721 issues fixed in separeted PR: https://github.com/OpenMined/PySyft/pull/8992 RUF issues fided in PR: https://github.com/OpenMined/PySyft/pull/9002
How has this been tested?
- Describe the tests that you ran to verify your changes.
- Provide instructions so we can reproduce.
- List any relevant details for your test configuration.
Checklist
- [ ] I have followed the Contribution Guidelines and Code of Conduct
- [ ] I have commented my code following the OpenMined Styleguide
- [ ] I have labeled this PR with the relevant Type labels
- [ ] My changes are covered by tests
Check out this pull request on ![]()
See visual diffs & provide feedback on Jupyter Notebooks.
Powered by ReviewNB
@madhavajay @kiendang @IonesioJunior @rasswanth-s @yashgorana : Dear Jedi masters. Could a Jedi fix these new errors that mypy 0.11.0 returns?
packages/syft/src/syft/service/code/user_code_parse.py:32: error: No overload variant of "arguments" matches argument types "list[arg]", "list[Never]", "list[Never]", "list[Never]" [call-overload] packages/syft/src/syft/service/code/user_code_parse.py:32: note: Possible overload variants: packages/syft/src/syft/service/code/user_code_parse.py:32: note: def arguments(self, posonlyargs: list[arg], args: list[arg], vararg: arg | None, kwonlyargs: list[arg], kw_defaults: list[expr | None], kwarg: arg | None, defaults: list[expr]) -> arguments packages/syft/src/syft/service/code/user_code_parse.py:32: note: def arguments(self, posonlyargs: list[arg], args: list[arg], vararg: arg | None, kwonlyargs: list[arg], kw_defaults: list[expr | None], kwarg: arg | None = ..., *, defaults: list[expr]) -> arguments packages/syft/src/syft/service/code/user_code_parse.py:32: note: def arguments(self, posonlyargs: list[arg], args: list[arg], vararg: arg | None = ..., *, kwonlyargs: list[arg], kw_defaults: list[expr | None], kwarg: arg | None = ..., defaults: list[expr]) -> arguments packages/syft/src/syft/service/code/user_code_parse.py:41: error: No overload variant of "FunctionDef" matches argument types "str", "arguments", "list[AST]", "list[Never]", "int" [call-overload] packages/syft/src/syft/service/code/user_code_parse.py:41: note: Possible overload variants: packages/syft/src/syft/service/code/user_code_parse.py:41: note: def FunctionDef(self, name: str, args: arguments, body: list[stmt], decorator_list: list[expr], returns: expr | None, type_comment: str | None, type_params: list[type_param], *, lineno: int = ..., col_offset: int = ..., end_lineno: int = ..., end_col_offset: int = ...) -> FunctionDef packages/syft/src/syft/service/code/user_code_parse.py:41: note: def FunctionDef(self, name: str, args: arguments, body: list[stmt], decorator_list: list[expr], returns: expr | None = ..., type_comment: str | None = ..., *, type_params: list[type_param], lineno: int = ..., col_offset: int = ..., end_lineno: int = ..., end_col_offset: int = ...) -> FunctionDef packages/syft/src/syft/service/policy/policy.py:1033: error: Unexpected keyword argument "level" for "Import" [call-arg] packages/syft/src/syft/service/code/user_code.py:1375: error: No overload variant of "keyword" matches argument types "str", "list[Name]" [call-overload] packages/syft/src/syft/service/code/user_code.py:1375: note: Possible overload variants: packages/syft/src/syft/service/code/user_code.py:1375: note: def keyword(self, arg: str | None, value: expr, *, lineno: int = ..., col_offset: int = ..., end_lineno: int = ..., end_col_offset: int = ...) -> keyword packages/syft/src/syft/service/code/user_code.py:1375: note: def keyword(self, arg: str | None = ..., *, value: expr, lineno: int = ..., col_offset: int = ..., end_lineno: int = ..., end_col_offset: int = ...) -> keyword packages/syft/src/syft/service/code/user_code.py:1387: error: No overload variant of "FunctionDef" matches argument types "str", "Any", "list[stmt]", "list[Never]", "None", "int" [call-overload] packages/syft/src/syft/service/code/user_code.py:1387: note: Possible overload variants: packages/syft/src/syft/service/code/user_code.py:1387: note: def FunctionDef(self, name: str, args: arguments, body: list[stmt], decorator_list: list[expr], returns: expr | None, type_comment: str | None, type_params: list[type_param], *, lineno: int = ..., col_offset: int = ..., end_lineno: int = ..., end_col_offset: int = ...) -> FunctionDef packages/syft/src/syft/service/code/user_code.py:1387: note: def FunctionDef(self, name: str, args: arguments, body: list[stmt], decorator_list: list[expr], returns: expr | None = ..., type_comment: str | None = ..., *, type_params: list[type_param], lineno: int = ..., col_offset: int = ..., end_lineno: int = ..., end_col_offset: int = ...) -> FunctionDef packages/syft/src/syft/service/action/action_object.py:896: error: Statement is unreachable [unreachable] Found 6 errors in 4 files (checked 253 source files)