Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion lib/ts_utils/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@

__all__ = [
"NoSuchStubError",
"StubMetadata",
"PackageDependencies",
"StubMetadata",
"StubtestSettings",
"get_recursive_requirements",
"read_dependencies",
Expand Down
4 changes: 0 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,6 @@ extend-safe-fixes = [
"UP036", # Remove unnecessary `sys.version_info` blocks
]
ignore = [
# TODO: Ruff 0.8.0 added sorting of __all__ and __slots_. Validate whether we want this in stubs
"RUF022",
"RUF023",

Comment on lines -74 to -77
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we decide to ignore, these should go in the .pyi-only ignores.

###
# Rules that can conflict with the formatter (Black)
# https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
Expand Down
8 changes: 4 additions & 4 deletions stdlib/__future__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ annotations: _Feature
all_feature_names: list[str] # undocumented

__all__ = [
"all_feature_names",
"absolute_import",
"all_feature_names",
"annotations",
"barry_as_FLUFL",
"division",
"generator_stop",
"generators",
"nested_scopes",
"print_function",
"unicode_literals",
"with_statement",
"barry_as_FLUFL",
"generator_stop",
"annotations",
]
32 changes: 16 additions & 16 deletions stdlib/_collections_abc.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -34,30 +34,30 @@ from typing import ( # noqa: Y022,Y038
)

__all__ = [
"Awaitable",
"Coroutine",
"AsyncGenerator",
"AsyncIterable",
"AsyncIterator",
"AsyncGenerator",
"Awaitable",
"Callable",
"Collection",
"Container",
"Coroutine",
"Generator",
"Hashable",
"ItemsView",
"Iterable",
"Iterator",
"Generator",
"Reversible",
"Sized",
"Container",
"Callable",
"Collection",
"Set",
"MutableSet",
"KeysView",
"Mapping",
"MutableMapping",
"MappingView",
"KeysView",
"ItemsView",
"ValuesView",
"Sequence",
"MutableMapping",
"MutableSequence",
"MutableSet",
"Reversible",
"Sequence",
"Set",
"Sized",
"ValuesView",
]
if sys.version_info < (3, 14):
from typing import ByteString as ByteString # noqa: Y057
Expand Down
2 changes: 1 addition & 1 deletion stdlib/_dummy_thread.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ from types import TracebackType
from typing import Any, NoReturn, overload
from typing_extensions import TypeVarTuple, Unpack

__all__ = ["error", "start_new_thread", "exit", "get_ident", "allocate_lock", "interrupt_main", "LockType", "RLock"]
__all__ = ["LockType", "RLock", "allocate_lock", "error", "exit", "get_ident", "interrupt_main", "start_new_thread"]

_Ts = TypeVarTuple("_Ts")

Expand Down
26 changes: 13 additions & 13 deletions stdlib/_dummy_threading.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,29 @@ from threading import (
)

__all__ = [
"get_ident",
"active_count",
"Condition",
"current_thread",
"enumerate",
"main_thread",
"TIMEOUT_MAX",
"Barrier",
"BoundedSemaphore",
"BrokenBarrierError",
"Condition",
"Event",
"ExceptHookArgs",
"Lock",
"RLock",
"Semaphore",
"BoundedSemaphore",
"Thread",
"Barrier",
"BrokenBarrierError",
"Timer",
"ThreadError",
"Timer",
"active_count",
"current_thread",
"enumerate",
"excepthook",
"get_ident",
"local",
"main_thread",
"setprofile",
"settrace",
"local",
"stack_size",
"ExceptHookArgs",
"excepthook",
]

def active_count() -> int: ...
Expand Down
2 changes: 1 addition & 1 deletion stdlib/_osx_support.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ _T = TypeVar("_T")
_K = TypeVar("_K")
_V = TypeVar("_V")

__all__ = ["compiler_fixup", "customize_config_vars", "customize_compiler", "get_platform_osx"]
__all__ = ["compiler_fixup", "customize_compiler", "customize_config_vars", "get_platform_osx"]

_UNIVERSAL_CONFIG_VARS: Final[tuple[str, ...]] # undocumented
_COMPILER_CONFIG_VARS: Final[tuple[str, ...]] # undocumented
Expand Down
54 changes: 27 additions & 27 deletions stdlib/_pydecimal.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,41 @@
from _decimal import *

__all__ = [
"Decimal",
"HAVE_CONTEXTVAR",
"HAVE_THREADS",
"MAX_EMAX",
"MAX_PREC",
"MIN_EMIN",
"MIN_ETINY",
"ROUND_05UP",
"ROUND_CEILING",
"ROUND_DOWN",
"ROUND_FLOOR",
"ROUND_HALF_DOWN",
"ROUND_HALF_EVEN",
"ROUND_HALF_UP",
"ROUND_UP",
"BasicContext",
"Clamped",
"Context",
"ConversionSyntax",
"Decimal",
"DecimalException",
"DecimalTuple",
"DefaultContext",
"BasicContext",
"ExtendedContext",
"DecimalException",
"Clamped",
"InvalidOperation",
"DivisionByZero",
"DivisionImpossible",
"DivisionUndefined",
"ExtendedContext",
"FloatOperation",
"Inexact",
"InvalidContext",
"InvalidOperation",
"Overflow",
"Rounded",
"Subnormal",
"Overflow",
"Underflow",
"FloatOperation",
"DivisionImpossible",
"InvalidContext",
"ConversionSyntax",
"DivisionUndefined",
"ROUND_DOWN",
"ROUND_HALF_UP",
"ROUND_HALF_EVEN",
"ROUND_CEILING",
"ROUND_FLOOR",
"ROUND_UP",
"ROUND_HALF_DOWN",
"ROUND_05UP",
"setcontext",
"getcontext",
"localcontext",
"MAX_PREC",
"MAX_EMAX",
"MIN_EMIN",
"MIN_ETINY",
"HAVE_THREADS",
"HAVE_CONTEXTVAR",
"setcontext",
]
22 changes: 11 additions & 11 deletions stdlib/argparse.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@ from typing import IO, Any, Final, Generic, NewType, NoReturn, Protocol, TypeVar
from typing_extensions import Self, TypeAlias, deprecated

__all__ = [
"ArgumentParser",
"ArgumentError",
"ArgumentTypeError",
"FileType",
"HelpFormatter",
"ArgumentDefaultsHelpFormatter",
"RawDescriptionHelpFormatter",
"RawTextHelpFormatter",
"MetavarTypeHelpFormatter",
"Namespace",
"Action",
"ONE_OR_MORE",
"OPTIONAL",
"PARSER",
"REMAINDER",
"SUPPRESS",
"ZERO_OR_MORE",
"Action",
"ArgumentDefaultsHelpFormatter",
"ArgumentError",
"ArgumentParser",
"ArgumentTypeError",
"FileType",
"HelpFormatter",
"MetavarTypeHelpFormatter",
"Namespace",
"RawDescriptionHelpFormatter",
"RawTextHelpFormatter",
]

if sys.version_info >= (3, 9):
Expand Down
4 changes: 2 additions & 2 deletions stdlib/asyncio/coroutines.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ from typing import Any, TypeVar, overload
from typing_extensions import ParamSpec, TypeGuard, TypeIs

if sys.version_info >= (3, 11):
__all__ = ("iscoroutinefunction", "iscoroutine")
__all__ = ("iscoroutine", "iscoroutinefunction")
else:
__all__ = ("coroutine", "iscoroutinefunction", "iscoroutine")
__all__ = ("coroutine", "iscoroutine", "iscoroutinefunction")

_T = TypeVar("_T")
_FunctionT = TypeVar("_FunctionT", bound=Callable[..., Any])
Expand Down
30 changes: 15 additions & 15 deletions stdlib/asyncio/events.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -24,37 +24,37 @@ from .unix_events import AbstractChildWatcher

if sys.version_info >= (3, 14):
__all__ = (
"AbstractEventLoopPolicy",
"AbstractEventLoop",
"AbstractEventLoopPolicy",
"AbstractServer",
"Handle",
"TimerHandle",
"get_event_loop_policy",
"set_event_loop_policy",
"get_event_loop",
"set_event_loop",
"new_event_loop",
"_get_running_loop",
"_set_running_loop",
"get_event_loop",
"get_event_loop_policy",
"get_running_loop",
"_get_running_loop",
"new_event_loop",
"set_event_loop",
"set_event_loop_policy",
)
else:
__all__ = (
"AbstractEventLoopPolicy",
"AbstractEventLoop",
"AbstractEventLoopPolicy",
"AbstractServer",
"Handle",
"TimerHandle",
"get_event_loop_policy",
"set_event_loop_policy",
"_get_running_loop",
"_set_running_loop",
"get_child_watcher",
"get_event_loop",
"set_event_loop",
"get_event_loop_policy",
"get_running_loop",
"new_event_loop",
"get_child_watcher",
"set_child_watcher",
"_set_running_loop",
"get_running_loop",
"_get_running_loop",
"set_event_loop",
"set_event_loop_policy",
)

_T = TypeVar("_T")
Expand Down
8 changes: 4 additions & 4 deletions stdlib/asyncio/exceptions.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ if sys.version_info >= (3, 11):
__all__ = (
"BrokenBarrierError",
"CancelledError",
"InvalidStateError",
"TimeoutError",
"IncompleteReadError",
"InvalidStateError",
"LimitOverrunError",
"SendfileNotAvailableError",
"TimeoutError",
)
else:
__all__ = (
"CancelledError",
"InvalidStateError",
"TimeoutError",
"IncompleteReadError",
"InvalidStateError",
"LimitOverrunError",
"SendfileNotAvailableError",
"TimeoutError",
)

class CancelledError(BaseException): ...
Expand Down
2 changes: 1 addition & 1 deletion stdlib/asyncio/futures.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ from typing_extensions import TypeIs

from .events import AbstractEventLoop

__all__ = ("Future", "wrap_future", "isfuture")
__all__ = ("Future", "isfuture", "wrap_future")

_T = TypeVar("_T")

Expand Down
4 changes: 2 additions & 2 deletions stdlib/asyncio/locks.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ else:
_LoopBoundMixin = object

if sys.version_info >= (3, 11):
__all__ = ("Lock", "Event", "Condition", "Semaphore", "BoundedSemaphore", "Barrier")
__all__ = ("Barrier", "BoundedSemaphore", "Condition", "Event", "Lock", "Semaphore")
else:
__all__ = ("Lock", "Event", "Condition", "Semaphore", "BoundedSemaphore")
__all__ = ("BoundedSemaphore", "Condition", "Event", "Lock", "Semaphore")

_T = TypeVar("_T")

Expand Down
2 changes: 1 addition & 1 deletion stdlib/asyncio/protocols.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ from _typeshed import ReadableBuffer
from asyncio import transports
from typing import Any

__all__ = ("BaseProtocol", "Protocol", "DatagramProtocol", "SubprocessProtocol", "BufferedProtocol")
__all__ = ("BaseProtocol", "BufferedProtocol", "DatagramProtocol", "Protocol", "SubprocessProtocol")

class BaseProtocol:
def connection_made(self, transport: transports.BaseTransport) -> None: ...
Expand Down
4 changes: 2 additions & 2 deletions stdlib/asyncio/queues.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ class QueueEmpty(Exception): ...
class QueueFull(Exception): ...

if sys.version_info >= (3, 13):
__all__ = ("Queue", "PriorityQueue", "LifoQueue", "QueueFull", "QueueEmpty", "QueueShutDown")
__all__ = ("LifoQueue", "PriorityQueue", "Queue", "QueueEmpty", "QueueFull", "QueueShutDown")

else:
__all__ = ("Queue", "PriorityQueue", "LifoQueue", "QueueFull", "QueueEmpty")
__all__ = ("LifoQueue", "PriorityQueue", "Queue", "QueueEmpty", "QueueFull")

_T = TypeVar("_T")

Expand Down
Loading
Loading