A new shade of Black (#11362)

This commit is contained in:
Alex Waygood
2024-02-05 00:38:55 +00:00
committed by GitHub
parent 7a6a749449
commit c49c84f319
76 changed files with 190 additions and 106 deletions

View File

@@ -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: ...

View File

@@ -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

View File

@@ -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

View File

@@ -13,6 +13,7 @@ class Address(Resource):
Ground: str
Electronic: str
ShipToStore: str
@staticmethod
def create(params: Incomplete | None = None): ...
@staticmethod

View File

@@ -7,6 +7,7 @@ class ApplePayCard(Resource):
AmEx: str
MasterCard: str
Visa: str
is_expired: Any
subscriptions: Any
def __init__(self, gateway, attributes) -> None: ...

View File

@@ -35,6 +35,7 @@ class CreditCard(Resource):
Yes: str
No: str
Unknown: str
Commercial: Any
DurbinRegulated: Any
Debit: Any

View File

@@ -12,6 +12,7 @@ class CreditCardVerification(AttributeGetter):
GatewayRejected: str
ProcessorDeclined: str
Verified: str
amount: Any
currency_iso_code: Any
processor_response_code: Any

View File

@@ -8,6 +8,7 @@ class Disbursement(Resource):
class Type:
Credit: str
Debit: str
amount: Any
merchant_account: Any
def __init__(self, gateway, attributes) -> None: ...

View File

@@ -40,6 +40,7 @@ class Dispute(AttributeGetter):
Effortless: str
Standard: str
NotProtected: str
@staticmethod
def accept(id): ...
@staticmethod

View File

@@ -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

View File

@@ -5,5 +5,6 @@ class EuropeBankAccount(Resource):
class MandateType:
Business: str
Consumer: str
@staticmethod
def signature(): ...

View File

@@ -19,6 +19,7 @@ class MerchantAccount(Resource):
Bank: str
Email: str
MobilePhone: str
FundingDestinations: Any
individual_details: Any
business_details: Any

View File

@@ -30,6 +30,7 @@ class Subscription(Resource):
Expired: str
PastDue: str
Pending: str
@staticmethod
def create(params: Incomplete | None = None): ...
@staticmethod

View File

@@ -97,6 +97,7 @@ class Transaction(Resource):
Telephone: str
Laundry: str
Other: str
@staticmethod
def adjust_authorization(transaction_id, amount): ...
@staticmethod

View File

@@ -6,6 +6,7 @@ class TransactionLineItem(AttributeGetter):
class Kind:
Credit: str
Debit: str
def __init__(self, attributes) -> None: ...
@staticmethod
def find_all(transaction_id): ...

View File

@@ -17,6 +17,7 @@ class UsBankAccountVerification(AttributeGetter):
IndependentCheck: str
TokenizedCheck: str
MicroTransfers: str
us_bank_account: Any
def __init__(self, gateway, attributes) -> None: ...
@staticmethod

View File

@@ -27,6 +27,7 @@ class Http:
Xml: str
Multipart: str
Json: str
@staticmethod
def is_error_status(status): ...
@staticmethod

View File

@@ -59,6 +59,7 @@ class WebhookNotification(Resource):
TransactionDisbursed: str
TransactionSettled: str
TransactionSettlementDeclined: str
@staticmethod
def parse(signature, payload): ...
@staticmethod

View File

@@ -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: ...

View File

@@ -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: ...

View File

@@ -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: ...

View File

@@ -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: ...

View File

@@ -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: ...

View File

@@ -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

View File

@@ -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

View File

@@ -71,6 +71,7 @@ class ArborescenceIterator:
class Partition:
mst_weight: float
partition_dict: dict[Incomplete, Incomplete]
G: Incomplete
weight: Incomplete
minimum: Incomplete

View File

@@ -34,6 +34,7 @@ class SpanningTreeIterator:
class Partition:
mst_weight: float
partition_dict: dict[Incomplete, Incomplete]
G: Incomplete
weight: Incomplete
minimum: Incomplete

View File

@@ -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: ...

View File

@@ -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]

View File

@@ -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: ...

View File

@@ -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

View File

@@ -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): ...

View File

@@ -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): ...

View File

@@ -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): ...

View File

@@ -15,6 +15,7 @@ class TimeMixIn:
def utcoffset(self, dt): ...
def tzname(self, dt): ...
def dst(self, dt): ...
UTC: FixedOffset
@property
def asDateTime(self): ...

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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",

View File

@@ -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]