Skip to content

Conversation

@tony
Copy link
Member

@tony tony commented Nov 1, 2025

@codecov
Copy link

codecov bot commented Nov 1, 2025

Codecov Report

❌ Patch coverage is 28.57143% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 46.21%. Comparing base (e215556) to head (f6194c6).
⚠️ Report is 12 commits behind head on master.

Files with missing lines Patch % Lines
src/libtmux/_vendor/version.py 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #602      +/-   ##
==========================================
- Coverage   46.24%   46.21%   -0.03%     
==========================================
  Files          19       19              
  Lines        1875     1876       +1     
  Branches      294      294              
==========================================
  Hits          867      867              
- Misses        893      894       +1     
  Partials      115      115              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tony tony force-pushed the drop-python-3.9 branch 2 times, most recently from 3bd2bfa to 1627ce1 Compare November 1, 2025 14:31
tony added 11 commits November 1, 2025 10:28
uv run ruff check . --fix --show-fixes
   Building libtmux @ file:///home/d/work/python/libtmux
      Built libtmux @ file:///home/d/work/python/libtmux
Uninstalled 1 package in 0.43ms
Installed 1 package in 0.65ms
B905 `zip()` without an explicit `strict=` parameter
   --> src/libtmux/_internal/query_list.py:495:25
    |
494 |         if len(self) == len(data):
495 |             for a, b in zip(self, data):
    |                         ^^^^^^^^^^^^^^^
496 |                 if isinstance(a, Mapping):
497 |                     a_keys = a.keys()
    |
help: Add explicit value for parameter `strict=`

UP007 Use `X | Y` for type annotations
  --> src/libtmux/_vendor/version.py:24:17
   |
22 | __all__ = ["VERSION_PATTERN", "InvalidVersion", "Version", "parse"]
23 |
24 | InfiniteTypes = t.Union[InfinityType, NegativeInfinityType]
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
25 | PrePostDevType = t.Union[InfiniteTypes, tuple[str, int]]
26 | SubLocalType = t.Union[InfiniteTypes, int, str]
   |
help: Convert to `X | Y`

UP007 Use `X | Y` for type annotations
  --> src/libtmux/_vendor/version.py:25:18
   |
24 | InfiniteTypes = t.Union[InfinityType, NegativeInfinityType]
25 | PrePostDevType = t.Union[InfiniteTypes, tuple[str, int]]
   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
26 | SubLocalType = t.Union[InfiniteTypes, int, str]
27 | LocalType = t.Union[
   |
help: Convert to `X | Y`

UP007 Use `X | Y` for type annotations
  --> src/libtmux/_vendor/version.py:26:16
   |
24 | InfiniteTypes = t.Union[InfinityType, NegativeInfinityType]
25 | PrePostDevType = t.Union[InfinityTypes, tuple[str, int]]
26 | SubLocalType = t.Union[InfiniteTypes, int, str]
   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
27 | LocalType = t.Union[
28 |     NegativeInfinityType,
   |
help: Convert to `X | Y`

UP007 Use `X | Y` for type annotations
  --> src/libtmux/_vendor/version.py:27:13
   |
25 |   PrePostDevType = t.Union[InfiniteTypes, tuple[str, int]]
26 |   SubLocalType = t.Union[InfiniteTypes, int, str]
27 |   LocalType = t.Union[
   |  _____________^
28 | |     NegativeInfinityType,
29 | |     tuple[
30 | |         SubLocalType | tuple[SubLocalType, str] | tuple[NegativeInfinityType, SubLocalType],
31 | |         ...,
32 | |     ],
33 | | ]
   | |^
34 |   CmpKey = tuple[
35 |       int,
   |
help: Convert to `X | Y`

E501 Line too long (92 > 88)
  --> src/libtmux/_vendor/version.py:30:89
   |
28 |     NegativeInfinityType,
29 |     tuple[
30 |         SubLocalType | tuple[SubLocalType, str] | tuple[NegativeInfinityType, SubLocalType],
   |                                                                                         ^^^^
31 |         ...,
32 |     ],
   |

UP045 Use `X | None` for type annotations
  --> src/libtmux/neo.py:16:21
   |
14 | if t.TYPE_CHECKING:
15 |     ListCmd = t.Literal["list-sessions", "list-windows", "list-panes"]
16 |     ListExtraArgs = t.Optional[Iterable[str]]
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^
17 |
18 |     from libtmux.server import Server
   |
help: Convert to `X | None`

B905 `zip()` without an explicit `strict=` parameter
   --> src/libtmux/neo.py:227:14
    |
226 |     obj_formatters = [
227 |         dict(zip(formats, formatter.split(FORMAT_SEPARATOR)))
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
228 |         for formatter in obj_output
229 |     ]
    |
help: Add explicit value for parameter `strict=`

B905 `zip()` without an explicit `strict=` parameter
   --> src/libtmux/pane.py:707:32
    |
705 |         pane_output = pane_cmd.stdout[0]
706 |
707 |         pane_formatters = dict(zip(["pane_id"], pane_output.split(FORMAT_SEPARATOR)))
    |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
708 |
709 |         return self.from_pane_id(server=self.server, pane_id=pane_formatters["pane_id"])
    |
help: Add explicit value for parameter `strict=`

UP036 Version block is outdated for minimum Python version
  --> src/libtmux/server.py:41:8
   |
39 |     from libtmux._internal.types import StrPath
40 |
41 |     if sys.version_info >= (3, 10):
   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^
42 |         from typing import Self, TypeAlias
43 |     else:
   |
help: Remove outdated version block

B905 `zip()` without an explicit `strict=` parameter
   --> src/libtmux/server.py:585:13
    |
584 |         session_formatters = dict(
585 |             zip(["session_id"], session_stdout.split(formats.FORMAT_SEPARATOR)),
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
586 |         )
    |
help: Add explicit value for parameter `strict=`

B905 `zip()` without an explicit `strict=` parameter
   --> src/libtmux/session.py:734:13
    |
733 |         window_formatters = dict(
734 |             zip(["window_id"], window_output.split(FORMAT_SEPARATOR)),
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
735 |         )
    |
help: Add explicit value for parameter `strict=`

UP036 Version block is outdated for minimum Python version
  --> tests/legacy_api/test_version.py:17:8
   |
15 |     from collections.abc import Callable
16 |
17 |     if sys.version_info >= (3, 10):
   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^
18 |         from typing import TypeAlias
19 |     else:
   |
help: Remove outdated version block

UP045 Use `X | None` for type annotations
  --> tests/test_dataclasses.py:25:21
   |
24 |     ListCmd = t.Literal["list-sessions", "list-windows", "list-panes"]
25 |     ListExtraArgs = t.Optional[tuple[str]]
   |                     ^^^^^^^^^^^^^^^^^^^^^^
   |
help: Convert to `X | None`

UP036 Version block is outdated for minimum Python version
  --> tests/test_version.py:17:8
   |
15 |     from collections.abc import Callable
16 |
17 |     if sys.version_info >= (3, 10):
   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^
18 |         from typing import TypeAlias
19 |     else:
   |
help: Remove outdated version block

Fixed 7 errors:
- src/libtmux/_internal/types.py:
    1 × I001 (unsorted-imports)
    1 × UP035 (deprecated-import)
- src/libtmux/_vendor/version.py:
    1 × UP007 (non-pep604-annotation-union)
- src/libtmux/server.py:
    1 × I001 (unsorted-imports)
    1 × UP035 (deprecated-import)
- tests/legacy_api/test_version.py:
    1 × UP035 (deprecated-import)
- tests/test_version.py:
    1 × UP035 (deprecated-import)

Found 22 errors (7 fixed, 15 remaining).
No fixes available (8 hidden fixes can be enabled with the `--unsafe-fixes` option).
- replace remaining Optional/Union patterns with PEP 604 unions aligned to the new baseline
- guard typing_extensions imports under TYPE_CHECKING while dropping obsolete version branches
- add explicit strict=False to zip-based format parsing to satisfy Ruff B905

uv run ruff check . --fix --show-fixes
uv run ruff format .
uv run mypy
uv run py.test
@tony tony merged commit 236f91a into master Nov 1, 2025
18 checks passed
@tony tony deleted the drop-python-3.9 branch November 1, 2025 15:47
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.

2 participants