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) #458
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
src/libvcs/sync/git.py:587:13: TRY300 Consider moving this statement to an `else` block
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #458 +/- ##
==========================================
+ Coverage 62.62% 62.64% +0.01%
==========================================
Files 39 39
Lines 3441 3437 -4
Branches 928 927 -1
==========================================
- Hits 2155 2153 -2
+ Misses 766 764 -2
Partials 520 520 ☔ View full report in Codecov by Sentry. |
tony
force-pushed
the
ruff-all-v0.3.4-pass
branch
2 times, most recently
from
March 24, 2024 16:59
d20a95c
to
3277218
Compare
ruff check --select ALL . --fix --unsafe-fixes --preview --show-fixes; ruff format . Fixed 207 errors: - conftest.py: 1 × PIE790 (unnecessary-placeholder) - docs/conf.py: 1 × RET505 (superfluous-else-return) - src/libvcs/__init__.py: 1 × RUF022 (unsorted-dunder-all) - src/libvcs/_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/libvcs/_internal/run.py: 1 × TID252 (relative-imports) 1 × I001 (unsorted-imports) - src/libvcs/_internal/shortcuts.py: 3 × RET505 (superfluous-else-return) 3 × ANN204 (missing-return-type-special-method) 2 × COM812 (missing-trailing-comma) 1 × PLR6201 (literal-membership) - src/libvcs/_internal/subprocess.py: 1 × ANN204 (missing-return-type-special-method) - src/libvcs/cmd/git.py: 1 × PLR5501 (collapsible-else-if) 1 × PLR2044 (empty-comment) 1 × RET505 (superfluous-else-return) - src/libvcs/cmd/svn.py: 1 × RSE102 (unnecessary-paren-on-raise-exception) 1 × ANN204 (missing-return-type-special-method) - src/libvcs/pytest_plugin.py: 12 × PT001 (pytest-fixture-incorrect-parentheses-style) 3 × PT003 (pytest-extraneous-scope-function) 1 × ANN204 (missing-return-type-special-method) 1 × E303 (too-many-blank-lines) 1 × PT025 (pytest-erroneous-use-fixtures-on-fixture) 1 × RET504 (unnecessary-assign) 1 × SIM103 (needless-bool) 1 × COM812 (missing-trailing-comma) - src/libvcs/sync/base.py: 1 × F841 (unused-variable) 1 × RET504 (unnecessary-assign) 1 × E303 (too-many-blank-lines) - src/libvcs/sync/git.py: 5 × ANN204 (missing-return-type-special-method) 1 × TID252 (relative-imports) 1 × RET505 (superfluous-else-return) 1 × I001 (unsorted-imports) 1 × PLR5501 (collapsible-else-if) 1 × E303 (too-many-blank-lines) 1 × PLR1714 (repeated-equality-comparison) 1 × RSE102 (unnecessary-paren-on-raise-exception) 1 × PIE804 (unnecessary-dict-kwargs) 1 × F841 (unused-variable) 1 × PLR6201 (literal-membership) 1 × RET504 (unnecessary-assign) - src/libvcs/sync/svn.py: 1 × FURB167 (regex-flag-alias) 1 × ANN204 (missing-return-type-special-method) 1 × PIE810 (multiple-starts-ends-with) - src/libvcs/url/base.py: 1 × ANN204 (missing-return-type-special-method) - src/libvcs/url/registry.py: 1 × ANN204 (missing-return-type-special-method) - src/libvcs/url/svn.py: 2 × PLR2044 (empty-comment) - tests/_internal/subprocess/test_SubprocessCommand.py: 9 × PT007 (pytest-parametrize-values-wrong-type) 6 × PT006 (pytest-parametrize-names-wrong-type) 1 × PLW1510 (subprocess-run-without-check) - tests/_internal/test_query_list.py: 38 × PT007 (pytest-parametrize-values-wrong-type) 1 × PT006 (pytest-parametrize-names-wrong-type) - tests/sync/test_git.py: 38 × PT007 (pytest-parametrize-values-wrong-type) 12 × PT006 (pytest-parametrize-names-wrong-type) 10 × PIE804 (unnecessary-dict-kwargs) 1 × COM812 (missing-trailing-comma) - tests/test_shortcuts.py: 1 × PT006 (pytest-parametrize-names-wrong-type) - tests/url/test_git.py: 4 × PT006 (pytest-parametrize-names-wrong-type) - tests/url/test_hg.py: 3 × PT006 (pytest-parametrize-names-wrong-type) 1 × PT014 (pytest-duplicate-parametrize-test-cases) - tests/url/test_registry.py: 1 × FURB148 (unnecessary-enumerate) - tests/url/test_svn.py: 3 × PT006 (pytest-parametrize-names-wrong-type) 1 × PT014 (pytest-duplicate-parametrize-test-cases)
tony
force-pushed
the
ruff-all-v0.3.4-pass
branch
from
March 24, 2024 17:01
3277218
to
339a93d
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.
ruff check --select ALL . --fix --unsafe-fixes --preview --show-fixes; ruff format .
Fixed 206 errors:
1 × PIE790 (unnecessary-placeholder)
1 × RET505 (superfluous-else-return)
1 × RUF022 (unsorted-dunder-all)
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)
1 × TID252 (relative-imports)
1 × I001 (unsorted-imports)
3 × RET505 (superfluous-else-return)
3 × ANN204 (missing-return-type-special-method)
2 × COM812 (missing-trailing-comma)
1 × PLR6201 (literal-membership)
1 × ANN204 (missing-return-type-special-method)
1 × PLR5501 (collapsible-else-if)
1 × PLR2044 (empty-comment)
1 × RET505 (superfluous-else-return)
1 × RSE102 (unnecessary-paren-on-raise-exception)
1 × ANN204 (missing-return-type-special-method)
12 × PT001 (pytest-fixture-incorrect-parentheses-style)
3 × PT003 (pytest-extraneous-scope-function)
1 × ANN204 (missing-return-type-special-method)
1 × E303 (too-many-blank-lines)
1 × PT025 (pytest-erroneous-use-fixtures-on-fixture)
1 × RET504 (unnecessary-assign)
1 × SIM103 (needless-bool)
1 × COM812 (missing-trailing-comma)
1 × F841 (unused-variable)
1 × RET504 (unnecessary-assign)
1 × E303 (too-many-blank-lines)
5 × ANN204 (missing-return-type-special-method)
1 × TID252 (relative-imports)
1 × RET505 (superfluous-else-return)
1 × I001 (unsorted-imports)
1 × PLR5501 (collapsible-else-if)
1 × E303 (too-many-blank-lines)
1 × PLR1714 (repeated-equality-comparison)
1 × RSE102 (unnecessary-paren-on-raise-exception)
1 × PIE804 (unnecessary-dict-kwargs)
1 × F841 (unused-variable)
1 × PLR6201 (literal-membership)
1 × RET504 (unnecessary-assign)
1 × FURB167 (regex-flag-alias)
1 × ANN204 (missing-return-type-special-method)
1 × PIE810 (multiple-starts-ends-with)
1 × ANN204 (missing-return-type-special-method)
1 × ANN204 (missing-return-type-special-method)
2 × PLR2044 (empty-comment)
9 × PT007 (pytest-parametrize-values-wrong-type)
6 × PT006 (pytest-parametrize-names-wrong-type)
1 × PLW1510 (subprocess-run-without-check)
38 × PT007 (pytest-parametrize-values-wrong-type)
1 × PT006 (pytest-parametrize-names-wrong-type)
38 × PT007 (pytest-parametrize-values-wrong-type)
12 × PT006 (pytest-parametrize-names-wrong-type)
10 × PIE804 (unnecessary-dict-kwargs)
1 × COM812 (missing-trailing-comma)
1 × PT006 (pytest-parametrize-names-wrong-type)
4 × PT006 (pytest-parametrize-names-wrong-type)
3 × PT006 (pytest-parametrize-names-wrong-type)
1 × PT014 (pytest-duplicate-parametrize-test-cases)
1 × FURB148 (unnecessary-enumerate)
3 × PT006 (pytest-parametrize-names-wrong-type)
1 × PT014 (pytest-duplicate-parametrize-test-cases)