Skip to content
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 4 commits into from Mar 24, 2024
Merged

Conversation

tony
Copy link
Member

@tony tony commented Mar 24, 2024

ruff check --select ALL . --fix --unsafe-fixes --preview --show-fixes; ruff format .

Fixed 206 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)

src/libvcs/sync/git.py:587:13: TRY300 Consider moving this statement to an `else` block
Copy link

codecov bot commented Mar 24, 2024

Codecov Report

Attention: Patch coverage is 71.01449% with 20 lines in your changes are missing coverage. Please review.

Project coverage is 62.64%. Comparing base (9b579d6) to head (339a93d).

Files Patch % Lines
src/libvcs/_internal/query_list.py 35.71% 7 Missing and 2 partials ⚠️
src/libvcs/sync/git.py 64.28% 5 Missing ⚠️
src/libvcs/cmd/git.py 66.66% 1 Missing ⚠️
src/libvcs/cmd/svn.py 50.00% 1 Missing ⚠️
src/libvcs/pytest_plugin.py 94.44% 0 Missing and 1 partial ⚠️
src/libvcs/sync/base.py 50.00% 1 Missing ⚠️
src/libvcs/sync/svn.py 66.66% 1 Missing ⚠️
src/libvcs/url/base.py 0.00% 0 Missing and 1 partial ⚠️
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.
📢 Have feedback on the report? Share it here.

@tony tony force-pushed the ruff-all-v0.3.4-pass branch 2 times, most recently from d20a95c to 3277218 Compare March 24, 2024 16:59
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 tony merged commit 53547f5 into master Mar 24, 2024
7 checks passed
@tony tony deleted the ruff-all-v0.3.4-pass branch March 24, 2024 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant