mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-28 22:02:24 +08:00
Use _typeshed.FileDescriptorOrPath in stubs (#9695)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import _csv
|
||||
from _typeshed import StrOrBytesPath
|
||||
from _typeshed import FileDescriptorOrPath, StrOrBytesPath
|
||||
from collections.abc import Iterable
|
||||
from typing import Any, BinaryIO, TextIO
|
||||
from typing_extensions import TypeAlias
|
||||
@@ -12,21 +12,21 @@ IAB_INDEX: _INDEX
|
||||
|
||||
class FileIndexer(Subscriber):
|
||||
writer: _csv._writer
|
||||
def __init__(self, index_file: TextIO | StrOrBytesPath | int) -> None: ...
|
||||
def __init__(self, index_file: TextIO | FileDescriptorOrPath) -> None: ...
|
||||
def update(self, data: Iterable[Any]) -> None: ...
|
||||
|
||||
class OUIIndexParser(Publisher):
|
||||
fh: BinaryIO
|
||||
def __init__(self, ieee_file: BinaryIO | StrOrBytesPath | int) -> None: ...
|
||||
def __init__(self, ieee_file: BinaryIO | FileDescriptorOrPath) -> None: ...
|
||||
def parse(self) -> None: ...
|
||||
|
||||
class IABIndexParser(Publisher):
|
||||
fh: BinaryIO
|
||||
def __init__(self, ieee_file: BinaryIO | StrOrBytesPath | int) -> None: ...
|
||||
def __init__(self, ieee_file: BinaryIO | FileDescriptorOrPath) -> None: ...
|
||||
def parse(self) -> None: ...
|
||||
|
||||
def create_index_from_registry(
|
||||
registry_fh: BinaryIO | StrOrBytesPath | int, index_path: StrOrBytesPath, parser: type[OUIIndexParser] | type[IABIndexParser]
|
||||
registry_fh: BinaryIO | FileDescriptorOrPath, index_path: StrOrBytesPath, parser: type[OUIIndexParser] | type[IABIndexParser]
|
||||
) -> None: ...
|
||||
def create_indices() -> None: ...
|
||||
def load_index(index: _INDEX, fp: Iterable[bytes]) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user