Skip to content

Commit b76c353

Browse files
committed
chore(ruff) Automated fixes for typing annotations
Fixed 6 errors: - src/libtmux/_vendor/version.py: 1 × I001 (unsorted-imports) 1 × UP006 (non-pep585-annotation) - src/libtmux/test.py: 2 × I001 (unsorted-imports) 1 × UP006 (non-pep585-annotation) 1 × TC003 (typing-only-standard-library-import) Found 1374 errors (6 fixed, 1368 remaining). 44 files left unchanged uv run ruff check --select ALL . --fix --unsafe-fixes --preview --show-fixes; uv run ruff format .
1 parent bb13d70 commit b76c353

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/libtmux/_vendor/version.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import itertools
1616
import re
1717
import typing as t
18+
from collections.abc import Callable
1819

1920
from ._structures import Infinity, InfinityType, NegativeInfinity, NegativeInfinityType
2021

@@ -42,7 +43,7 @@
4243
PrePostDevType,
4344
LocalType,
4445
]
45-
VersionComparisonMethod = t.Callable[[CmpKey, CmpKey], bool]
46+
VersionComparisonMethod = Callable[[CmpKey, CmpKey], bool]
4647

4748
_Version = collections.namedtuple(
4849
"_Version",

src/libtmux/test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
if t.TYPE_CHECKING:
2020
import types
21-
from collections.abc import Generator
21+
from collections.abc import Callable, Generator
2222

2323
from libtmux.server import Server
2424
from libtmux.session import Session
@@ -64,7 +64,7 @@ def __next__(self) -> str:
6464

6565

6666
def retry_until(
67-
fun: t.Callable[[], bool],
67+
fun: Callable[[], bool],
6868
seconds: float = RETRY_TIMEOUT_SECONDS,
6969
*,
7070
interval: float = RETRY_INTERVAL_SECONDS,

0 commit comments

Comments
 (0)