Skip to content

test,refactor: misc fixes for linters #981

test,refactor: misc fixes for linters

test,refactor: misc fixes for linters #981

Triggered via push August 9, 2024 05:18
Status Success
Total duration 29s
Artifacts

safety.yml

on: push
Fit to window
Zoom out
Zoom in

Annotations

21 errors and 1 warning
src/darker/tests/test_main_format_edited_parts.py#L65
Too many arguments (7/5) (too-many-arguments, R0913)
src/darker/tests/test_main_format_edited_parts.py#L25
Consider using '{"black_exclude": set(), "expect": [A_PY_BLACK]}' instead of a call to 'dict'. (use-dict-literal, R1735)
src/darker/tests/test_main_format_edited_parts.py#L29
Consider using '{"black_exclude": set(), "isort_exclude": set(), "expect": [A_PY_BLACK_ISORT], ... }' instead of a call to 'dict'. (use-dict-literal, R1735)
src/darker/tests/test_main_format_edited_parts.py#L34
Consider using '{"black_exclude": set(), "flynt_exclude": set(), "expect": [A_PY_BLACK_FLYNT], ... }' instead of a call to 'dict'. (use-dict-literal, R1735)
src/darker/tests/test_main_format_edited_parts.py#L39
Consider using '{"black_exclude": set(), "isort_exclude": set(), "flynt_exclude": set(), ... }' instead of a call to 'dict'. (use-dict-literal, R1735)
src/darker/tests/test_main_format_edited_parts.py#L45
Consider using '{"black_config": {'skip_string_normalization': True}, "black_exclude": set(), ... }' instead of a call to 'dict'. (use-dict-literal, R1735)
src/darker/tests/test_main_format_edited_parts.py#L50
Consider using '{"black_exclude": {Path('a.py')}, "expect": []}' instead of a call to 'dict'. (use-dict-literal, R1735)
src/darker/tests/test_main_format_edited_parts.py#L54
Consider using '{"black_exclude": {Path('a.py')}, "isort_exclude": set(), "expect": [A_PY_ISORT], ... }' instead of a call to 'dict'. (use-dict-literal, R1735)
src/darker/tests/test_main_format_edited_parts.py#L111
Consider using '{"rev1": 'HEAD', "rev2": ':STDIN:', "expect": [('a.py', ("print('a.py HEAD' )", '#', "print( 'a.py STDIN')"), ("print('a.py HEAD' )", '#', 'print("a.py STDIN")'))], ... }' instead of a call to 'dict'. (use-dict-literal, R1735)
src/darker/tests/test_main_format_edited_parts.py#L122
Consider using '{"rev1": ':WORKTREE:', "rev2": ':STDIN:', "expect": [('a.py', ("print('a.py :WORKTREE:' )", '#', "print( 'a.py STDIN')"), ("print('a.py :WORKTREE:' )", '#', 'print("a.py STDIN")'))], ... }' instead of a call to 'dict'. (use-dict-literal, R1735)
src/darker/tests/test_main_format_edited_parts.py#L133
Consider using '{"rev1": 'HEAD', "rev2": ':WORKTREE:', "expect": [('a.py', ("print('a.py :WORKTREE:' )", '#', "print( 'a.py HEAD')"), ('print("a.py :WORKTREE:")', '#', "print( 'a.py HEAD')"))], ... }' instead of a call to 'dict'. (use-dict-literal, R1735)
src/darker/tests/test_main_format_edited_parts.py#L206
"result == []" can be simplified to "not result", if it is strictly a sequence, as an empty list is falsey (use-implicit-booleaness-not-comparison, C1803)
src/darker/tests/test_main_format_edited_parts.py#L274
"list(...) == []" can be simplified to "not list(...)", if it is strictly a sequence, as an empty list is falsey (use-implicit-booleaness-not-comparison, C1803)
src/darker/tests/test_main_format_edited_parts.py#L278
Consider using '{"rev1": 'HEAD^', "rev2": 'HEAD', "expect": []}' instead of a call to 'dict'. (use-dict-literal, R1735)
src/darker/tests/test_main_format_edited_parts.py#L279
Consider using '{"rev1": 'HEAD^', "rev2": WORKTREE, "expect": [(':WORKTREE:', 'reformatted')], ... }' instead of a call to 'dict'. (use-dict-literal, R1735)
src/darker/tests/test_main_format_edited_parts.py#L280
Consider using '{"rev1": 'HEAD', "rev2": WORKTREE, "expect": [(':WORKTREE:', 'reformatted')], ... }' instead of a call to 'dict'. (use-dict-literal, R1735)
src/darker/tests/test_main_isort.py#L18
Unused argument 'git_repo' (unused-argument, W0613)
src/darker/tests/test_main_isort.py#L61
Redefining name 'run_isort' from outer scope (line 35) (redefined-outer-name, W0621)
src/darker/tests/test_main_isort.py#L71
Redefining name 'run_isort' from outer scope (line 35) (redefined-outer-name, W0621)
src/darker/tests/test_main_isort.py#L67
Consider using '{"run_isort": (), "isort_args": {}}' instead of a call to 'dict'. (use-dict-literal, R1735)
src/darker/tests/test_main_isort.py#L68
Consider using '{"run_isort": ('--line-length', '120'), "isort_args": {'line_length': 120}, ... }' instead of a call to 'dict'. (use-dict-literal, R1735)
safety
The `python-version` input is not set. The version of Python currently in `PATH` will be used.