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

Python 3.9 Modernization #550

Merged
merged 4 commits into from
Dec 21, 2024
Merged

Python 3.9 Modernization #550

merged 4 commits into from
Dec 21, 2024

Conversation

tony
Copy link
Member

@tony tony commented Dec 18, 2024

In re: #548

With 1.48.0 being the last Python 3.9 release, let's modernize the syntax.

See also

Copy link

codecov bot commented Dec 18, 2024

Codecov Report

Attention: Patch coverage is 92.12598% with 10 lines in your changes missing coverage. Please review.

Project coverage is 88.75%. Comparing base (3a38e15) to head (b20e79a).
Report is 5 commits behind head on master.

Files with missing lines Patch % Lines
src/libtmux/session.py 66.66% 4 Missing and 3 partials ⚠️
src/libtmux/test.py 0.00% 2 Missing ⚠️
src/libtmux/server.py 94.11% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #550      +/-   ##
==========================================
- Coverage   88.76%   88.75%   -0.02%     
==========================================
  Files          36       36              
  Lines        3924     3920       -4     
  Branches      359      359              
==========================================
- Hits         3483     3479       -4     
  Misses        305      305              
  Partials      136      136              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tony tony force-pushed the python-3.9-futurize branch from 700dc2e to 99cf9d0 Compare December 21, 2024 00:20
tony added 3 commits December 20, 2024 18:59
ruff check . --select ALL --fix --unsafe-fixes --preview --show-fixes --ignore T201 --ignore PT014 --ignore RUF100; ruff format .;

Fixed 186 errors:
- conftest.py:
     1 × UP006 (non-pep585-annotation)
- docs/conf.py:
     6 × UP006 (non-pep585-annotation)
- src/libtmux/_internal/query_list.py:
    31 × UP006 (non-pep585-annotation)
     1 × RUF052 (used-dummy-variable)
- src/libtmux/_vendor/version.py:
    16 × UP006 (non-pep585-annotation)
     8 × RUF052 (used-dummy-variable)
     1 × F401 (unused-import)
- src/libtmux/common.py:
     9 × UP006 (non-pep585-annotation)
     1 × F401 (unused-import)
- src/libtmux/constants.py:
     4 × UP006 (non-pep585-annotation)
     1 × F401 (unused-import)
- src/libtmux/neo.py:
     3 × UP006 (non-pep585-annotation)
- src/libtmux/pane.py:
     8 × UP006 (non-pep585-annotation)
- src/libtmux/pytest_plugin.py:
     2 × UP006 (non-pep585-annotation)
- src/libtmux/server.py:
    19 × UP006 (non-pep585-annotation)
- src/libtmux/session.py:
    19 × UP006 (non-pep585-annotation)
     5 × RUF052 (used-dummy-variable)
- src/libtmux/test.py:
     3 × UP006 (non-pep585-annotation)
- src/libtmux/window.py:
    14 × UP006 (non-pep585-annotation)
- tests/_internal/test_query_list.py:
     5 × UP006 (non-pep585-annotation)
- tests/legacy_api/test_server.py:
     1 × RUF052 (used-dummy-variable)
- tests/legacy_api/test_session.py:
     2 × UP006 (non-pep585-annotation)
     1 × F401 (unused-import)
     1 × RUF052 (used-dummy-variable)
- tests/legacy_api/test_version.py:
     3 × UP006 (non-pep585-annotation)
     1 × TC006 (runtime-cast-value)
- tests/legacy_api/test_window.py:
     2 × UP006 (non-pep585-annotation)
     1 × F401 (unused-import)
- tests/test_dataclasses.py:
     3 × UP006 (non-pep585-annotation)
     3 × RUF052 (used-dummy-variable)
- tests/test_server.py:
     1 × RUF052 (used-dummy-variable)
- tests/test_session.py:
     2 × UP006 (non-pep585-annotation)
     1 × RUF052 (used-dummy-variable)
- tests/test_version.py:
     3 × UP006 (non-pep585-annotation)
     1 × TC006 (runtime-cast-value)
- tests/test_window.py:
     2 × UP006 (non-pep585-annotation)
     1 × F401 (unused-import)

Found 1893 errors (186 fixed, 1707 remaining).
44 files left unchanged
@tony tony force-pushed the python-3.9-futurize branch from 99cf9d0 to f31e331 Compare December 21, 2024 00:59
@tony tony merged commit 274d4c9 into master Dec 21, 2024
27 checks passed
@tony tony deleted the python-3.9-futurize branch December 21, 2024 02:20
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