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) #539

Merged
merged 3 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 .

pytest-parametrize-names-wrong-type)

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)

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)
Copy link

codecov bot commented Mar 24, 2024

Codecov Report

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

Project coverage is 88.71%. Comparing base (3eb0599) to head (dcc8cb2).

Files Patch % Lines
src/libtmux/_internal/query_list.py 50.00% 6 Missing and 1 partial ⚠️
src/libtmux/session.py 0.00% 5 Missing ⚠️
src/libtmux/common.py 57.14% 2 Missing and 1 partial ⚠️
src/libtmux/_vendor/version.py 60.00% 0 Missing and 2 partials ⚠️
src/libtmux/server.py 33.33% 2 Missing ⚠️
src/libtmux/window.py 0.00% 1 Missing and 1 partial ⚠️
src/libtmux/pane.py 0.00% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

@tony tony merged commit 1705f9f into master Mar 24, 2024
25 checks passed
@tony tony deleted the ruff-all-v0.3.4-pass branch March 24, 2024 17:11
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.

1 participant