mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-08-14 20:11:07 +08:00
Add __all__ (#13704)
This commit is contained in:
@@ -1,19 +1,2 @@
|
||||
# TODO: missing from stub
|
||||
boltons.debugutils.__all__
|
||||
boltons.dictutils.__all__
|
||||
boltons.excutils.__all__
|
||||
boltons.fileutils.__all__
|
||||
boltons.formatutils.__all__
|
||||
boltons.gcutils.__all__
|
||||
boltons.jsonutils.__all__
|
||||
boltons.listutils.__all__
|
||||
boltons.namedutils.__all__
|
||||
boltons.pathutils.__all__
|
||||
boltons.queueutils.__all__
|
||||
boltons.setutils.__all__
|
||||
boltons.strutils.__all__
|
||||
boltons.tableutils.__all__
|
||||
boltons.tbutils.__all__
|
||||
|
||||
boltons.funcutils.CachedInstancePartial.__partialmethod__
|
||||
boltons.funcutils.InstancePartial.__partialmethod__
|
||||
|
||||
@@ -6,3 +6,5 @@ def pdb_on_exception(limit: int = 100) -> None: ...
|
||||
def wrap_trace(
|
||||
obj, hook: Callable[..., Any] = ..., which: str | None = None, events: str | None = None, label: str | None = None
|
||||
): ...
|
||||
|
||||
__all__ = ["pdb_on_signal", "pdb_on_exception", "wrap_trace"]
|
||||
|
||||
@@ -99,3 +99,5 @@ class FrozenDict(dict[_KT, _VT]):
|
||||
def popitem(self, *a, **kw) -> NoReturn: ...
|
||||
def setdefault(self, *a, **kw) -> NoReturn: ...
|
||||
def clear(self, *a, **kw) -> NoReturn: ...
|
||||
|
||||
__all__ = ["MultiDict", "OMD", "OrderedMultiDict", "OneToOne", "ManyToMany", "subdict", "FrozenDict"]
|
||||
|
||||
@@ -7,3 +7,5 @@ class ExceptionCauseMixin(Exception):
|
||||
def get_str(self) -> str: ...
|
||||
|
||||
class MathError(ExceptionCauseMixin, ValueError): ...
|
||||
|
||||
__all__ = ["ExceptionCauseMixin"]
|
||||
|
||||
@@ -91,3 +91,5 @@ class DummyFile:
|
||||
def __next__(self) -> NoReturn: ...
|
||||
def __enter__(self) -> None: ...
|
||||
def __exit__(self, exc_type, exc_val, exc_tb) -> None: ...
|
||||
|
||||
__all__ = ["mkdir_p", "atomic_save", "AtomicSaver", "FilePerms", "iter_find_files", "copytree"]
|
||||
|
||||
@@ -35,3 +35,12 @@ class DeferredValue(Generic[_T]):
|
||||
def __float__(self) -> float: ...
|
||||
def __unicode__(self) -> str: ...
|
||||
def __format__(self, fmt: str) -> str: ...
|
||||
|
||||
__all__ = [
|
||||
"DeferredValue",
|
||||
"get_format_args",
|
||||
"tokenize_format_str",
|
||||
"construct_format_field_str",
|
||||
"infer_positional_format_args",
|
||||
"BaseFormatField",
|
||||
]
|
||||
|
||||
@@ -12,3 +12,5 @@ class GCToggler:
|
||||
|
||||
toggle_gc: GCToggler
|
||||
toggle_gc_postcollect: GCToggler
|
||||
|
||||
__all__ = ["get_all", "GCToggler", "toggle_gc", "toggle_gc_postcollect"]
|
||||
|
||||
@@ -23,3 +23,5 @@ class JSONLIterator:
|
||||
def __iter__(self) -> Self: ...
|
||||
def next(self) -> Any: ...
|
||||
__next__ = next
|
||||
|
||||
__all__ = ["JSONLIterator", "reverse_iter_lines"]
|
||||
|
||||
@@ -28,3 +28,5 @@ BList: TypeAlias = BarrelList[_T]
|
||||
class SplayList(list[_T]):
|
||||
def shift(self, item_index: int, dest_index: int = 0) -> None: ...
|
||||
def swap(self, item_index: SupportsIndex, dest_index: SupportsIndex) -> None: ...
|
||||
|
||||
__all__ = ["BList", "BarrelList"]
|
||||
|
||||
@@ -2,3 +2,5 @@ from collections.abc import Iterable
|
||||
|
||||
def namedtuple(typename: str, field_names: str | Iterable[str], verbose: bool = False, rename: bool = False): ...
|
||||
def namedlist(typename: str, field_names: str | Iterable[str], verbose: bool = False, rename: bool = False): ...
|
||||
|
||||
__all__ = ["namedlist", "namedtuple"]
|
||||
|
||||
@@ -11,3 +11,5 @@ def augpath(
|
||||
) -> str: ...
|
||||
def shrinkuser(path: StrPath, home: str = "~") -> str: ...
|
||||
def expandpath(path: StrPath) -> str: ...
|
||||
|
||||
__all__ = ["augpath", "shrinkuser", "expandpath"]
|
||||
|
||||
@@ -12,3 +12,5 @@ class HeapPriorityQueue(BasePriorityQueue): ...
|
||||
class SortedPriorityQueue(BasePriorityQueue): ...
|
||||
|
||||
PriorityQueue: TypeAlias = SortedPriorityQueue
|
||||
|
||||
__all__ = ["PriorityQueue", "BasePriorityQueue", "HeapPriorityQueue", "SortedPriorityQueue"]
|
||||
|
||||
@@ -97,3 +97,5 @@ class _ComplementSet:
|
||||
def __len__(self) -> int: ...
|
||||
def __iter__(self) -> Iterator[Any]: ...
|
||||
def __bool__(self) -> bool: ...
|
||||
|
||||
__all__ = ["IndexedSet", "complement"]
|
||||
|
||||
@@ -64,3 +64,38 @@ class MultiReplace:
|
||||
def multi_replace(text: str, sub_map: dict[str, str], **kwargs) -> str: ...
|
||||
def unwrap_text(text: str, ending: str | None = "\n\n") -> str: ...
|
||||
def removeprefix(text: str, prefix: str) -> str: ...
|
||||
|
||||
__all__ = [
|
||||
"camel2under",
|
||||
"under2camel",
|
||||
"slugify",
|
||||
"split_punct_ws",
|
||||
"unit_len",
|
||||
"ordinalize",
|
||||
"cardinalize",
|
||||
"pluralize",
|
||||
"singularize",
|
||||
"asciify",
|
||||
"is_ascii",
|
||||
"is_uuid",
|
||||
"html2text",
|
||||
"strip_ansi",
|
||||
"bytes2human",
|
||||
"find_hashtags",
|
||||
"a10n",
|
||||
"gzip_bytes",
|
||||
"gunzip_bytes",
|
||||
"iter_splitlines",
|
||||
"indent",
|
||||
"escape_shell_args",
|
||||
"args2cmd",
|
||||
"args2sh",
|
||||
"parse_int_list",
|
||||
"format_int_list",
|
||||
"complement_int_list",
|
||||
"int_ranges_from_int_list",
|
||||
"MultiReplace",
|
||||
"multi_replace",
|
||||
"unwrap_text",
|
||||
"removeprefix",
|
||||
]
|
||||
|
||||
@@ -61,3 +61,5 @@ class Table:
|
||||
): ...
|
||||
def get_cell_html(self, value): ...
|
||||
def to_text(self, with_headers: bool = True, maxlen: Incomplete | None = None): ...
|
||||
|
||||
__all__ = ["Table"]
|
||||
|
||||
@@ -93,3 +93,14 @@ class ParsedException:
|
||||
def from_string(cls, tb_str: str) -> Self: ...
|
||||
|
||||
ParsedTB = ParsedException
|
||||
|
||||
__all__ = [
|
||||
"ExceptionInfo",
|
||||
"TracebackInfo",
|
||||
"Callpoint",
|
||||
"ContextualExceptionInfo",
|
||||
"ContextualTracebackInfo",
|
||||
"ContextualCallpoint",
|
||||
"print_exception",
|
||||
"ParsedException",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user