mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-09 13:02:22 +08:00
A new shade of Black (#11362)
This commit is contained in:
@@ -37,9 +37,11 @@ class Config: # should inherit from alembic.config.Config which is not possible
|
||||
stdout: SupportsWrite[str] = sys.stdout,
|
||||
cmd_opts: Namespace | None = None,
|
||||
config_args: SupportsKeysAndGetItem[str, _AlembicConfigValue] | Iterable[tuple[str, _AlembicConfigValue]] = ...,
|
||||
attributes: SupportsKeysAndGetItem[_AlembicConfigValue, _AlembicConfigValue]
|
||||
| Iterable[tuple[_AlembicConfigValue, _AlembicConfigValue]]
|
||||
| None = None,
|
||||
attributes: (
|
||||
SupportsKeysAndGetItem[_AlembicConfigValue, _AlembicConfigValue]
|
||||
| Iterable[tuple[_AlembicConfigValue, _AlembicConfigValue]]
|
||||
| None
|
||||
) = None,
|
||||
*,
|
||||
template_directory: str | None = None,
|
||||
) -> None: ...
|
||||
|
||||
@@ -4,21 +4,17 @@ from wtforms import Field, Form
|
||||
|
||||
|
||||
class Filter1:
|
||||
def __call__(self, value: object) -> None:
|
||||
...
|
||||
def __call__(self, value: object) -> None: ...
|
||||
|
||||
|
||||
class Filter2:
|
||||
def __call__(self, input: None) -> None:
|
||||
...
|
||||
def __call__(self, input: None) -> None: ...
|
||||
|
||||
|
||||
def not_a_filter(a: object, b: object) -> None:
|
||||
...
|
||||
def not_a_filter(a: object, b: object) -> None: ...
|
||||
|
||||
|
||||
def also_not_a_filter() -> None:
|
||||
...
|
||||
def also_not_a_filter() -> None: ...
|
||||
|
||||
|
||||
# we should accept any mapping of sequences, we can't really validate
|
||||
|
||||
@@ -98,6 +98,7 @@ class LRUCache(dict[_KT, _VT]):
|
||||
key = ...
|
||||
value = ...
|
||||
def __init__(self, key, value) -> None: ...
|
||||
|
||||
_dict: dict[_KT, LRUCache._Item]
|
||||
capacity: int
|
||||
head: LRUCache._Item | None
|
||||
|
||||
@@ -13,6 +13,7 @@ class Address(Resource):
|
||||
Ground: str
|
||||
Electronic: str
|
||||
ShipToStore: str
|
||||
|
||||
@staticmethod
|
||||
def create(params: Incomplete | None = None): ...
|
||||
@staticmethod
|
||||
|
||||
@@ -7,6 +7,7 @@ class ApplePayCard(Resource):
|
||||
AmEx: str
|
||||
MasterCard: str
|
||||
Visa: str
|
||||
|
||||
is_expired: Any
|
||||
subscriptions: Any
|
||||
def __init__(self, gateway, attributes) -> None: ...
|
||||
|
||||
@@ -35,6 +35,7 @@ class CreditCard(Resource):
|
||||
Yes: str
|
||||
No: str
|
||||
Unknown: str
|
||||
|
||||
Commercial: Any
|
||||
DurbinRegulated: Any
|
||||
Debit: Any
|
||||
|
||||
@@ -12,6 +12,7 @@ class CreditCardVerification(AttributeGetter):
|
||||
GatewayRejected: str
|
||||
ProcessorDeclined: str
|
||||
Verified: str
|
||||
|
||||
amount: Any
|
||||
currency_iso_code: Any
|
||||
processor_response_code: Any
|
||||
|
||||
@@ -8,6 +8,7 @@ class Disbursement(Resource):
|
||||
class Type:
|
||||
Credit: str
|
||||
Debit: str
|
||||
|
||||
amount: Any
|
||||
merchant_account: Any
|
||||
def __init__(self, gateway, attributes) -> None: ...
|
||||
|
||||
@@ -40,6 +40,7 @@ class Dispute(AttributeGetter):
|
||||
Effortless: str
|
||||
Standard: str
|
||||
NotProtected: str
|
||||
|
||||
@staticmethod
|
||||
def accept(id): ...
|
||||
@staticmethod
|
||||
|
||||
@@ -7,6 +7,7 @@ from braintree.successful_result import SuccessfulResult as SuccessfulResult
|
||||
class DocumentUpload(Resource):
|
||||
class Kind:
|
||||
EvidenceDocument: str
|
||||
|
||||
@staticmethod
|
||||
def create(params: Incomplete | None = None): ...
|
||||
@staticmethod
|
||||
|
||||
@@ -5,5 +5,6 @@ class EuropeBankAccount(Resource):
|
||||
class MandateType:
|
||||
Business: str
|
||||
Consumer: str
|
||||
|
||||
@staticmethod
|
||||
def signature(): ...
|
||||
|
||||
@@ -19,6 +19,7 @@ class MerchantAccount(Resource):
|
||||
Bank: str
|
||||
Email: str
|
||||
MobilePhone: str
|
||||
|
||||
FundingDestinations: Any
|
||||
individual_details: Any
|
||||
business_details: Any
|
||||
|
||||
@@ -30,6 +30,7 @@ class Subscription(Resource):
|
||||
Expired: str
|
||||
PastDue: str
|
||||
Pending: str
|
||||
|
||||
@staticmethod
|
||||
def create(params: Incomplete | None = None): ...
|
||||
@staticmethod
|
||||
|
||||
@@ -97,6 +97,7 @@ class Transaction(Resource):
|
||||
Telephone: str
|
||||
Laundry: str
|
||||
Other: str
|
||||
|
||||
@staticmethod
|
||||
def adjust_authorization(transaction_id, amount): ...
|
||||
@staticmethod
|
||||
|
||||
@@ -6,6 +6,7 @@ class TransactionLineItem(AttributeGetter):
|
||||
class Kind:
|
||||
Credit: str
|
||||
Debit: str
|
||||
|
||||
def __init__(self, attributes) -> None: ...
|
||||
@staticmethod
|
||||
def find_all(transaction_id): ...
|
||||
|
||||
@@ -17,6 +17,7 @@ class UsBankAccountVerification(AttributeGetter):
|
||||
IndependentCheck: str
|
||||
TokenizedCheck: str
|
||||
MicroTransfers: str
|
||||
|
||||
us_bank_account: Any
|
||||
def __init__(self, gateway, attributes) -> None: ...
|
||||
@staticmethod
|
||||
|
||||
@@ -27,6 +27,7 @@ class Http:
|
||||
Xml: str
|
||||
Multipart: str
|
||||
Json: str
|
||||
|
||||
@staticmethod
|
||||
def is_error_status(status): ...
|
||||
@staticmethod
|
||||
|
||||
@@ -59,6 +59,7 @@ class WebhookNotification(Resource):
|
||||
TransactionDisbursed: str
|
||||
TransactionSettled: str
|
||||
TransactionSettlementDeclined: str
|
||||
|
||||
@staticmethod
|
||||
def parse(signature, payload): ...
|
||||
@staticmethod
|
||||
|
||||
@@ -18,6 +18,7 @@ if sys.platform == "win32":
|
||||
wAttributes: wintypes.WORD
|
||||
srWindow: wintypes.SMALL_RECT
|
||||
dwMaximumWindowSize: COORD
|
||||
|
||||
def winapi_test() -> bool: ...
|
||||
def GetConsoleScreenBufferInfo(stream_id: int = -11) -> CONSOLE_SCREEN_BUFFER_INFO: ...
|
||||
def SetConsoleTextAttribute(stream_id: int, attrs: wintypes.WORD) -> wintypes.BOOL: ...
|
||||
|
||||
@@ -24,6 +24,7 @@ class loop(AbstractLoop):
|
||||
ref: bool
|
||||
active: bool
|
||||
closing: bool
|
||||
|
||||
def debug(self) -> list[_HandleState]: ...
|
||||
def install_sigchld(self) -> None: ...
|
||||
def reset_sigchld(self) -> None: ...
|
||||
|
||||
@@ -59,6 +59,7 @@ class MemcacheCache(GlobalCache):
|
||||
key: Any
|
||||
def __init__(self, key) -> None: ...
|
||||
def __eq__(self, other): ...
|
||||
|
||||
transient_errors: Any
|
||||
@classmethod
|
||||
def from_environment(cls, max_pool_size: int = ..., strict_read: bool = ..., strict_write: bool = ...) -> Self: ...
|
||||
|
||||
@@ -85,19 +85,21 @@ class WriteApi(_BaseWriteApi):
|
||||
self,
|
||||
bucket: str,
|
||||
org: str | None = None,
|
||||
record: str
|
||||
| Iterable[str]
|
||||
| Point
|
||||
| Iterable[Point]
|
||||
| dict[Incomplete, Incomplete]
|
||||
| Iterable[dict[Incomplete, Incomplete]]
|
||||
| bytes
|
||||
| Iterable[bytes]
|
||||
| _Observable
|
||||
| _NamedTuple
|
||||
| Iterable[_NamedTuple]
|
||||
| _DataClass
|
||||
| Iterable[_DataClass] = None,
|
||||
record: (
|
||||
str
|
||||
| Iterable[str]
|
||||
| Point
|
||||
| Iterable[Point]
|
||||
| dict[Incomplete, Incomplete]
|
||||
| Iterable[dict[Incomplete, Incomplete]]
|
||||
| bytes
|
||||
| Iterable[bytes]
|
||||
| _Observable
|
||||
| _NamedTuple
|
||||
| Iterable[_NamedTuple]
|
||||
| _DataClass
|
||||
| Iterable[_DataClass]
|
||||
) = None,
|
||||
write_precision: _WritePrecision = "ns",
|
||||
**kwargs,
|
||||
) -> Any: ...
|
||||
|
||||
@@ -19,18 +19,20 @@ class WriteApiAsync(_BaseWriteApi):
|
||||
self,
|
||||
bucket: str,
|
||||
org: str | None = None,
|
||||
record: str
|
||||
| Iterable[str]
|
||||
| Point
|
||||
| Iterable[Point]
|
||||
| dict[Incomplete, Incomplete]
|
||||
| Iterable[dict[Incomplete, Incomplete]]
|
||||
| bytes
|
||||
| Iterable[bytes]
|
||||
| _NamedTuple
|
||||
| Iterable[_NamedTuple]
|
||||
| _DataClass
|
||||
| Iterable[_DataClass] = None,
|
||||
record: (
|
||||
str
|
||||
| Iterable[str]
|
||||
| Point
|
||||
| Iterable[Point]
|
||||
| dict[Incomplete, Incomplete]
|
||||
| Iterable[dict[Incomplete, Incomplete]]
|
||||
| bytes
|
||||
| Iterable[bytes]
|
||||
| _NamedTuple
|
||||
| Iterable[_NamedTuple]
|
||||
| _DataClass
|
||||
| Iterable[_DataClass]
|
||||
) = None,
|
||||
write_precision: _WritePrecision = "ns",
|
||||
**kwargs,
|
||||
) -> bool: ...
|
||||
|
||||
@@ -9,6 +9,7 @@ class AsyncStrategy(BaseStrategy):
|
||||
socket_size: Any
|
||||
def __init__(self, ldap_connection) -> None: ...
|
||||
def run(self) -> None: ...
|
||||
|
||||
sync: bool
|
||||
no_real_dsa: bool
|
||||
pooled: bool
|
||||
|
||||
@@ -60,6 +60,7 @@ class ReusableStrategy(BaseStrategy):
|
||||
worker_lock: Any
|
||||
def __init__(self, connection, request_queue) -> None: ...
|
||||
def new_connection(self) -> None: ...
|
||||
|
||||
sync: bool
|
||||
no_real_dsa: bool
|
||||
pooled: bool
|
||||
|
||||
@@ -71,6 +71,7 @@ class ArborescenceIterator:
|
||||
class Partition:
|
||||
mst_weight: float
|
||||
partition_dict: dict[Incomplete, Incomplete]
|
||||
|
||||
G: Incomplete
|
||||
weight: Incomplete
|
||||
minimum: Incomplete
|
||||
|
||||
@@ -34,6 +34,7 @@ class SpanningTreeIterator:
|
||||
class Partition:
|
||||
mst_weight: float
|
||||
partition_dict: dict[Incomplete, Incomplete]
|
||||
|
||||
G: Incomplete
|
||||
weight: Incomplete
|
||||
minimum: Incomplete
|
||||
|
||||
@@ -155,10 +155,9 @@ class DisplayUnitsLabelList(Serialisable):
|
||||
def __init__(
|
||||
self,
|
||||
custUnit: _HasTagAndGet[ConvertibleToFloat | None] | ConvertibleToFloat | None = None,
|
||||
builtInUnit: _HasTagAndGet[_DisplayUnitsLabelListBuiltInUnit]
|
||||
| _DisplayUnitsLabelListBuiltInUnit
|
||||
| Literal["none"]
|
||||
| None = None,
|
||||
builtInUnit: (
|
||||
_HasTagAndGet[_DisplayUnitsLabelListBuiltInUnit] | _DisplayUnitsLabelListBuiltInUnit | Literal["none"] | None
|
||||
) = None,
|
||||
dispUnitsLbl: DisplayUnitsLabel | None = None,
|
||||
extLst: Unused = None,
|
||||
) -> None: ...
|
||||
|
||||
@@ -18,9 +18,14 @@ class NestedBoolText(Bool[Incomplete], NestedText[Incomplete, Incomplete]): ...
|
||||
class _TypedProperty(Strict, Generic[_T]):
|
||||
name: String[Literal[False]]
|
||||
# Since this is internal, just list all possible values
|
||||
value: Integer[Literal[False]] | Float[Literal[False]] | String[Literal[True]] | DateTime[Literal[False]] | Bool[
|
||||
Literal[False]
|
||||
] | String[Literal[False]]
|
||||
value: (
|
||||
Integer[Literal[False]]
|
||||
| Float[Literal[False]]
|
||||
| String[Literal[True]]
|
||||
| DateTime[Literal[False]]
|
||||
| Bool[Literal[False]]
|
||||
| String[Literal[False]]
|
||||
)
|
||||
def __init__(self, name: str, value: _T) -> None: ...
|
||||
def __eq__(self, other: _TypedProperty[Any]) -> bool: ... # type: ignore[override]
|
||||
|
||||
|
||||
@@ -231,11 +231,13 @@ class Worksheet(_WorkbookChild):
|
||||
) -> None: ...
|
||||
def append(
|
||||
self,
|
||||
iterable: list[Incomplete]
|
||||
| tuple[Incomplete, ...]
|
||||
| range
|
||||
| GeneratorType[Incomplete, object, object]
|
||||
| dict[int | str, Incomplete],
|
||||
iterable: (
|
||||
list[Incomplete]
|
||||
| tuple[Incomplete, ...]
|
||||
| range
|
||||
| GeneratorType[Incomplete, object, object]
|
||||
| dict[int | str, Incomplete]
|
||||
),
|
||||
) -> None: ...
|
||||
def insert_rows(self, idx: int, amount: int = 1) -> None: ...
|
||||
def insert_cols(self, idx: int, amount: int = 1) -> None: ...
|
||||
|
||||
@@ -42,6 +42,7 @@ if sys.platform == "win32":
|
||||
def __exit__(
|
||||
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, tb: TracebackType | None
|
||||
) -> None: ...
|
||||
|
||||
READ_CONTROL: int
|
||||
STANDARD_RIGHTS_REQUIRED: int
|
||||
STANDARD_RIGHTS_READ: int
|
||||
|
||||
@@ -54,6 +54,7 @@ class BlockingConnection:
|
||||
|
||||
class _OnChannelOpenedArgs(NamedTuple):
|
||||
channel: Incomplete
|
||||
|
||||
def __init__(
|
||||
self, parameters: Parameters | Sequence[Parameters] | None = None, _impl_class: Incomplete | None = None
|
||||
) -> None: ...
|
||||
@@ -164,6 +165,7 @@ class BlockingChannel:
|
||||
|
||||
class _FlowOkCallbackResultArgs(NamedTuple):
|
||||
active: Incomplete
|
||||
|
||||
def __init__(self, channel_impl, connection) -> None: ...
|
||||
def __int__(self) -> int: ...
|
||||
def __enter__(self): ...
|
||||
|
||||
@@ -159,6 +159,7 @@ class Process:
|
||||
private: Any
|
||||
ref_count: Any
|
||||
shadow_count: Any
|
||||
|
||||
def open_files(self): ...
|
||||
def num_fds(self): ...
|
||||
def cpu_affinity_get(self): ...
|
||||
|
||||
@@ -129,6 +129,7 @@ class Process:
|
||||
rss: Incomplete
|
||||
anon: Incomplete
|
||||
locked: Incomplete
|
||||
|
||||
def memory_maps(self): ...
|
||||
def num_fds(self): ...
|
||||
def num_ctx_switches(self): ...
|
||||
|
||||
@@ -15,6 +15,7 @@ class TimeMixIn:
|
||||
def utcoffset(self, dt): ...
|
||||
def tzname(self, dt): ...
|
||||
def dst(self, dt): ...
|
||||
|
||||
UTC: FixedOffset
|
||||
@property
|
||||
def asDateTime(self): ...
|
||||
|
||||
@@ -54,6 +54,7 @@ class Events(Generic[_T, _AbstractListener_T]):
|
||||
|
||||
class Event:
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
|
||||
_event_queue: Queue[_T] # undocumented
|
||||
_sentinel: object # undocumented
|
||||
_listener: _AbstractListener_T # undocumented
|
||||
|
||||
@@ -35,6 +35,7 @@ if sys.platform == "win32":
|
||||
ClassGuid: ctypes._CField[Incomplete, Incomplete, Incomplete]
|
||||
DevInst: ctypes._CField[Incomplete, Incomplete, Incomplete]
|
||||
Reserved: ctypes._CField[Incomplete, Incomplete, Incomplete]
|
||||
|
||||
PSP_DEVINFO_DATA: type[ctypes._Pointer[SP_DEVINFO_DATA]]
|
||||
PSP_DEVICE_INTERFACE_DETAIL_DATA = ctypes.c_void_p
|
||||
setupapi: ctypes.WinDLL
|
||||
|
||||
@@ -13,6 +13,7 @@ if sys.platform == "win32":
|
||||
nLength: _CField[Incomplete, Incomplete, Incomplete]
|
||||
lpSecurityDescriptor: _CField[Incomplete, Incomplete, Incomplete]
|
||||
bInheritHandle: _CField[Incomplete, Incomplete, Incomplete]
|
||||
|
||||
LPSECURITY_ATTRIBUTES: type[_Pointer[_SECURITY_ATTRIBUTES]]
|
||||
CreateEvent: _NamedFuncPointer
|
||||
CreateFile: _NamedFuncPointer
|
||||
@@ -28,6 +29,7 @@ if sys.platform == "win32":
|
||||
OffsetHigh: _CField[Incomplete, Incomplete, Incomplete]
|
||||
Pointer: _CField[Incomplete, Incomplete, Incomplete]
|
||||
hEvent: _CField[Incomplete, Incomplete, Incomplete]
|
||||
|
||||
OVERLAPPED: TypeAlias = _OVERLAPPED
|
||||
|
||||
class _COMSTAT(Structure):
|
||||
@@ -41,6 +43,7 @@ if sys.platform == "win32":
|
||||
fReserved: _CField[Incomplete, Incomplete, Incomplete]
|
||||
cbInQue: _CField[Incomplete, Incomplete, Incomplete]
|
||||
cbOutQue: _CField[Incomplete, Incomplete, Incomplete]
|
||||
|
||||
COMSTAT: TypeAlias = _COMSTAT
|
||||
|
||||
class _DCB(Structure):
|
||||
@@ -72,6 +75,7 @@ if sys.platform == "win32":
|
||||
EofChar: _CField[Incomplete, Incomplete, Incomplete]
|
||||
EvtChar: _CField[Incomplete, Incomplete, Incomplete]
|
||||
wReserved1: _CField[Incomplete, Incomplete, Incomplete]
|
||||
|
||||
DCB: TypeAlias = _DCB
|
||||
|
||||
class _COMMTIMEOUTS(Structure):
|
||||
@@ -80,6 +84,7 @@ if sys.platform == "win32":
|
||||
ReadTotalTimeoutConstant: _CField[Incomplete, Incomplete, Incomplete]
|
||||
WriteTotalTimeoutMultiplier: _CField[Incomplete, Incomplete, Incomplete]
|
||||
WriteTotalTimeoutConstant: _CField[Incomplete, Incomplete, Incomplete]
|
||||
|
||||
COMMTIMEOUTS: TypeAlias = _COMMTIMEOUTS
|
||||
|
||||
GetLastError: _NamedFuncPointer
|
||||
@@ -159,4 +164,5 @@ if sys.platform == "win32":
|
||||
class N11_OVERLAPPED4DOLLAR_484DOLLAR_49E(Structure):
|
||||
Offset: _CField[Incomplete, Incomplete, Incomplete]
|
||||
OffsetHigh: _CField[Incomplete, Incomplete, Incomplete]
|
||||
|
||||
PVOID: TypeAlias = c_void_p
|
||||
|
||||
@@ -106,11 +106,13 @@ class ClusterGrid(Grid):
|
||||
dendrogram_col: _DendrogramPlotter | None
|
||||
def __init__(
|
||||
self,
|
||||
data: _ListLikeU
|
||||
| DataFrame
|
||||
| dict[Incomplete, Incomplete]
|
||||
| Iterable[_ListLikeU | tuple[Hashable, _ListLikeU] | dict[Incomplete, Incomplete]]
|
||||
| None,
|
||||
data: (
|
||||
_ListLikeU
|
||||
| DataFrame
|
||||
| dict[Incomplete, Incomplete]
|
||||
| Iterable[_ListLikeU | tuple[Hashable, _ListLikeU] | dict[Incomplete, Incomplete]]
|
||||
| None
|
||||
),
|
||||
pivot_kws: Mapping[str, Incomplete] | None = None,
|
||||
z_score: int | None = None,
|
||||
standard_scale: int | None = None,
|
||||
@@ -166,11 +168,13 @@ class ClusterGrid(Grid):
|
||||
) -> Self: ...
|
||||
|
||||
def clustermap(
|
||||
data: _ListLikeU
|
||||
| DataFrame
|
||||
| dict[Incomplete, Incomplete]
|
||||
| Iterable[_ListLikeU | tuple[Hashable, _ListLikeU] | dict[Incomplete, Incomplete]]
|
||||
| None,
|
||||
data: (
|
||||
_ListLikeU
|
||||
| DataFrame
|
||||
| dict[Incomplete, Incomplete]
|
||||
| Iterable[_ListLikeU | tuple[Hashable, _ListLikeU] | dict[Incomplete, Incomplete]]
|
||||
| None
|
||||
),
|
||||
*,
|
||||
pivot_kws: dict[str, Incomplete] | None = None,
|
||||
method: str = "average",
|
||||
|
||||
@@ -93,6 +93,7 @@ class RaggedFeature(NamedTuple):
|
||||
|
||||
class UniformRowLength(NamedTuple): # type: ignore[misc]
|
||||
length: int
|
||||
|
||||
dtype: DTypeLike
|
||||
value_key: str | None = ...
|
||||
partitions: tuple[RowSplits | RowLengths | RowStarts | RowLimits | ValueRowIds | UniformRowLength, ...] = ... # type: ignore[name-defined]
|
||||
|
||||
Reference in New Issue
Block a user