-
Notifications
You must be signed in to change notification settings - Fork 232
Linting: Aggressive ruff pass (ruff v0.3.4) #922
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #922 +/- ##
==========================================
- Coverage 70.39% 70.28% -0.12%
==========================================
Files 26 26
Lines 1956 1955 -1
Branches 409 409
==========================================
- Hits 1377 1374 -3
- Misses 453 454 +1
- Partials 126 127 +1 ☔ View full report in Codecov by Sentry. |
c92661b
to
fb5a58e
Compare
src/tmuxp/util.py:54:9: TRY300 Consider moving this statement to an `else` block
ruff check --select ALL . --fix --unsafe-fixes --preview --show-fixes --ignore T201 --ignore PT014; ruff format . Fixed 184 errors: - conftest.py: 3 × PT003 (pytest-extraneous-scope-function) 2 × PT001 (pytest-fixture-incorrect-parentheses-style) - docs/_ext/aafig.py: 4 × G010 (logging-warn) 2 × PLW1514 (unspecified-encoding) 2 × RSE102 (unnecessary-paren-on-raise-exception) 1 × PLR1714 (repeated-equality-comparison) 1 × I001 (unsorted-imports) 1 × F841 (unused-variable) 1 × PLR6201 (literal-membership) - docs/conf.py: 1 × RET505 (superfluous-else-return) - src/tmuxp/_internal/config_reader.py: 4 × RET505 (superfluous-else-return) 1 × PLR6201 (literal-membership) - src/tmuxp/cli/__init__.py: 3 × TID252 (relative-imports) 2 × RET505 (superfluous-else-return) 1 × I001 (unsorted-imports) - src/tmuxp/cli/convert.py: 1 × TID252 (relative-imports) 1 × PLW1514 (unspecified-encoding) 1 × I001 (unsorted-imports) 1 × PLR6201 (literal-membership) - src/tmuxp/cli/debug_info.py: 1 × TID252 (relative-imports) 1 × I001 (unsorted-imports) - src/tmuxp/cli/freeze.py: 3 × TID252 (relative-imports) 1 × PLW1514 (unspecified-encoding) 1 × RSE102 (unnecessary-paren-on-raise-exception) 1 × I001 (unsorted-imports) - src/tmuxp/cli/import_config.py: 1 × TID252 (relative-imports) 1 × PLW1514 (unspecified-encoding) 1 × I001 (unsorted-imports) - src/tmuxp/cli/load.py: 8 × TID252 (relative-imports) 1 × RET505 (superfluous-else-return) 1 × FURB113 (repeated-append) 1 × I001 (unsorted-imports) - src/tmuxp/cli/shell.py: 4 × TID252 (relative-imports) 1 × PLR5501 (collapsible-else-if) - src/tmuxp/cli/utils.py: 3 × RUF021 (parenthesize-chained-operators) 1 × TID252 (relative-imports) 1 × RET505 (superfluous-else-return) - src/tmuxp/log.py: 1 × E303 (too-many-blank-lines) 1 × RET504 (unnecessary-assign) - src/tmuxp/plugin.py: 1 × SIM103 (needless-bool) 1 × E713 (not-in-test) - src/tmuxp/shell.py: 3 × RET505 (superfluous-else-return) - src/tmuxp/types.py: 1 × TCH003 (typing-only-standard-library-import) 1 × I001 (unsorted-imports) - src/tmuxp/util.py: 3 × RET506 (superfluous-else-raise) 3 × RSE102 (unnecessary-paren-on-raise-exception) - src/tmuxp/workspace/builder.py: 4 × RET505 (superfluous-else-return) 3 × TID252 (relative-imports) 3 × RSE102 (unnecessary-paren-on-raise-exception) 1 × RET506 (superfluous-else-raise) - src/tmuxp/workspace/finders.py: 2 × E303 (too-many-blank-lines) 2 × RET504 (unnecessary-assign) - src/tmuxp/workspace/freezer.py: 1 × PLR5501 (collapsible-else-if) - src/tmuxp/workspace/importers.py: 1 × TD006 (invalid-todo-capitalization) 1 × RET507 (superfluous-else-continue) - src/tmuxp/workspace/loader.py: 1 × PLR5501 (collapsible-else-if) - src/tmuxp/workspace/validation.py: 3 × RSE102 (unnecessary-paren-on-raise-exception) 1 × PIE790 (unnecessary-placeholder) 1 × TID252 (relative-imports) 1 × E303 (too-many-blank-lines) - tests/cli/test_cli.py: 2 × I001 (unsorted-imports) 1 × TCH002 (typing-only-third-party-import) 1 × TID252 (relative-imports) - tests/cli/test_convert.py: 1 × PLR6201 (literal-membership) - tests/cli/test_freeze.py: 2 × PT006 (pytest-parametrize-names-wrong-type) 1 × TCH002 (typing-only-third-party-import) - tests/cli/test_import.py: 2 × PT006 (pytest-parametrize-names-wrong-type) 1 × TID252 (relative-imports) 1 × I001 (unsorted-imports) - tests/cli/test_load.py: 2 × TID252 (relative-imports) 2 × PT006 (pytest-parametrize-names-wrong-type) 1 × I001 (unsorted-imports) - tests/cli/test_shell.py: 2 × PT006 (pytest-parametrize-names-wrong-type) 1 × TCH002 (typing-only-third-party-import) - tests/fixtures/import_teamocil/layouts.py: 1 × TID252 (relative-imports) - tests/fixtures/import_teamocil/test1.py: 1 × TID252 (relative-imports) - tests/fixtures/import_teamocil/test2.py: 1 × TID252 (relative-imports) - tests/fixtures/import_teamocil/test3.py: 1 × TID252 (relative-imports) 1 × ISC001 (single-line-implicit-string-concatenation) - tests/fixtures/import_teamocil/test4.py: 1 × TID252 (relative-imports) - tests/fixtures/import_tmuxinator/test1.py: 1 × TID252 (relative-imports) - tests/fixtures/import_tmuxinator/test2.py: 1 × TID252 (relative-imports) 1 × ISC001 (single-line-implicit-string-concatenation) - tests/fixtures/import_tmuxinator/test3.py: 1 × TID252 (relative-imports) 1 × ISC001 (single-line-implicit-string-concatenation) - tests/fixtures/utils.py: 1 × TID252 (relative-imports) - tests/fixtures/workspace/expand2.py: 1 × TID252 (relative-imports) - tests/fixtures/workspace/shell_command_before_session.py: 1 × TID252 (relative-imports) - tests/test_plugin.py: 1 × PIE790 (unnecessary-placeholder) - tests/test_util.py: 1 × F841 (unused-variable) - tests/workspace/conftest.py: 2 × TID252 (relative-imports) 1 × PT001 (pytest-fixture-incorrect-parentheses-style) - tests/workspace/test_builder.py: 13 × PT007 (pytest-parametrize-values-wrong-type) 3 × TID252 (relative-imports) 2 × PT006 (pytest-parametrize-names-wrong-type) 1 × RET505 (superfluous-else-return) 1 × I001 (unsorted-imports) 1 × PIE808 (unnecessary-range-start) 1 × PLR1714 (repeated-equality-comparison) 1 × PLR6201 (literal-membership) - tests/workspace/test_config.py: 2 × TID252 (relative-imports) 1 × I001 (unsorted-imports) - tests/workspace/test_finder.py: 3 × PT001 (pytest-fixture-incorrect-parentheses-style) 1 × PT006 (pytest-parametrize-names-wrong-type) - tests/workspace/test_freezer.py: 2 × TID252 (relative-imports) 1 × I001 (unsorted-imports) - tests/workspace/test_import_teamocil.py: 2 × PT006 (pytest-parametrize-names-wrong-type) 1 × I001 (unsorted-imports) 1 × TID252 (relative-imports) - tests/workspace/test_import_tmuxinator.py: 1 × I001 (unsorted-imports) 1 × TID252 (relative-imports) 1 × PT006 (pytest-parametrize-names-wrong-type)
622c00e
to
53f41e2
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
--select ALL
--preview
--unsafe-fixes
Command
Automated fixes
Fixed 184 errors:
3 × PT003 (pytest-extraneous-scope-function)
2 × PT001 (pytest-fixture-incorrect-parentheses-style)
4 × G010 (logging-warn)
2 × PLW1514 (unspecified-encoding)
2 × RSE102 (unnecessary-paren-on-raise-exception)
1 × PLR1714 (repeated-equality-comparison)
1 × I001 (unsorted-imports)
1 × F841 (unused-variable)
1 × PLR6201 (literal-membership)
1 × RET505 (superfluous-else-return)
4 × RET505 (superfluous-else-return)
1 × PLR6201 (literal-membership)
3 × TID252 (relative-imports)
2 × RET505 (superfluous-else-return)
1 × I001 (unsorted-imports)
1 × TID252 (relative-imports)
1 × PLW1514 (unspecified-encoding)
1 × I001 (unsorted-imports)
1 × PLR6201 (literal-membership)
1 × TID252 (relative-imports)
1 × I001 (unsorted-imports)
3 × TID252 (relative-imports)
1 × PLW1514 (unspecified-encoding)
1 × RSE102 (unnecessary-paren-on-raise-exception)
1 × I001 (unsorted-imports)
1 × TID252 (relative-imports)
1 × PLW1514 (unspecified-encoding)
1 × I001 (unsorted-imports)
8 × TID252 (relative-imports)
1 × RET505 (superfluous-else-return)
1 × FURB113 (repeated-append)
1 × I001 (unsorted-imports)
4 × TID252 (relative-imports)
1 × PLR5501 (collapsible-else-if)
3 × RUF021 (parenthesize-chained-operators)
1 × TID252 (relative-imports)
1 × RET505 (superfluous-else-return)
1 × E303 (too-many-blank-lines)
1 × RET504 (unnecessary-assign)
1 × SIM103 (needless-bool)
1 × E713 (not-in-test)
3 × RET505 (superfluous-else-return)
1 × TCH003 (typing-only-standard-library-import)
1 × I001 (unsorted-imports)
3 × RET506 (superfluous-else-raise)
3 × RSE102 (unnecessary-paren-on-raise-exception)
4 × RET505 (superfluous-else-return)
3 × TID252 (relative-imports)
3 × RSE102 (unnecessary-paren-on-raise-exception)
1 × RET506 (superfluous-else-raise)
2 × E303 (too-many-blank-lines)
2 × RET504 (unnecessary-assign)
1 × PLR5501 (collapsible-else-if)
1 × TD006 (invalid-todo-capitalization)
1 × RET507 (superfluous-else-continue)
1 × PLR5501 (collapsible-else-if)
3 × RSE102 (unnecessary-paren-on-raise-exception)
1 × PIE790 (unnecessary-placeholder)
1 × TID252 (relative-imports)
1 × E303 (too-many-blank-lines)
2 × I001 (unsorted-imports)
1 × TCH002 (typing-only-third-party-import)
1 × TID252 (relative-imports)
1 × PLR6201 (literal-membership)
2 × PT006 (pytest-parametrize-names-wrong-type)
1 × TCH002 (typing-only-third-party-import)
2 × PT006 (pytest-parametrize-names-wrong-type)
1 × TID252 (relative-imports)
1 × I001 (unsorted-imports)
2 × TID252 (relative-imports)
2 × PT006 (pytest-parametrize-names-wrong-type)
1 × I001 (unsorted-imports)
2 × PT006 (pytest-parametrize-names-wrong-type)
1 × TCH002 (typing-only-third-party-import)
1 × TID252 (relative-imports)
1 × TID252 (relative-imports)
1 × TID252 (relative-imports)
1 × TID252 (relative-imports)
1 × ISC001 (single-line-implicit-string-concatenation)
1 × TID252 (relative-imports)
1 × TID252 (relative-imports)
1 × TID252 (relative-imports)
1 × ISC001 (single-line-implicit-string-concatenation)
1 × TID252 (relative-imports)
1 × ISC001 (single-line-implicit-string-concatenation)
1 × TID252 (relative-imports)
1 × TID252 (relative-imports)
1 × TID252 (relative-imports)
1 × PIE790 (unnecessary-placeholder)
1 × F841 (unused-variable)
2 × TID252 (relative-imports)
1 × PT001 (pytest-fixture-incorrect-parentheses-style)
13 × PT007 (pytest-parametrize-values-wrong-type)
3 × TID252 (relative-imports)
2 × PT006 (pytest-parametrize-names-wrong-type)
1 × RET505 (superfluous-else-return)
1 × I001 (unsorted-imports)
1 × PIE808 (unnecessary-range-start)
1 × PLR1714 (repeated-equality-comparison)
1 × PLR6201 (literal-membership)
2 × TID252 (relative-imports)
1 × I001 (unsorted-imports)
3 × PT001 (pytest-fixture-incorrect-parentheses-style)
1 × PT006 (pytest-parametrize-names-wrong-type)
2 × TID252 (relative-imports)
1 × I001 (unsorted-imports)
2 × PT006 (pytest-parametrize-names-wrong-type)
1 × I001 (unsorted-imports)
1 × TID252 (relative-imports)
1 × I001 (unsorted-imports)
1 × TID252 (relative-imports)
1 × PT006 (pytest-parametrize-names-wrong-type)