format tree

This commit is contained in:
zowoq 2024-03-07 13:06:38 +10:00
parent 5087ca1887
commit 7babebd1bb

View file

@ -93,12 +93,10 @@ class Wrapped(Protocol[A_co, B_co]):
"""Protocol for result of `functools.wraps`""" """Protocol for result of `functools.wraps`"""
@property @property
def __wrapped__(self) -> A_co: def __wrapped__(self) -> A_co: ...
...
@property @property
def __call__(self) -> B_co: def __call__(self) -> B_co: ...
...
CurMethod = Callable[Concatenate[S, sqlite3.Cursor, P], T] CurMethod = Callable[Concatenate[S, sqlite3.Cursor, P], T]
@ -151,16 +149,16 @@ class Storage:
@staticmethod @staticmethod
def _cursor_method( def _cursor_method(
fun: CurMethod[StorageSelf, P, T], fun: CurMethod[StorageSelf, P, T],
) -> WrappedCurMethod[StorageSelf, P, T]: ) -> WrappedCurMethod[StorageSelf, P, T]: ...
...
@overload @overload
@staticmethod @staticmethod
def _cursor_method( def _cursor_method(
*, *,
transaction: bool = False, transaction: bool = False,
) -> Callable[[CurMethod[StorageSelf, P, T]], WrappedCurMethod[StorageSelf, P, T]]: ) -> Callable[
... [CurMethod[StorageSelf, P, T]], WrappedCurMethod[StorageSelf, P, T]
]: ...
# NOTE: mypy <1.6 claims this implementation doesn't match the first # NOTE: mypy <1.6 claims this implementation doesn't match the first
# overload; it's wrong. # overload; it's wrong.