Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions stdlib/_curses_panel.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from _curses import window
from _curses import window as _window
from typing import Final, final

__version__: Final[str]
Expand All @@ -14,14 +14,14 @@ class panel:
def hidden(self) -> bool: ...
def hide(self) -> None: ...
def move(self, y: int, x: int, /) -> None: ...
def replace(self, win: window, /) -> None: ...
def replace(self, win: _window, /) -> None: ...
def set_userptr(self, obj: object, /) -> None: ...
def show(self) -> None: ...
def top(self) -> None: ...
def userptr(self) -> object: ...
def window(self) -> window: ...
def window(self) -> _window: ...

def bottom_panel() -> panel: ...
def new_panel(win: window, /) -> panel: ...
def new_panel(win: _window, /) -> panel: ...
def top_panel() -> panel: ...
def update_panels() -> panel: ...
5 changes: 3 additions & 2 deletions stdlib/multiprocessing/managers.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import builtins
import queue
import sys
import threading
Expand Down Expand Up @@ -359,9 +360,9 @@ class SyncManager(BaseManager):
@overload
def dict(self, iterable: Iterable[tuple[str, _VT]], /, **kwargs: _VT) -> DictProxy[str, _VT]: ...
@overload
def dict(self, iterable: Iterable[list[str]], /) -> DictProxy[str, str]: ...
def dict(self, iterable: Iterable[builtins.list[str]], /) -> DictProxy[str, str]: ...
@overload
def dict(self, iterable: Iterable[list[bytes]], /) -> DictProxy[bytes, bytes]: ...
def dict(self, iterable: Iterable[builtins.list[bytes]], /) -> DictProxy[bytes, bytes]: ...

# Overloads are copied from builtins.list.__init__
@overload
Expand Down
4 changes: 2 additions & 2 deletions stdlib/multiprocessing/pool.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from collections.abc import Callable, Iterable, Mapping
from multiprocessing.context import DefaultContext, Process
from multiprocessing.context import DefaultContext, Process as _Process
from types import GenericAlias, TracebackType
from typing import Any, Final, Generic, TypeVar
from typing_extensions import Self
Expand Down Expand Up @@ -50,7 +50,7 @@ class Pool:
context: Any | None = None,
) -> None: ...
@staticmethod
def Process(ctx: DefaultContext, *args: Any, **kwds: Any) -> Process: ...
def Process(ctx: DefaultContext, *args: Any, **kwds: Any) -> _Process: ...
def apply(self, func: Callable[..., _T], args: Iterable[Any] = (), kwds: Mapping[str, Any] = {}) -> _T: ...
def apply_async(
self,
Expand Down
31 changes: 21 additions & 10 deletions stdlib/sqlite3/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -269,28 +269,39 @@ class OperationalError(DatabaseError): ...
class ProgrammingError(DatabaseError): ...
class Warning(Exception): ...

_DataError: TypeAlias = DataError
_DatabaseError: TypeAlias = DatabaseError
_Error: TypeAlias = Error
_IntegrityError: TypeAlias = IntegrityError
_InterfaceError: TypeAlias = InterfaceError
_InternalError: TypeAlias = InternalError
_NotSupportedError: TypeAlias = NotSupportedError
_OperationalError: TypeAlias = OperationalError
_ProgrammingError: TypeAlias = ProgrammingError
_Warning: TypeAlias = Warning

@disjoint_base
class Connection:
@property
def DataError(self) -> type[DataError]: ...
def DataError(self) -> type[_DataError]: ...
@property
def DatabaseError(self) -> type[DatabaseError]: ...
def DatabaseError(self) -> type[_DatabaseError]: ...
@property
def Error(self) -> type[Error]: ...
def Error(self) -> type[_Error]: ...
@property
def IntegrityError(self) -> type[IntegrityError]: ...
def IntegrityError(self) -> type[_IntegrityError]: ...
@property
def InterfaceError(self) -> type[InterfaceError]: ...
def InterfaceError(self) -> type[_InterfaceError]: ...
@property
def InternalError(self) -> type[InternalError]: ...
def InternalError(self) -> type[_InternalError]: ...
@property
def NotSupportedError(self) -> type[NotSupportedError]: ...
def NotSupportedError(self) -> type[_NotSupportedError]: ...
@property
def OperationalError(self) -> type[OperationalError]: ...
def OperationalError(self) -> type[_OperationalError]: ...
@property
def ProgrammingError(self) -> type[ProgrammingError]: ...
def ProgrammingError(self) -> type[_ProgrammingError]: ...
@property
def Warning(self) -> type[Warning]: ...
def Warning(self) -> type[_Warning]: ...
@property
def in_transaction(self) -> bool: ...
isolation_level: _IsolationLevel
Expand Down
4 changes: 2 additions & 2 deletions stubs/Markdown/markdown/blockparser.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ from collections.abc import Iterable
from typing import Any, TypeVar
from xml.etree.ElementTree import Element, ElementTree

from markdown import blockprocessors, util
from markdown import blockprocessors as _blockprocessors, util
from markdown.core import Markdown

_T = TypeVar("_T")
Expand All @@ -13,7 +13,7 @@ class State(list[_T]):
def isstate(self, state: _T) -> bool: ...

class BlockParser:
blockprocessors: util.Registry[blockprocessors.BlockProcessor]
blockprocessors: util.Registry[_blockprocessors.BlockProcessor]
state: State[Any] # TODO: possible to get rid of Any?
md: Markdown
def __init__(self, md: Markdown) -> None: ...
Expand Down
14 changes: 10 additions & 4 deletions stubs/Markdown/markdown/core.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@ from typing import Any, ClassVar, Literal
from typing_extensions import Self
from xml.etree.ElementTree import Element

from . import blockparser, inlinepatterns, postprocessors, preprocessors, treeprocessors
from . import (
blockparser,
inlinepatterns,
postprocessors as _postprocessors,
preprocessors as _preprocessors,
treeprocessors as _treeprocessors,
)
from .extensions import Extension
from .util import HtmlStash, Registry

Expand All @@ -14,10 +20,10 @@ __all__ = ["Markdown", "markdown", "markdownFromFile"]
logger: Logger

class Markdown:
preprocessors: Registry[preprocessors.Preprocessor]
preprocessors: Registry[_preprocessors.Preprocessor]
inlinePatterns: Registry[inlinepatterns.Pattern]
treeprocessors: Registry[treeprocessors.Treeprocessor]
postprocessors: Registry[postprocessors.Postprocessor]
treeprocessors: Registry[_treeprocessors.Treeprocessor]
postprocessors: Registry[_postprocessors.Postprocessor]
parser: blockparser.BlockParser
htmlStash: HtmlStash
output_formats: ClassVar[dict[Literal["xhtml", "html"], Callable[[Element], str]]]
Expand Down
3 changes: 2 additions & 1 deletion stubs/WebOb/webob/cachecontrol.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import builtins
from _typeshed import SupportsItems
from collections.abc import Callable
from typing import Any, Generic, Literal, overload
Expand Down Expand Up @@ -68,7 +69,7 @@ class value_property(Generic[_T, _DefaultT, _NoneLiteral, _ScopeT]):

class CacheControl(Generic[_ScopeT]):
header_value: str
update_dict: type[UpdateDict]
update_dict: builtins.type[UpdateDict]
properties: dict[str, Any]
type: _ScopeT
def __init__(self, properties: dict[str, Any], type: _ScopeT) -> None: ...
Expand Down
2 changes: 1 addition & 1 deletion stubs/colorful/colorful/core.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class Colorful:
def __init__(self, colormode: _ColorModeType | None = None, colorpalette: _str | _PaletteType | None = None) -> None: ...

@property
def colorpalette(self) -> SupportsItems[str, str | tuple[int, int, int]] | None: ...
def colorpalette(self) -> SupportsItems[_str, _str | tuple[int, int, int]] | None: ...
@colorpalette.setter
def colorpalette(self, colorpalette: _str | _PaletteType) -> None: ...

Expand Down
4 changes: 3 additions & 1 deletion stubs/docker/docker/models/configs.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import builtins

from .resource import Collection, Model

class Config(Model):
Expand All @@ -10,4 +12,4 @@ class ConfigCollection(Collection[Config]):
model: type[Config]
def create(self, **kwargs) -> Config: ... # type: ignore[override]
def get(self, config_id: str) -> Config: ...
def list(self, **kwargs) -> list[Config]: ...
def list(self, **kwargs) -> builtins.list[Config]: ...
Loading
Loading