Skip to content

Commit e5ace12

Browse files
committed
fix: ruff errors
1 parent c715957 commit e5ace12

File tree

5 files changed

+9
-11
lines changed

5 files changed

+9
-11
lines changed

src/typed_diskcache/database/connect.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
contextmanager,
88
suppress,
99
)
10-
from typing import TYPE_CHECKING, Any, Callable, Protocol, overload, runtime_checkable
10+
from typing import TYPE_CHECKING, Any, Protocol, overload, runtime_checkable
1111

1212
import sqlalchemy as sa
1313
from sqlalchemy.dialects.sqlite import dialect as sqlite_dialect
@@ -29,7 +29,7 @@
2929
from typed_diskcache.log import get_logger
3030

3131
if TYPE_CHECKING:
32-
from collections.abc import AsyncGenerator, Generator
32+
from collections.abc import AsyncGenerator, Callable, Generator
3333
from os import PathLike
3434

3535
from sqlalchemy.engine.interfaces import DBAPIConnection, Dialect

src/typed_diskcache/implement/cache/default/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
from contextlib import suppress
77
from os.path import expandvars
88
from pathlib import Path
9-
from typing import TYPE_CHECKING, Any, overload
9+
from typing import TYPE_CHECKING, Any, TypeAlias, overload
1010

1111
import sqlalchemy as sa
12-
from typing_extensions import TypeAlias, TypeVar, Unpack, override
12+
from typing_extensions import TypeVar, Unpack, override
1313

1414
from typed_diskcache import exception as te
1515
from typed_diskcache.core.const import ENOVAL

src/typed_diskcache/implement/cache/default/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
import warnings
66
from contextlib import AsyncExitStack, ExitStack, asynccontextmanager, contextmanager
77
from pathlib import Path
8-
from typing import TYPE_CHECKING, Any
8+
from typing import TYPE_CHECKING, Any, TypeAlias
99

1010
import sqlalchemy as sa
1111
from sqlalchemy.exc import OperationalError
1212
from sqlalchemy.orm import selectinload
13-
from typing_extensions import TypeAlias, TypeVar, Unpack
13+
from typing_extensions import TypeVar, Unpack
1414

1515
from typed_diskcache import exception as te
1616
from typed_diskcache.core.const import (

src/typed_diskcache/implement/cache/fanout/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
from __future__ import annotations
22

3-
from typing import TYPE_CHECKING, Any
3+
from typing import TYPE_CHECKING, Any, TypeAlias
44

5-
from typing_extensions import ParamSpec, TypeAlias, TypeVar
5+
from typing_extensions import ParamSpec, TypeVar
66

77
from typed_diskcache import exception as te
88
from typed_diskcache.log import get_logger

src/typed_diskcache/implement/disk/utils.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22

33
from collections.abc import AsyncIterator, Iterator
44
from contextlib import suppress
5-
from typing import TYPE_CHECKING, Any, Literal, overload
6-
7-
from typing_extensions import TypeAlias
5+
from typing import TYPE_CHECKING, Any, Literal, TypeAlias, overload
86

97
from typed_diskcache.utils.dependency import validate_installed
108

0 commit comments

Comments
 (0)