-
Notifications
You must be signed in to change notification settings - Fork 104
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
Linting: Aggressive ruff pass (ruff v0.3.4) #539
Merged
Merged
Conversation
This file contains 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
ruff check --select ALL . --fix --unsafe-fixes --preview --show-fixes; ruff format . Fixed 144 errors: - conftest.py: 2 × I001 (unsorted-imports) 2 × PT003 (pytest-extraneous-scope-function) 1 × PIE790 (unnecessary-placeholder) 1 × TCH005 (empty-type-checking-block) 1 × TCH004 (runtime-import-in-type-checking-block) - docs/conf.py: 1 × RET505 (superfluous-else-return) - src/libtmux/_internal/query_list.py: 3 × RSE102 (unnecessary-paren-on-raise-exception) 2 × ANN204 (missing-return-type-special-method) 1 × T201 (print) 1 × PLR5501 (collapsible-else-if) 1 × RET505 (superfluous-else-return) 1 × RET506 (superfluous-else-raise) 1 × F841 (unused-variable) - src/libtmux/_vendor/version.py: 2 × PLR6201 (literal-membership) 1 × ANN204 (missing-return-type-special-method) 1 × RET505 (superfluous-else-return) 1 × RUF022 (unsorted-dunder-all) - src/libtmux/common.py: 6 × RET506 (superfluous-else-raise) 1 × RSE102 (unnecessary-paren-on-raise-exception) 1 × TCH005 (empty-type-checking-block) 1 × I001 (unsorted-imports) - src/libtmux/exc.py: 8 × ANN204 (missing-return-type-special-method) 2 × PIE790 (unnecessary-placeholder) 2 × COM812 (missing-trailing-comma) 2 × E303 (too-many-blank-lines) - src/libtmux/neo.py: 1 × E303 (too-many-blank-lines) 1 × RET504 (unnecessary-assign) - src/libtmux/pane.py: 3 × E266 (multiple-leading-hashes-for-block-comment) 2 × COM812 (missing-trailing-comma) 1 × RSE102 (unnecessary-paren-on-raise-exception) 1 × E303 (too-many-blank-lines) 1 × PLR1711 (useless-return) - src/libtmux/pytest_plugin.py: 3 × PT003 (pytest-extraneous-scope-function) 1 × PT001 (pytest-fixture-incorrect-parentheses-style) - src/libtmux/server.py: 2 × ISC001 (single-line-implicit-string-concatenation) 2 × RSE102 (unnecessary-paren-on-raise-exception) 2 × COM812 (missing-trailing-comma) 1 × RET505 (superfluous-else-return) 1 × SIM103 (needless-bool) - src/libtmux/session.py: 5 × COM812 (missing-trailing-comma) 2 × RSE102 (unnecessary-paren-on-raise-exception) 1 × RET506 (superfluous-else-raise) 1 × RET505 (superfluous-else-return) 1 × RET503 (implicit-return) 1 × PLR1711 (useless-return) 1 × E303 (too-many-blank-lines) - src/libtmux/test.py: 1 × RET506 (superfluous-else-raise) 1 × RSE102 (unnecessary-paren-on-raise-exception) - src/libtmux/window.py: 4 × COM812 (missing-trailing-comma) 2 × E266 (multiple-leading-hashes-for-block-comment) 1 × RSE102 (unnecessary-paren-on-raise-exception) 1 × E303 (too-many-blank-lines) 1 × PLR6201 (literal-membership) 1 × PLR1711 (useless-return) - tests/_internal/test_query_list.py: 38 × PT007 (pytest-parametrize-values-wrong-type) 1 × PT006 (pytest-parametrize-names-wrong-type) - tests/legacy_api/test_session.py: 1 × PT006 (pytest-parametrize-names-wrong-type) - tests/legacy_api/test_version.py: 1 × PT014 (pytest-duplicate-parametrize-test-cases) - tests/legacy_api/test_window.py: 1 × COM812 (missing-trailing-comma) 1 × PT006 (pytest-parametrize-names-wrong-type) - tests/test_dataclasses.py: 1 × COM812 (missing-trailing-comma) 1 × PT001 (pytest-fixture-incorrect-parentheses-style) - tests/test_session.py: 2 × COM812 (missing-trailing-comma) - tests/test_version.py: 1 × PT014 (pytest-duplicate-parametrize-test-cases) - tests/test_window.py: 3 × COM812 (missing-trailing-comma) 1 × PT006 (pytest-parametrize-names-wrong-type)
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #539 +/- ##
==========================================
- Coverage 88.77% 88.71% -0.07%
==========================================
Files 37 37
Lines 3965 3960 -5
Branches 574 573 -1
==========================================
- Hits 3520 3513 -7
- Misses 304 306 +2
Partials 141 141 ☔ View full report in Codecov by Sentry. |
tony
force-pushed
the
ruff-all-v0.3.4-pass
branch
from
March 24, 2024 17:04
d89fe4a
to
dcc8cb2
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.
pytest-parametrize-names-wrong-type)
Fixed 144 errors:
2 × I001 (unsorted-imports)
2 × PT003 (pytest-extraneous-scope-function)
1 × PIE790 (unnecessary-placeholder)
1 × TCH005 (empty-type-checking-block)
1 × TCH004 (runtime-import-in-type-checking-block)
1 × RET505 (superfluous-else-return)
3 × RSE102 (unnecessary-paren-on-raise-exception)
2 × ANN204 (missing-return-type-special-method)
1 × T201 (print)
1 × PLR5501 (collapsible-else-if)
1 × RET505 (superfluous-else-return)
1 × RET506 (superfluous-else-raise)
1 × F841 (unused-variable)
2 × PLR6201 (literal-membership)
1 × ANN204 (missing-return-type-special-method)
1 × RET505 (superfluous-else-return)
1 × RUF022 (unsorted-dunder-all)
6 × RET506 (superfluous-else-raise)
1 × RSE102 (unnecessary-paren-on-raise-exception)
1 × TCH005 (empty-type-checking-block)
1 × I001 (unsorted-imports)
8 × ANN204 (missing-return-type-special-method)
2 × PIE790 (unnecessary-placeholder)
2 × COM812 (missing-trailing-comma)
2 × E303 (too-many-blank-lines)
1 × E303 (too-many-blank-lines)
1 × RET504 (unnecessary-assign)
3 × E266 (multiple-leading-hashes-for-block-comment)
2 × COM812 (missing-trailing-comma)
1 × RSE102 (unnecessary-paren-on-raise-exception)
1 × E303 (too-many-blank-lines)
1 × PLR1711 (useless-return)
3 × PT003 (pytest-extraneous-scope-function)
1 × PT001 (pytest-fixture-incorrect-parentheses-style)
2 × ISC001 (single-line-implicit-string-concatenation)
2 × RSE102 (unnecessary-paren-on-raise-exception)
2 × COM812 (missing-trailing-comma)
1 × RET505 (superfluous-else-return)
1 × SIM103 (needless-bool)
5 × COM812 (missing-trailing-comma)
2 × RSE102 (unnecessary-paren-on-raise-exception)
1 × RET506 (superfluous-else-raise)
1 × RET505 (superfluous-else-return)
1 × RET503 (implicit-return)
1 × PLR1711 (useless-return)
1 × E303 (too-many-blank-lines)
1 × RET506 (superfluous-else-raise)
1 × RSE102 (unnecessary-paren-on-raise-exception)
4 × COM812 (missing-trailing-comma)
2 × E266 (multiple-leading-hashes-for-block-comment)
1 × RSE102 (unnecessary-paren-on-raise-exception)
1 × E303 (too-many-blank-lines)
1 × PLR6201 (literal-membership)
1 × PLR1711 (useless-return)
38 × PT007 (pytest-parametrize-values-wrong-type)
1 × PT006 (pytest-parametrize-names-wrong-type)
1 × PT006 (pytest-parametrize-names-wrong-type)
1 × PT014 (pytest-duplicate-parametrize-test-cases)
1 × COM812 (missing-trailing-comma)
1 × PT006 (pytest-parametrize-names-wrong-type)
1 × COM812 (missing-trailing-comma)
1 × PT001 (pytest-fixture-incorrect-parentheses-style)
2 × COM812 (missing-trailing-comma)
1 × PT014 (pytest-duplicate-parametrize-test-cases)
3 × COM812 (missing-trailing-comma)
1 × PT006 (pytest-parametrize-names-wrong-type)