Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move `WPSXXX` errors reported by `lint-vetting` into `per-file-ignores` When running tox -e lint-vetting a number of errors are reported by the wemake python style guide. This moves those errors into the per-file-ignore list within the flake8 configuration file. No attempt was made to review or remediate the errors as WPS is just being vetted. (S101 was also added to account for ansible#792 where needed when a per-file addition was newly added) This should make it easier for users of tox -e lint-vetting to identify errors from linters being vetted for the changes they are making without needing to parse all errors that previously existed in the code. Follow up PRs should be expected to migrate some per file ignores into the extended ignore list) The list of errors was src/ansible_navigator/action_runner.py:17:5: WPS436 Found protected module import: _curses src/ansible_navigator/action_runner.py:17:5: WPS450 Found protected object import: _CursesWindow src/ansible_navigator/actions/_actions.py:0:1: WPS201 Found module with too many imports: 13 > 12 src/ansible_navigator/actions/_actions.py:105:22: WPS323 Found `%` string formatting src/ansible_navigator/actions/_actions.py:98:1: WPS210 Found too many local variables: 6 > 5 src/ansible_navigator/actions/collections.py:335:5: WPS324 Found inconsistent `return` statement src/ansible_navigator/actions/config.py:286:5: WPS324 Found inconsistent `return` statement src/ansible_navigator/actions/exec.py:14:1: WPS450 Found protected object import: _actions src/ansible_navigator/actions/exec.py:45:5: WPS115 Found upper-case constant in a class: KEGEX src/ansible_navigator/actions/exec.py:66:5: WPS210 Found too many local variables: 6 > 5 src/ansible_navigator/actions/exec.py:83:17: WPS323 Found `%` string formatting src/ansible_navigator/actions/open_file.py:104:25: WPS220 Found too deep nesting: 24 > 20 src/ansible_navigator/actions/open_file.py:56:5: WPS324 Found inconsistent `return` statement src/ansible_navigator/actions/open_file.py:90:25: WPS220 Found too deep nesting: 24 > 20 src/ansible_navigator/actions/open_file.py:99:25: WPS220 Found too deep nesting: 24 > 20 src/ansible_navigator/actions/write_file.py:28:5: WPS324 Found inconsistent `return` statement src/ansible_navigator/app.py:86:17: WPS305 Found `f` string src/ansible_navigator/app.py:89:17: WPS305 Found `f` string src/ansible_navigator/configuration_subsystem/navigator_post_processor.py:62:5: WPS115 Found upper-case constant in a class: Z src/ansible_navigator/initialization.py:166:5: WPS414 Found incorrect unpacking target src/ansible_navigator/initialization.py:166:5: WPS414 Found incorrect unpacking target tests/integration/_action_run_test.py:144:9: WPS316 Found context manager with too many assignments tests/integration/actions/exec/base.py:0:1: WPS201 Found module with too many imports: 13 > 12 tests/integration/actions/exec/base.py:100:23: WPS305 Found `f` string tests/integration/actions/exec/base.py:111:56: WPS305 Found `f` string tests/integration/actions/exec/base.py:14:1: WPS436 Found protected module import: _common tests/integration/actions/exec/base.py:15:1: WPS436 Found protected module import: _common tests/integration/actions/exec/base.py:16:1: WPS436 Found protected module import: _interactions tests/integration/actions/exec/base.py:17:1: WPS436 Found protected module import: _interactions tests/integration/actions/exec/base.py:18:1: WPS436 Found protected module import: _tmux_session tests/integration/actions/exec/base.py:55:5: WPS210 Found too many local variables: 9 > 5 tests/integration/actions/exec/test_stdout_config_cli.py:5:1: WPS436 Found protected module import: _interactions tests/integration/actions/exec/test_stdout_config_cli.py:6:1: WPS436 Found protected module import: _interactions tests/integration/actions/exec/test_stdout_config_cli.py:71:12: WPS305 Found `f` string tests/integration/actions/exec/test_stdout_config_cli.py:7:1: WPS436 Found protected module import: _interactions tests/integration/actions/exec/test_stdout_config_cli.py:8:1: WPS436 Found protected module import: _interactions tests/integration/actions/exec/test_stdout_config_file.py:5:1: WPS436 Found protected module import: _interactions tests/integration/actions/exec/test_stdout_config_file.py:55:12: WPS305 Found `f` string tests/integration/actions/exec/test_stdout_config_file.py:6:1: WPS436 Found protected module import: _interactions tests/integration/actions/exec/test_stdout_config_file.py:7:1: WPS436 Found protected module import: _interactions tests/integration/actions/exec/test_stdout_config_file.py:8:1: WPS436 Found protected module import: _interactions tests/integration/actions/images/base.py:17:1: WPS221 Found line with high Jones Complexity: 16 > 14 tests/integration/actions/images/base.py:50:5: WPS602 Found using `@staticmethod` tests/integration/actions/replay/base.py:41:5: WPS210 Found too many local variables: 6 > 5 tests/integration/actions/stdout/base.py:41:5: WPS210 Found too many local variables: 6 > 5 tests/unit/actions/test_exec.py:27:12: WPS305 Found `f` string tests/unit/actions/test_exec.py:8:1: WPS450 Found protected object import: _generate_command tests/unit/configuration_subsystem/test_internals.py:31:5: WPS430 Found nested function: getcwd tests/unit/configuration_subsystem/test_navigator_post_processor.py:0:1: WPS226 Found string literal over-use: /bar > 3 tests/unit/configuration_subsystem/test_navigator_post_processor.py:0:1: WPS226 Found string literal over-use: /foo > 3 tests/unit/configuration_subsystem/test_navigator_post_processor.py:0:1: WPS226 Found string literal over-use: test_option > 3 tests/unit/configuration_subsystem/test_navigator_post_processor.py:13:2: WPS317 Found incorrect multi-line parameters tests/unit/configuration_subsystem/test_precedence.py:146:9: WPS221 Found line with high Jones Complexity: 15 > 14 tests/unit/configuration_subsystem/test_previous_cli.py:0:1: WPS201 Found module with too many imports: 13 > 12 tests/unit/runner/test_api.py:9:2: WPS317 Found incorrect multi-line parameters tests/unit/test_circular_imports.py:101:9: WPS305 Found `f` string tests/unit/test_circular_imports.py:44:1: WPS210 Found too many local variables: 7 > 5 tests/unit/test_circular_imports.py:67:35: WPS317 Found incorrect multi-line parameters tests/unit/test_circular_imports.py:69:24: WPS305 Found `f` string tests/unit/test_cli.py:16:2: WPS317 Found incorrect multi-line parameters tests/unit/test_utils.py:61:2: WPS317 Found incorrect multi-line parameters tests/unit/test_utils.py:88:2: WPS317 Found incorrect multi-line parameters and the output of tox -e lint-vetting after: 1 C812 missing trailing comma 1 RST304 Unknown interpreted text role "mod". 13 S101 Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. 1 S404 Consider possible security implications associated with the subprocess module. 1 S603 subprocess call - check for execution of untrusted input. 2 S604 Function call with shell=True parameter identified, possible security issue. - 2 WPS115 Found upper-case constant in a class: KEGEX - 3 WPS201 Found module with too many imports: 13 > 12 - 6 WPS210 Found too many local variables: 6 > 5 - 3 WPS220 Found too deep nesting: 24 > 20 - 2 WPS221 Found line with high Jones Complexity: 16 > 14 - 3 WPS226 Found string literal over-use: test_option > 3 - 9 WPS305 Found `f` string - 1 WPS316 Found context manager with too many assignments - 6 WPS317 Found incorrect multi-line parameters - 2 WPS323 Found `%` string formatting - 4 WPS324 Found inconsistent `return` statement - 2 WPS414 Found incorrect unpacking target - 1 WPS430 Found nested function: getcwd - 14 WPS436 Found protected module import: _curses - 3 WPS450 Found protected object import: _CursesWindow - 1 WPS602 Found using `@staticmethod` Reviewed-by: Sviatoslav Sydorenko <webknjaz+github/[email protected]> Reviewed-by: None <None>
- Loading branch information