mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 04:34:28 +08:00
Use SupportsFlush from typeshed to fix TODO (#13166)
This commit is contained in:
committed by
GitHub
parent
9d743a3f1e
commit
09dca1a7d0
@@ -1,7 +1,7 @@
|
||||
# pyright: reportInvalidStubStatement=none
|
||||
|
||||
import sys
|
||||
from _typeshed import StrPath, SupportsKeysAndGetItem, SupportsWrite
|
||||
from _typeshed import StrPath, SupportsFlush, SupportsKeysAndGetItem, SupportsWrite
|
||||
from argparse import Namespace
|
||||
from collections.abc import Callable, Iterable, Sequence
|
||||
from logging import Logger
|
||||
@@ -20,9 +20,7 @@ _AlembicConfigValue: TypeAlias = Any
|
||||
alembic_version: tuple[int, int, int]
|
||||
log: Logger
|
||||
|
||||
# TODO: Use _typeshed.SupportsFlush when it's available in type checkers.
|
||||
class _SupportsWriteAndFlush(SupportsWrite[_T_contra], Protocol):
|
||||
def flush(self) -> object: ...
|
||||
class _SupportsWriteAndFlush(SupportsWrite[_T_contra], SupportsFlush, Protocol): ...
|
||||
|
||||
class Config: # should inherit from alembic.config.Config which is not possible yet
|
||||
template_directory: str | None
|
||||
|
||||
Reference in New Issue
Block a user