mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-26 05:41:11 +08:00
Style: prefer type[Foo | Bar] over type[Foo] | type[Bar] (#10039)
This commit is contained in:
@@ -35,16 +35,16 @@ class IAB(BaseIdentifier):
|
||||
|
||||
class EUI(BaseIdentifier):
|
||||
def __init__(
|
||||
self, addr: EUI | int | str, version: int | None = None, dialect: type[mac_eui48] | type[eui64_base] | None = None
|
||||
self, addr: EUI | int | str, version: int | None = None, dialect: type[mac_eui48 | eui64_base] | None = None
|
||||
) -> None: ...
|
||||
@property
|
||||
def value(self) -> int: ...
|
||||
@value.setter
|
||||
def value(self, value: str | SupportsInt | SupportsIndex) -> None: ...
|
||||
@property
|
||||
def dialect(self) -> type[mac_eui48] | type[eui64_base]: ...
|
||||
def dialect(self) -> type[mac_eui48 | eui64_base]: ...
|
||||
@dialect.setter
|
||||
def dialect(self, value: type[mac_eui48] | type[eui64_base] | None) -> None: ...
|
||||
def dialect(self, value: type[mac_eui48 | eui64_base] | None) -> None: ...
|
||||
@property
|
||||
def oui(self) -> OUI: ...
|
||||
@property
|
||||
@@ -81,4 +81,4 @@ class EUI(BaseIdentifier):
|
||||
def ipv6_link_local(self) -> IPAddress: ...
|
||||
@property
|
||||
def info(self) -> DictDotLookup: ...
|
||||
def format(self, dialect: type[mac_eui48] | type[eui64_base] | None = None) -> str: ...
|
||||
def format(self, dialect: type[mac_eui48 | eui64_base] | None = None) -> str: ...
|
||||
|
||||
@@ -26,7 +26,7 @@ class IABIndexParser(Publisher):
|
||||
def parse(self) -> None: ...
|
||||
|
||||
def create_index_from_registry(
|
||||
registry_fh: BinaryIO | FileDescriptorOrPath, index_path: StrOrBytesPath, parser: type[OUIIndexParser] | type[IABIndexParser]
|
||||
registry_fh: BinaryIO | FileDescriptorOrPath, index_path: StrOrBytesPath, parser: type[OUIIndexParser | IABIndexParser]
|
||||
) -> None: ...
|
||||
def create_indices() -> None: ...
|
||||
def load_index(index: _INDEX, fp: Iterable[bytes]) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user