| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,17 @@ | ||
| class immutabledict: | ||
| def __len__(self) -> int: ... | ||
| def __getitem__(self, __item): ... | ||
| def __iter__(self): ... | ||
| def union(self, **kwargs): ... | ||
| def merge_with(self, *args): ... | ||
| def keys(self): ... | ||
| def __contains__(self, __item): ... | ||
| def items(self): ... | ||
| def values(self): ... | ||
| def get(self, __key, __default=...): ... | ||
| def __reduce__(self): ... | ||
| from _typeshed import SupportsKeysAndGetItem | ||
| from collections.abc import Iterable | ||
| from typing import Generic, TypeVar, overload | ||
|
|
||
| _KT = TypeVar("_KT") | ||
| _KT2 = TypeVar("_KT2") | ||
| _VT = TypeVar("_VT") | ||
| _VT2 = TypeVar("_VT2") | ||
|
|
||
| class immutabledict(dict[_KT, _VT], Generic[_KT, _VT]): | ||
| @overload | ||
| def union(self, __dict: dict[_KT2, _VT2]) -> immutabledict[_KT | _KT2, _VT | _VT2]: ... | ||
| @overload | ||
| def union(self, __dict: None = ..., **kw: SupportsKeysAndGetItem[_KT2, _VT2]) -> immutabledict[_KT | _KT2, _VT | _VT2]: ... | ||
| def merge_with( | ||
| self, *args: SupportsKeysAndGetItem[_KT | _KT2, _VT2] | Iterable[tuple[_KT2, _VT2]] | None | ||
| ) -> immutabledict[_KT | _KT2, _VT | _VT2]: ... |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| # TODO: Tempory copy of _typeshed.dbapi, until that file is available in all typecheckers. | ||
| # Does not exist at runtime. | ||
|
|
||
| from collections.abc import Mapping, Sequence | ||
| from typing import Any, Protocol | ||
|
|
||
| DBAPITypeCode = Any | None | ||
| # Strictly speaking, this should be a Sequence, but the type system does | ||
| # not support fixed-length sequences. | ||
| DBAPIColumnDescription = tuple[str, DBAPITypeCode, int | None, int | None, int | None, int | None, bool | None] | ||
|
|
||
| class DBAPIConnection(Protocol): | ||
| def close(self) -> object: ... | ||
| def commit(self) -> object: ... | ||
| # optional: | ||
| # def rollback(self) -> Any: ... | ||
| def cursor(self) -> DBAPICursor: ... | ||
|
|
||
| class DBAPICursor(Protocol): | ||
| @property | ||
| def description(self) -> Sequence[DBAPIColumnDescription] | None: ... | ||
| @property | ||
| def rowcount(self) -> int: ... | ||
| # optional: | ||
| # def callproc(self, __procname: str, __parameters: Sequence[Any] = ...) -> Sequence[Any]: ... | ||
| def close(self) -> object: ... | ||
| def execute(self, __operation: str, __parameters: Sequence[Any] | Mapping[str, Any] = ...) -> object: ... | ||
| def executemany(self, __operation: str, __seq_of_parameters: Sequence[Sequence[Any]]) -> object: ... | ||
| def fetchone(self) -> Sequence[Any] | None: ... | ||
| def fetchmany(self, __size: int = ...) -> Sequence[Sequence[Any]]: ... | ||
| def fetchall(self) -> Sequence[Sequence[Any]]: ... | ||
| # optional: | ||
| # def nextset(self) -> None | Literal[True]: ... | ||
| arraysize: int | ||
| def setinputsizes(self, __sizes: Sequence[DBAPITypeCode | int | None]) -> object: ... | ||
| def setoutputsize(self, __size: int, __column: int = ...) -> object: ... | ||
| Back | FazBrowse Home | New Git URL |
Uh oh!
There was an error while loading. Please reload this page.