Skip to content

fix: pyupgrade entire modified files, not only user-modified chunks #1249

fix: pyupgrade entire modified files, not only user-modified chunks

fix: pyupgrade entire modified files, not only user-modified chunks #1249

Triggered via push October 19, 2024 20:17
Status Success
Total duration 15s
Artifacts
help-in-readme
6s
help-in-readme
Fit to window
Zoom out
Zoom in

Annotations

16 errors and 2 notices
src/darker/formatters/pyupgrade_formatter.py#L84
No overload variant of "int" matches argument type "tuple[int]" [call-overload]
src/darker/formatters/pyupgrade_formatter.py#L98
Value of "target_version" has incompatible type "set[Any]"; expected "tuple[int, int]" [typeddict-item]
src/darker/formatters/pyupgrade_formatter.py#L137
Returning Any from function declared to return "str" [no-any-return]
src/darker/tests/test_files.py#L11
Consider using '{"start": 'only_pyproject/subdir', "expect": 'only_pyproject/pyproject.toml', ... }' instead of a call to 'dict'. (use-dict-literal, R1735)
src/darker/tests/test_files.py#L12
Consider using '{"start": 'only_git/subdir', "expect": None}' instead of a call to 'dict'. (use-dict-literal, R1735)
src/darker/tests/test_files.py#L13
Consider using '{"start": 'git_and_pyproject/subdir', "expect": 'git_and_pyproject/pyproject.toml', ... }' instead of a call to 'dict'. (use-dict-literal, R1735)
src/darker/formatters/pyupgrade_formatter.py#L109
Unable to import 'pyupgrade._main' (import-error, E0401)
src/darker/formatters/pyupgrade_formatter.py#L109
Import outside toplevel (pyupgrade._main.main) (import-outside-toplevel, C0415)
src/darker/formatters/pyupgrade_formatter.py#L134
Unable to import 'pyupgrade._data' (import-error, E0401)
src/darker/formatters/pyupgrade_formatter.py#L134
Import outside toplevel (pyupgrade._data.Settings) (import-outside-toplevel, C0415)
src/darker/formatters/pyupgrade_formatter.py#L135
Unable to import 'pyupgrade._main' (import-error, E0401)
src/darker/formatters/pyupgrade_formatter.py#L135
Import outside toplevel (pyupgrade._main._fix_plugins, pyupgrade._main._fix_tokens) (import-outside-toplevel, C0415)
src/darker/formatters/black_formatter.py#L97
Import outside toplevel (black.parse_pyproject_toml, black.re_compile_maybe_verbose) (import-outside-toplevel, C0415)
src/darker/formatters/black_formatter.py#L155
Import outside toplevel (black.format_str) (import-outside-toplevel, C0415)
src/darker/formatters/black_formatter.py#L179
Import outside toplevel (black.FileMode) (import-outside-toplevel, C0415)
src/darker/formatters/black_formatter.py#L180
Import outside toplevel (black.TargetVersion) (import-outside-toplevel, C0415)
Test: assert_used id: B101: ./src/darker/files.py#L100
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. more info https://bandit.readthedocs.io/en/1.7.4/plugins/b101_assert_used.html
Test: assert_used id: B101: ./src/darker/files.py#L102
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. more info https://bandit.readthedocs.io/en/1.7.4/plugins/b101_assert_used.html