Skip to content

Python 3.9 Modernization #953

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

Merged
merged 4 commits into from
Dec 21, 2024
Merged

Python 3.9 Modernization #953

merged 4 commits into from
Dec 21, 2024

Conversation

tony
Copy link
Member

@tony tony commented Dec 18, 2024

In re: #951

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

Copy link

codecov bot commented Dec 18, 2024

Codecov Report

Attention: Patch coverage is 71.92982% with 16 lines in your changes missing coverage. Please review.

Project coverage is 70.23%. Comparing base (78fceb5) to head (ce506cd).
Report is 5 commits behind head on master.

Files with missing lines Patch % Lines
docs/_ext/aafig.py 16.66% 5 Missing ⚠️
src/tmuxp/shell.py 20.00% 4 Missing ⚠️
src/tmuxp/cli/freeze.py 25.00% 3 Missing ⚠️
src/tmuxp/cli/utils.py 81.81% 2 Missing ⚠️
src/tmuxp/_internal/config_reader.py 75.00% 1 Missing ⚠️
src/tmuxp/plugin.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #953      +/-   ##
==========================================
- Coverage   70.24%   70.23%   -0.02%     
==========================================
  Files          26       26              
  Lines        1936     1935       -1     
  Branches      365      365              
==========================================
- Hits         1360     1359       -1     
  Misses        456      456              
  Partials      120      120              

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

tony added 3 commits December 20, 2024 18:19
ruff check . --select ALL --fix --unsafe-fixes --preview --show-fixes --ignore T201 --ignore PT014 --ignore RUF100; ruff format .;

Fixed 174 errors:
- conftest.py:
     3 × UP006 (non-pep585-annotation)
- docs/_ext/aafig.py:
     7 × UP006 (non-pep585-annotation)
     2 × RUF052 (used-dummy-variable)
- docs/conf.py:
     6 × UP006 (non-pep585-annotation)
- src/tmuxp/_internal/config_reader.py:
     5 × UP006 (non-pep585-annotation)
     2 × TC006 (runtime-cast-value)
- src/tmuxp/_internal/types.py:
     3 × UP006 (non-pep585-annotation)
     1 × F401 (unused-import)
- src/tmuxp/cli/__init__.py:
     1 × UP006 (non-pep585-annotation)
- src/tmuxp/cli/debug_info.py:
     2 × UP006 (non-pep585-annotation)
- src/tmuxp/cli/freeze.py:
     2 × UP006 (non-pep585-annotation)
     1 × RUF052 (used-dummy-variable)
     1 × TC006 (runtime-cast-value)
- src/tmuxp/cli/import_config.py:
     2 × UP006 (non-pep585-annotation)
- src/tmuxp/cli/load.py:
     3 × UP006 (non-pep585-annotation)
- src/tmuxp/cli/utils.py:
     6 × UP006 (non-pep585-annotation)
     5 × RUF052 (used-dummy-variable)
- src/tmuxp/log.py:
     1 × UP006 (non-pep585-annotation)
- src/tmuxp/plugin.py:
     5 × UP006 (non-pep585-annotation)
- src/tmuxp/shell.py:
     7 × UP006 (non-pep585-annotation)
- src/tmuxp/workspace/builder.py:
     8 × UP006 (non-pep585-annotation)
- src/tmuxp/workspace/finders.py:
     4 × UP006 (non-pep585-annotation)
     1 × PLC1802 (len-test)
- src/tmuxp/workspace/freezer.py:
     5 × UP006 (non-pep585-annotation)
- src/tmuxp/workspace/importers.py:
     4 × UP006 (non-pep585-annotation)
- src/tmuxp/workspace/loader.py:
     6 × UP006 (non-pep585-annotation)
- tests/cli/test_cli.py:
     1 × UP006 (non-pep585-annotation)
- tests/cli/test_convert.py:
     2 × UP006 (non-pep585-annotation)
     1 × F401 (unused-import)
- tests/cli/test_freeze.py:
     4 × UP006 (non-pep585-annotation)
- tests/cli/test_import.py:
     5 × UP006 (non-pep585-annotation)
     1 × F401 (unused-import)
- tests/cli/test_load.py:
    16 × UP006 (non-pep585-annotation)
- tests/cli/test_shell.py:
    19 × UP006 (non-pep585-annotation)
- tests/fixtures/pluginsystem/partials/_types.py:
     3 × UP006 (non-pep585-annotation)
     1 × F401 (unused-import)
- tests/fixtures/utils.py:
     2 × RUF052 (used-dummy-variable)
- tests/fixtures/workspace/expand1.py:
     1 × UP006 (non-pep585-annotation)
- tests/fixtures/workspace/shell_command_before.py:
     2 × UP006 (non-pep585-annotation)
- tests/workspace/test_builder.py:
    11 × RUF052 (used-dummy-variable)
     2 × UP006 (non-pep585-annotation)
- tests/workspace/test_config.py:
     1 × UP006 (non-pep585-annotation)
- tests/workspace/test_import_teamocil.py:
     7 × UP006 (non-pep585-annotation)
- tests/workspace/test_import_tmuxinator.py:
     2 × UP006 (non-pep585-annotation)

Found 1371 errors (174 fixed, 1197 remaining).
2 files reformatted, 97 files left unchanged
@tony tony force-pushed the python-3.9-futurize branch from 8caea2a to 3ed84b2 Compare December 21, 2024 00:19
@tony tony merged commit 858b924 into master Dec 21, 2024
19 checks passed
@tony tony deleted the python-3.9-futurize branch December 21, 2024 02: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.

1 participant