mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-85814 Update typeshed version to 8c7256c8fdcac67f08db1c22db0776fde6a25349
GitOrigin-RevId: e23250b130ea94d28deaebff9348372ff6cd8a00
This commit is contained in:
committed by
intellij-monorepo-bot
parent
f9b2271290
commit
8a10d69df1
+2
-8
@@ -62,11 +62,7 @@ jobs:
|
||||
sudo apt-get update -q && sudo apt-get install -qy $PACKAGES
|
||||
fi
|
||||
- name: Run mypy_test.py
|
||||
run: |
|
||||
# python-version can sometimes be pinned to a specific version or to "-dev", but
|
||||
# mypy understands only X.Y version numbers.
|
||||
MYPY_PY_VERSION=$(echo ${{ matrix.python-version }} | cut -d - -f 1 | cut -d . -f 1-2)
|
||||
python ./tests/mypy_test.py --platform=${{ matrix.platform }} --python-version=${MYPY_PY_VERSION}
|
||||
run: python ./tests/mypy_test.py --platform=${{ matrix.platform }} --python-version=${{ matrix.python-version }}
|
||||
|
||||
regression-tests:
|
||||
name: "mypy: Run test cases"
|
||||
@@ -75,9 +71,7 @@ jobs:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-python@v6
|
||||
with:
|
||||
# Use py311 for now, as py312 seems to be around 30s slower in CI
|
||||
# TODO: figure out why that is (#11590)
|
||||
python-version: "3.11"
|
||||
python-version: "3.14"
|
||||
- uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
version-file: "requirements-tests.txt"
|
||||
|
||||
@@ -26,6 +26,7 @@ exclude = [
|
||||
]
|
||||
|
||||
[tool.ruff.lint]
|
||||
future-annotations = true
|
||||
# Disable all rules on test cases by default:
|
||||
# test cases often deliberately contain code
|
||||
# that might not be considered idiomatic or modern.
|
||||
@@ -69,15 +70,22 @@ select = [
|
||||
# Only include flake8-annotations rules that are autofixable. Otherwise leave this to mypy+pyright
|
||||
"ANN2",
|
||||
# Most refurb rules are in preview and can be opinionated,
|
||||
# consider them individually as they come out of preview (last check: 0.8.4)
|
||||
# consider them individually as they come out of preview (last check: 0.13.1)
|
||||
"FURB105", # Unnecessary empty string passed to `print`
|
||||
"FURB116", # Replace `{function_name}` call with `{display}`
|
||||
"FURB122", # Use of `{}.write` in a for loop
|
||||
"FURB129", # Instead of calling `readlines()`, iterate over file object directly
|
||||
"FURB132", # Use `{suggestion}` instead of `check` and `remove`
|
||||
"FURB136", # Replace `if` expression with `{min_max}` call
|
||||
"FURB157", # Verbose expression in `Decimal` constructor
|
||||
"FURB162", # Unnecessary timezone replacement with zero offset
|
||||
"FURB166", # Use of `int` with explicit `base={base}` after removing prefix
|
||||
"FURB167", # Use of regular expression alias `re.{}`
|
||||
"FURB168", # Prefer `is` operator over `isinstance` to check if an object is `None`
|
||||
"FURB169", # Compare the identities of `{object}` and None instead of their respective types
|
||||
"FURB177", # Prefer `Path.cwd()` over `Path().resolve()` for current-directory lookups
|
||||
"FURB187", # Use of assignment of `reversed` on list `{name}`
|
||||
"FURB188", # Prefer `str.removeprefix()` over conditionally replacing with slice.
|
||||
# Used for lint.flake8-import-conventions.aliases
|
||||
"ICN001", # `{name}` should be imported as `{asname}`
|
||||
# PYI: only enable rules that have autofixes and that we always want to fix (even manually),
|
||||
@@ -89,6 +97,7 @@ select = [
|
||||
"PYI014", # Only simple default values allowed for arguments
|
||||
"PYI015", # Only simple default values allowed for assignments
|
||||
"PYI016", # Duplicate union member `{}`
|
||||
"PYI018", # Private `{type_var_like_kind}` `{type_var_like_name}` is never used
|
||||
"PYI019", # Methods like `{method_name}` should return `Self` instead of a custom `TypeVar`
|
||||
"PYI020", # Quoted annotations should not be included in stubs
|
||||
"PYI025", # Use `from collections.abc import Set as AbstractSet` to avoid confusion with the `set` builtin
|
||||
@@ -99,7 +108,8 @@ select = [
|
||||
"PYI044", # `from __future__ import annotations` has no effect in stub files, since type checkers automatically treat stubs as having those semantics
|
||||
"PYI055", # Multiple `type[T]` usages in a union. Combine them into one, e.g., `type[{union_str}]`.
|
||||
"PYI058", # Use `{return_type}` as the return value for simple `{method}` methods
|
||||
# "PYI061", # TODO: Enable when out of preview
|
||||
# "PYI059", # TODO: Add when dropping Python 3.9 support
|
||||
"PYI061", # Use `None` rather than `Literal[None]`
|
||||
"PYI062", # Duplicate literal member `{}`
|
||||
"PYI064", # `Final[Literal[{literal}]]` can be replaced with a bare Final
|
||||
# flake8-simplify, excluding rules that can reduce performance or readability due to long line formatting
|
||||
@@ -124,6 +134,7 @@ select = [
|
||||
"SIM223", # Use `{expr}` instead of `{replaced}`
|
||||
"SIM300", # Yoda condition detected
|
||||
"SIM401", # Use `{contents}` instead of an if block
|
||||
"SIM905", # Consider using a list literal instead of `str.{}`
|
||||
"SIM910", # Use `{expected}` instead of `{actual}` (dict-get-with-none-default)
|
||||
"SIM911", # Use `{expected}` instead of `{actual}` (zip-dict-keys-and-values)
|
||||
# Don't include TC rules that create a TYPE_CHECKING block or stringifies annotations
|
||||
@@ -159,7 +170,7 @@ ignore = [
|
||||
# see https://github.com/astral-sh/ruff/issues/6465
|
||||
"E721", # Do not compare types, use `isinstance()`
|
||||
# Highly opinionated, and it's often necessary to violate it
|
||||
"PLC0415", # `import` should be at the top-level of a file
|
||||
"PLC0415", # `import` should be at the top-level of a file
|
||||
# Leave the size and complexity of tests to human interpretation
|
||||
"PLR09", # Too many ...
|
||||
# Too many magic number "2" that are preferable inline. https://github.com/astral-sh/ruff/issues/10009
|
||||
@@ -175,7 +186,6 @@ ignore = [
|
||||
"TD003", # Missing issue link for this TODO
|
||||
# Mostly from scripts and tests, it's ok to have messages passed directly to exceptions
|
||||
"TRY003", # Avoid specifying long messages outside the exception class
|
||||
"PLC0205", # Sometimes __slots__ really is a string at runtime
|
||||
###
|
||||
# False-positives, but already checked by type-checkers
|
||||
###
|
||||
@@ -206,6 +216,8 @@ ignore = [
|
||||
# Most pep8-naming rules don't apply for third-party stubs like typeshed.
|
||||
# N811 to N814 could apply, but we often use them to disambiguate a name whilst making it look like a more common one
|
||||
"N8", # pep8-naming
|
||||
# Sometimes __slots__ really is a string at runtime
|
||||
"PLC0205", # Class `__slots__` should be a non-string iterable
|
||||
# Stubs are allowed to use private variables (pyright's reportPrivateUsage is also disabled)
|
||||
"PLC2701", # Private name import from external module
|
||||
# Names in stubs should match implementation
|
||||
|
||||
@@ -28,8 +28,6 @@
|
||||
// No effect in stubs
|
||||
"reportMissingSuperCall": "none",
|
||||
"reportUninitializedInstanceVariable": "none",
|
||||
// stdlib stubs trigger reportShadowedImports
|
||||
"reportShadowedImports": "none",
|
||||
// Stubs are allowed to use private variables
|
||||
"reportPrivateUsage": "none",
|
||||
// Stubs don't need the actual modules to be installed
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
"reportImplicitStringConcatenation": "none",
|
||||
// Extra strict settings
|
||||
"reportMissingModuleSource": "error",
|
||||
"reportShadowedImports": "error",
|
||||
"reportCallInDefaultInitializer": "error",
|
||||
"reportPropertyTypeMismatch": "error",
|
||||
"reportUninitializedInstanceVariable": "error",
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
"stubs/boltons",
|
||||
"stubs/braintree",
|
||||
"stubs/cffi",
|
||||
"stubs/colorful",
|
||||
"stubs/dateparser",
|
||||
"stubs/defusedxml",
|
||||
"stubs/docker",
|
||||
@@ -79,7 +80,6 @@
|
||||
"stubs/PyMySQL",
|
||||
"stubs/python-dateutil",
|
||||
"stubs/python-jose",
|
||||
"stubs/pytz/pytz/lazy.pyi",
|
||||
"stubs/pywin32",
|
||||
"stubs/PyYAML",
|
||||
"stubs/reportlab",
|
||||
@@ -88,6 +88,7 @@
|
||||
"stubs/seaborn",
|
||||
"stubs/setuptools/setuptools",
|
||||
"stubs/shapely",
|
||||
"stubs/simple-websocket",
|
||||
"stubs/tensorflow",
|
||||
"stubs/tqdm",
|
||||
"stubs/vobject",
|
||||
@@ -107,8 +108,6 @@
|
||||
// No effect in stubs
|
||||
"reportMissingSuperCall": "none",
|
||||
"reportUninitializedInstanceVariable": "none",
|
||||
// stdlib stubs trigger reportShadowedImports
|
||||
"reportShadowedImports": "none",
|
||||
// Stubs are allowed to use private variables
|
||||
"reportPrivateUsage": "none",
|
||||
// Stubs don't need the actual modules to be installed
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
],
|
||||
"typeCheckingMode": "strict",
|
||||
// Extra strict settings
|
||||
"reportShadowedImports": "error", // Don't accidentally name a file something that shadows stdlib
|
||||
"reportImplicitStringConcatenation": "error",
|
||||
"reportUninitializedInstanceVariable": "error",
|
||||
"reportUnnecessaryTypeIgnoreComment": "error",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Type checkers that we test our stubs against. These should always
|
||||
# be pinned to a specific version to make failure reproducible.
|
||||
mypy==1.18.2
|
||||
pyright==1.1.406
|
||||
pyright==1.1.407
|
||||
|
||||
# Libraries used by our various scripts.
|
||||
aiohttp==3.12.15
|
||||
@@ -19,7 +19,7 @@ termcolor>=2.3
|
||||
tomli==2.2.1; python_version < "3.11"
|
||||
tomlkit==0.13.3
|
||||
typing_extensions>=4.15.0rc1
|
||||
uv==0.9.5
|
||||
uv==0.9.6
|
||||
|
||||
# Utilities for typeshed infrastructure scripts.
|
||||
ts_utils @ file:lib
|
||||
|
||||
@@ -161,7 +161,7 @@ class Obsolete:
|
||||
@dataclass
|
||||
class Remove:
|
||||
distribution: str
|
||||
reason: str
|
||||
reason: Literal["ships py.typed file", "unmaintained"]
|
||||
links: dict[str, str]
|
||||
|
||||
def __str__(self) -> str:
|
||||
@@ -171,7 +171,7 @@ class Remove:
|
||||
@dataclass
|
||||
class NoUpdate:
|
||||
distribution: str
|
||||
reason: str
|
||||
reason: Literal["obsolete", "no longer updated", "up to date"]
|
||||
|
||||
def __str__(self) -> str:
|
||||
return f"{colored('skipping', 'green')} ({self.reason})"
|
||||
@@ -642,7 +642,7 @@ async def determine_action_no_error_handling(
|
||||
"Typeshed release": f"{pypi_info.pypi_root}",
|
||||
"Typeshed stubs": f"https://github.com/{TYPESHED_OWNER}/typeshed/tree/main/stubs/{stub_info.distribution}",
|
||||
}
|
||||
return Remove(stub_info.distribution, reason="older than 6 months", links=links)
|
||||
return Remove(stub_info.distribution, reason="ships py.typed file", links=links)
|
||||
else:
|
||||
return NoUpdate(stub_info.distribution, "obsolete")
|
||||
if stub_info.no_longer_updated:
|
||||
@@ -654,7 +654,7 @@ async def determine_action_no_error_handling(
|
||||
"Typeshed release": f"{pypi_info.pypi_root}",
|
||||
"Typeshed stubs": f"https://github.com/{TYPESHED_OWNER}/typeshed/tree/main/stubs/{stub_info.distribution}",
|
||||
}
|
||||
return Remove(stub_info.distribution, reason="no longer updated", links=links)
|
||||
return Remove(stub_info.distribution, reason="unmaintained", links=links)
|
||||
else:
|
||||
return NoUpdate(stub_info.distribution, "no longer updated")
|
||||
|
||||
|
||||
@@ -170,6 +170,10 @@ sys.ps1 # Available in interactive mode
|
||||
sys.ps2 # Available in interactive mode
|
||||
sys.tracebacklimit # Must be set first
|
||||
|
||||
# This is only present if Python was built with zlib-ng.
|
||||
(zlib\.ZLIBNG_VERSION)?
|
||||
(compression\.zlib\.ZLIBNG_VERSION)?
|
||||
|
||||
|
||||
# ==========================================================
|
||||
# Other allowlist entries that cannot or should not be fixed
|
||||
@@ -233,7 +237,6 @@ asyncio.locks.Condition.release
|
||||
builtins.memoryview.__contains__ # C type that implements __getitem__
|
||||
builtins.reveal_locals # Builtins that type checkers pretends exist
|
||||
builtins.reveal_type # Builtins that type checkers pretends exist
|
||||
builtins.type.__dict__ # read-only but not actually a property; stubtest thinks it's a mutable attribute.
|
||||
|
||||
# The following CodecInfo properties are added in __new__
|
||||
codecs.CodecInfo.decode
|
||||
|
||||
@@ -10,6 +10,14 @@
|
||||
(fcntl.F_SETLEASE)? # GNU extension
|
||||
|
||||
|
||||
# =======
|
||||
# <= 3.14
|
||||
# =======
|
||||
|
||||
# Added in Python 3.9.25, 3.10.20, 3.11.15, 3.12.13, 3.13.10, 3.14.1 (parameter `scripting`)
|
||||
html.parser.HTMLParser.__init__
|
||||
|
||||
|
||||
# ==========================================
|
||||
# Modules that do not exist on MacOS systems
|
||||
# ==========================================
|
||||
@@ -45,9 +53,6 @@ multiprocessing.popen_spawn_win32 # exists on Darwin but fails to import
|
||||
readline.append_history_file # Only available if compiled with GNU readline, not editline
|
||||
select.poll # Actually a function; we have a class so it can be used as a type
|
||||
|
||||
# Some of these exist on non-windows, but they are useless and this is not intended
|
||||
stat.FILE_ATTRIBUTE_[A-Z_]+
|
||||
|
||||
tkinter.Tk.createfilehandler # Methods that come from __getattr__() at runtime
|
||||
tkinter.Tk.deletefilehandler # Methods that come from __getattr__() at runtime
|
||||
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
# =======
|
||||
# <= 3.14
|
||||
# =======
|
||||
|
||||
# Added in Python 3.10.20 (parameter `scripting`)
|
||||
html.parser.HTMLParser.__init__
|
||||
|
||||
|
||||
# =============================================================
|
||||
# Allowlist entries that cannot or should not be fixed; <= 3.12
|
||||
# =============================================================
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
# =======
|
||||
# <= 3.14
|
||||
# =======
|
||||
|
||||
# Added in Python 3.11.15 (parameter `scripting`)
|
||||
html.parser.HTMLParser.__init__
|
||||
|
||||
|
||||
# =============================================================
|
||||
# Allowlist entries that cannot or should not be fixed; <= 3.12
|
||||
# =============================================================
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
# =======
|
||||
# <= 3.14
|
||||
# =======
|
||||
|
||||
# Added in Python 3.12.13 (parameter `scripting`)
|
||||
html.parser.HTMLParser.__init__
|
||||
|
||||
|
||||
# =============================================================
|
||||
# Allowlist entries that cannot or should not be fixed; <= 3.12
|
||||
# =============================================================
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
# =======
|
||||
# <= 3.14
|
||||
# =======
|
||||
|
||||
# Added in Python 3.13.10 (parameter `scripting`)
|
||||
html.parser.HTMLParser.__init__
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
# =======
|
||||
# <= 3.14
|
||||
# =======
|
||||
|
||||
# Added in Python 3.14.1 (parameter `scripting`)
|
||||
html.parser.HTMLParser.__init__
|
||||
@@ -54,9 +54,6 @@ _?socket.SOL_IPX
|
||||
_?socket.SOL_NETROM
|
||||
_?socket.SOL_ROSE
|
||||
|
||||
# Some of these exist on non-windows, but they are useless and this is not intended
|
||||
stat.FILE_ATTRIBUTE_[A-Z_]+
|
||||
|
||||
# This is available on Linux, but it's documented as for kernel debugging and
|
||||
# not present on GitHub Actions runners.
|
||||
termios.TIOCTTYGSTRUCT
|
||||
|
||||
@@ -40,6 +40,9 @@ concurrent.interpreters._queues.UNBOUND_REMOVE
|
||||
|
||||
importlib.util.Loader.exec_module # See Lib/importlib/_abc.py. Might be defined for backwards compatibility
|
||||
|
||||
# Condition functions are exported in __init__
|
||||
threading.Condition.locked
|
||||
multiprocessing.dummy.Condition.locked
|
||||
|
||||
# ====================================
|
||||
# Pre-existing errors from Python 3.13
|
||||
|
||||
@@ -9,6 +9,14 @@ _winapi.OpenFileMapping
|
||||
_winapi.VirtualQuerySize
|
||||
|
||||
|
||||
# =======
|
||||
# <= 3.14
|
||||
# =======
|
||||
|
||||
# Added in Python 3.9.25, 3.10.20, 3.11.15, 3.12.13, 3.13.10, 3.14.1 (parameter `scripting`)
|
||||
html.parser.HTMLParser.__init__
|
||||
|
||||
|
||||
# ============================================
|
||||
# Modules that do not exist on Windows systems
|
||||
# ============================================
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
class Meta(type): ...
|
||||
|
||||
|
||||
call = Meta.__dict__["__call__"]
|
||||
@@ -0,0 +1,58 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import io
|
||||
import sys
|
||||
from _typeshed import ReadableBuffer
|
||||
from bz2 import BZ2Decompressor
|
||||
from lzma import LZMADecompressor
|
||||
from typing import cast
|
||||
from typing_extensions import assert_type
|
||||
from zlib import decompressobj
|
||||
|
||||
if sys.version_info >= (3, 14):
|
||||
from compression._common._streams import DecompressReader, _Decompressor, _Reader
|
||||
from compression.zstd import ZstdDecompressor
|
||||
else:
|
||||
from _compression import DecompressReader, _Decompressor, _Reader
|
||||
|
||||
###
|
||||
# Tests for DecompressReader/_Decompressor
|
||||
###
|
||||
|
||||
|
||||
class CustomDecompressor:
|
||||
def decompress(self, data: ReadableBuffer, max_length: int = -1) -> bytes:
|
||||
return b""
|
||||
|
||||
@property
|
||||
def unused_data(self) -> bytes:
|
||||
return b""
|
||||
|
||||
@property
|
||||
def eof(self) -> bool:
|
||||
return False
|
||||
|
||||
@property
|
||||
def needs_input(self) -> bool:
|
||||
return False
|
||||
|
||||
|
||||
def accept_decompressor(d: _Decompressor) -> None:
|
||||
d.decompress(b"random bytes", 0)
|
||||
assert_type(d.eof, bool)
|
||||
assert_type(d.unused_data, bytes)
|
||||
|
||||
|
||||
fp = cast(_Reader, io.BytesIO(b"hello world"))
|
||||
DecompressReader(fp, decompressobj)
|
||||
DecompressReader(fp, BZ2Decompressor)
|
||||
DecompressReader(fp, LZMADecompressor)
|
||||
DecompressReader(fp, CustomDecompressor)
|
||||
accept_decompressor(decompressobj())
|
||||
accept_decompressor(BZ2Decompressor())
|
||||
accept_decompressor(LZMADecompressor())
|
||||
accept_decompressor(CustomDecompressor())
|
||||
|
||||
if sys.version_info >= (3, 14):
|
||||
DecompressReader(fp, ZstdDecompressor)
|
||||
accept_decompressor(ZstdDecompressor())
|
||||
@@ -62,7 +62,21 @@ class DCAtest:
|
||||
self._value = None
|
||||
|
||||
|
||||
if sys.version_info > (3, 10):
|
||||
# check that NotImplemented is treated as an "Any"
|
||||
x: int = NotImplemented
|
||||
|
||||
if sys.version_info >= (3, 10):
|
||||
# test NotImplementedType usage
|
||||
assert_type(NotImplemented, types.NotImplementedType)
|
||||
assert_type(types.NotImplementedType(), types.NotImplementedType)
|
||||
# test EllipsisType usage
|
||||
assert_type(Ellipsis, types.EllipsisType)
|
||||
assert_type(types.EllipsisType(), types.EllipsisType)
|
||||
# test NoneType usage (disabled, passes with pyright, but mypy errors
|
||||
# assert_type(None, types.NoneType)
|
||||
# assert_type(types.NoneType(), types.NoneType)
|
||||
|
||||
if sys.version_info >= (3, 11):
|
||||
union_type = int | list[_T]
|
||||
|
||||
# ideally this would be `_SpecialForm` (Union)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# _compression is replaced by compression._common._streams on Python 3.14+ (PEP-784)
|
||||
|
||||
from _typeshed import Incomplete, WriteableBuffer
|
||||
from _typeshed import ReadableBuffer, WriteableBuffer
|
||||
from collections.abc import Callable
|
||||
from io import DEFAULT_BUFFER_SIZE, BufferedIOBase, RawIOBase
|
||||
from typing import Any, Protocol, type_check_only
|
||||
@@ -13,13 +13,24 @@ class _Reader(Protocol):
|
||||
def seekable(self) -> bool: ...
|
||||
def seek(self, n: int, /) -> Any: ...
|
||||
|
||||
@type_check_only
|
||||
class _Decompressor(Protocol):
|
||||
def decompress(self, data: ReadableBuffer, /, max_length: int = ...) -> bytes: ...
|
||||
@property
|
||||
def unused_data(self) -> bytes: ...
|
||||
@property
|
||||
def eof(self) -> bool: ...
|
||||
# `zlib._Decompress` does not have next property, but `DecompressReader` calls it:
|
||||
# @property
|
||||
# def needs_input(self) -> bool: ...
|
||||
|
||||
class BaseStream(BufferedIOBase): ...
|
||||
|
||||
class DecompressReader(RawIOBase):
|
||||
def __init__(
|
||||
self,
|
||||
fp: _Reader,
|
||||
decomp_factory: Callable[..., Incomplete],
|
||||
decomp_factory: Callable[..., _Decompressor],
|
||||
trailing_error: type[Exception] | tuple[type[Exception], ...] = (),
|
||||
**decomp_args: Any, # These are passed to decomp_factory.
|
||||
) -> None: ...
|
||||
|
||||
@@ -14,7 +14,7 @@ class BaseProtocol:
|
||||
|
||||
class Protocol(BaseProtocol):
|
||||
# Need annotation or mypy will complain about 'Cannot determine type of "__slots__" in base class'
|
||||
__slots__: tuple[()] = ()
|
||||
__slots__: tuple[str, ...] = ()
|
||||
def data_received(self, data: bytes) -> None: ...
|
||||
def eof_received(self) -> bool | None: ...
|
||||
|
||||
@@ -35,7 +35,7 @@ class DatagramProtocol(BaseProtocol):
|
||||
def error_received(self, exc: Exception) -> None: ...
|
||||
|
||||
class SubprocessProtocol(BaseProtocol):
|
||||
__slots__: tuple[()] = ()
|
||||
__slots__: tuple[str, ...] = ()
|
||||
def pipe_data_received(self, fd: int, data: bytes) -> None: ...
|
||||
def pipe_connection_lost(self, fd: int, exc: Exception | None) -> None: ...
|
||||
def process_exited(self) -> None: ...
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import sys
|
||||
from _typeshed import Unused
|
||||
from collections.abc import Callable, Coroutine
|
||||
from collections.abc import Awaitable, Callable, Coroutine
|
||||
from contextvars import Context
|
||||
from typing import Any, TypeVar, final
|
||||
from typing_extensions import Self
|
||||
@@ -22,7 +22,10 @@ if sys.version_info >= (3, 11):
|
||||
def __exit__(self, exc_type: Unused, exc_val: Unused, exc_tb: Unused) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def get_loop(self) -> AbstractEventLoop: ...
|
||||
def run(self, coro: Coroutine[Any, Any, _T], *, context: Context | None = None) -> _T: ...
|
||||
if sys.version_info >= (3, 14):
|
||||
def run(self, coro: Awaitable[_T], *, context: Context | None = None) -> _T: ...
|
||||
else:
|
||||
def run(self, coro: Coroutine[Any, Any, _T], *, context: Context | None = None) -> _T: ...
|
||||
|
||||
if sys.version_info >= (3, 12):
|
||||
def run(
|
||||
|
||||
@@ -62,7 +62,7 @@ class TransportSocket:
|
||||
def listen(self, backlog: int = ..., /) -> None: ...
|
||||
@deprecated("Removed in Python 3.11")
|
||||
def makefile(self) -> BinaryIO: ...
|
||||
@deprecated("Rmoved in Python 3.11")
|
||||
@deprecated("Removed in Python 3.11")
|
||||
def sendfile(self, file: BinaryIO, offset: int = 0, count: int | None = None) -> int: ...
|
||||
@deprecated("Removed in Python 3.11")
|
||||
def close(self) -> None: ...
|
||||
|
||||
@@ -42,6 +42,7 @@ from typing import ( # noqa: Y022,UP035
|
||||
Any,
|
||||
BinaryIO,
|
||||
ClassVar,
|
||||
Final,
|
||||
Generic,
|
||||
Mapping,
|
||||
MutableMapping,
|
||||
@@ -189,8 +190,9 @@ class type:
|
||||
__bases__: tuple[type, ...]
|
||||
@property
|
||||
def __basicsize__(self) -> int: ...
|
||||
@property
|
||||
def __dict__(self) -> types.MappingProxyType[str, Any]: ... # type: ignore[override]
|
||||
# type.__dict__ is read-only at runtime, but that can't be expressed currently.
|
||||
# See https://github.com/python/typeshed/issues/11033 for a discussion.
|
||||
__dict__: Final[types.MappingProxyType[str, Any]] # type: ignore[assignment]
|
||||
@property
|
||||
def __dictoffset__(self) -> int: ...
|
||||
@property
|
||||
@@ -1365,13 +1367,6 @@ class property:
|
||||
def __set__(self, instance: Any, value: Any, /) -> None: ...
|
||||
def __delete__(self, instance: Any, /) -> None: ...
|
||||
|
||||
@final
|
||||
@type_check_only
|
||||
class _NotImplementedType(Any):
|
||||
__call__: None
|
||||
|
||||
NotImplemented: _NotImplementedType
|
||||
|
||||
def abs(x: SupportsAbs[_T], /) -> _T: ...
|
||||
def all(iterable: Iterable[object], /) -> bool: ...
|
||||
def any(iterable: Iterable[object], /) -> bool: ...
|
||||
@@ -2030,14 +2025,14 @@ def __import__(
|
||||
def __build_class__(func: Callable[[], CellType | Any], name: str, /, *bases: Any, metaclass: Any = ..., **kwds: Any) -> Any: ...
|
||||
|
||||
if sys.version_info >= (3, 10):
|
||||
from types import EllipsisType
|
||||
from types import EllipsisType, NotImplementedType
|
||||
|
||||
# Backwards compatibility hack for folks who relied on the ellipsis type
|
||||
# existing in typeshed in Python 3.9 and earlier.
|
||||
ellipsis = EllipsisType
|
||||
|
||||
Ellipsis: EllipsisType
|
||||
|
||||
NotImplemented: NotImplementedType
|
||||
else:
|
||||
# Actually the type of Ellipsis is <type 'ellipsis'>, but since it's
|
||||
# not exposed anywhere under that name, we make it private here.
|
||||
@@ -2047,6 +2042,12 @@ else:
|
||||
|
||||
Ellipsis: ellipsis
|
||||
|
||||
@final
|
||||
@type_check_only
|
||||
class _NotImplementedType(Any): ...
|
||||
|
||||
NotImplemented: _NotImplementedType
|
||||
|
||||
@disjoint_base
|
||||
class BaseException:
|
||||
args: tuple[Any, ...]
|
||||
|
||||
@@ -56,10 +56,12 @@ if sys.version_info >= (3, 12):
|
||||
|
||||
_LocaleType: TypeAlias = tuple[str | None, str | None]
|
||||
|
||||
class IllegalMonthError(ValueError):
|
||||
class IllegalMonthError(ValueError, IndexError):
|
||||
month: int
|
||||
def __init__(self, month: int) -> None: ...
|
||||
|
||||
class IllegalWeekdayError(ValueError):
|
||||
weekday: int
|
||||
def __init__(self, weekday: int) -> None: ...
|
||||
|
||||
def isleap(year: int) -> bool: ...
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from _typeshed import Incomplete, WriteableBuffer
|
||||
from _typeshed import ReadableBuffer, WriteableBuffer
|
||||
from collections.abc import Callable
|
||||
from io import DEFAULT_BUFFER_SIZE, BufferedIOBase, RawIOBase
|
||||
from typing import Any, Protocol, type_check_only
|
||||
@@ -11,13 +11,24 @@ class _Reader(Protocol):
|
||||
def seekable(self) -> bool: ...
|
||||
def seek(self, n: int, /) -> Any: ...
|
||||
|
||||
@type_check_only
|
||||
class _Decompressor(Protocol):
|
||||
def decompress(self, data: ReadableBuffer, /, max_length: int = ...) -> bytes: ...
|
||||
@property
|
||||
def unused_data(self) -> bytes: ...
|
||||
@property
|
||||
def eof(self) -> bool: ...
|
||||
# `zlib._Decompress` does not have next property, but `DecompressReader` calls it:
|
||||
# @property
|
||||
# def needs_input(self) -> bool: ...
|
||||
|
||||
class BaseStream(BufferedIOBase): ...
|
||||
|
||||
class DecompressReader(RawIOBase):
|
||||
def __init__(
|
||||
self,
|
||||
fp: _Reader,
|
||||
decomp_factory: Callable[..., Incomplete], # Consider backporting changes to _compression
|
||||
decomp_factory: Callable[..., _Decompressor], # Consider backporting changes to _compression
|
||||
trailing_error: type[Exception] | tuple[type[Exception], ...] = (),
|
||||
**decomp_args: Any, # These are passed to decomp_factory.
|
||||
) -> None: ...
|
||||
|
||||
@@ -4,7 +4,7 @@ from _typeshed import FileDescriptorOrPath, Unused
|
||||
from abc import ABC, abstractmethod
|
||||
from collections.abc import AsyncGenerator, AsyncIterator, Awaitable, Callable, Generator, Iterator
|
||||
from types import TracebackType
|
||||
from typing import IO, Any, Generic, Protocol, TypeVar, overload, runtime_checkable, type_check_only
|
||||
from typing import Any, Generic, Protocol, TypeVar, overload, runtime_checkable, type_check_only
|
||||
from typing_extensions import ParamSpec, Self, TypeAlias
|
||||
|
||||
__all__ = [
|
||||
@@ -30,7 +30,6 @@ if sys.version_info >= (3, 11):
|
||||
|
||||
_T = TypeVar("_T")
|
||||
_T_co = TypeVar("_T_co", covariant=True)
|
||||
_T_io = TypeVar("_T_io", bound=IO[str] | None)
|
||||
_ExitT_co = TypeVar("_ExitT_co", covariant=True, bound=bool | None, default=bool | None)
|
||||
_F = TypeVar("_F", bound=Callable[..., Any])
|
||||
_G_co = TypeVar("_G_co", bound=Generator[Any, Any, Any] | AsyncGenerator[Any, Any], covariant=True)
|
||||
@@ -141,14 +140,24 @@ class suppress(AbstractContextManager[None, bool]):
|
||||
self, exctype: type[BaseException] | None, excinst: BaseException | None, exctb: TracebackType | None
|
||||
) -> bool: ...
|
||||
|
||||
class _RedirectStream(AbstractContextManager[_T_io, None]):
|
||||
def __init__(self, new_target: _T_io) -> None: ...
|
||||
# This is trying to describe what is needed for (most?) uses
|
||||
# of `redirect_stdout` and `redirect_stderr`.
|
||||
# https://github.com/python/typeshed/issues/14903
|
||||
@type_check_only
|
||||
class _SupportsRedirect(Protocol):
|
||||
def write(self, s: str, /) -> int: ...
|
||||
def flush(self) -> None: ...
|
||||
|
||||
_SupportsRedirectT = TypeVar("_SupportsRedirectT", bound=_SupportsRedirect | None)
|
||||
|
||||
class _RedirectStream(AbstractContextManager[_SupportsRedirectT, None]):
|
||||
def __init__(self, new_target: _SupportsRedirectT) -> None: ...
|
||||
def __exit__(
|
||||
self, exctype: type[BaseException] | None, excinst: BaseException | None, exctb: TracebackType | None
|
||||
) -> None: ...
|
||||
|
||||
class redirect_stdout(_RedirectStream[_T_io]): ...
|
||||
class redirect_stderr(_RedirectStream[_T_io]): ...
|
||||
class redirect_stdout(_RedirectStream[_SupportsRedirectT]): ...
|
||||
class redirect_stderr(_RedirectStream[_SupportsRedirectT]): ...
|
||||
|
||||
class _BaseExitStack(Generic[_ExitT_co]):
|
||||
def enter_context(self, cm: AbstractContextManager[_T, _ExitT_co]) -> _T: ...
|
||||
|
||||
@@ -309,6 +309,7 @@ if sys.version_info >= (3, 11):
|
||||
def global_enum(cls: _EnumerationT, update_str: bool = False) -> _EnumerationT: ...
|
||||
def global_enum_repr(self: Enum) -> str: ...
|
||||
def global_flag_repr(self: Flag) -> str: ...
|
||||
def show_flag_values(value: int) -> list[int]: ...
|
||||
|
||||
if sys.version_info >= (3, 12):
|
||||
# The body of the class is the same, but the base classes are different.
|
||||
|
||||
@@ -9,7 +9,8 @@ class HTMLParser(ParserBase):
|
||||
# Added in Python 3.9.23, 3.10.18, 3.11.13, 3.12.11, 3.13.6
|
||||
RCDATA_CONTENT_ELEMENTS: Final[tuple[str, ...]]
|
||||
|
||||
def __init__(self, *, convert_charrefs: bool = True) -> None: ...
|
||||
# `scripting` parameter added in Python 3.9.25, 3.10.20, 3.11.15, 3.12.13, 3.13.10, 3.14.1
|
||||
def __init__(self, *, convert_charrefs: bool = True, scripting: bool = False) -> None: ...
|
||||
def feed(self, data: str) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def get_starttag_text(self) -> str | None: ...
|
||||
|
||||
@@ -166,6 +166,7 @@ class HTTPResponse(io.BufferedIOBase, BinaryIO): # type: ignore[misc] # incomp
|
||||
def begin(self) -> None: ...
|
||||
|
||||
class HTTPConnection:
|
||||
blocksize: int
|
||||
auto_open: int # undocumented
|
||||
debuglevel: int
|
||||
default_port: int # undocumented
|
||||
|
||||
@@ -26,6 +26,7 @@ class IMAP4:
|
||||
class error(Exception): ...
|
||||
class abort(error): ...
|
||||
class readonly(abort): ...
|
||||
utf8_enabled: bool
|
||||
mustquote: Pattern[str]
|
||||
debug: int
|
||||
state: str
|
||||
|
||||
@@ -12,7 +12,9 @@ from importlib._bootstrap_external import (
|
||||
spec_from_file_location as spec_from_file_location,
|
||||
)
|
||||
from importlib.abc import Loader
|
||||
from typing_extensions import ParamSpec, deprecated
|
||||
from types import TracebackType
|
||||
from typing import Literal
|
||||
from typing_extensions import ParamSpec, Self, deprecated
|
||||
|
||||
_P = ParamSpec("_P")
|
||||
|
||||
@@ -44,6 +46,18 @@ class LazyLoader(Loader):
|
||||
|
||||
def source_hash(source_bytes: ReadableBuffer) -> bytes: ...
|
||||
|
||||
if sys.version_info >= (3, 12):
|
||||
class _incompatible_extension_module_restrictions:
|
||||
def __init__(self, *, disable_check: bool) -> None: ...
|
||||
disable_check: bool
|
||||
old: Literal[-1, 0, 1] # exists only while entered
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(
|
||||
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
|
||||
) -> None: ...
|
||||
@property
|
||||
def override(self) -> Literal[-1, 1]: ... # undocumented
|
||||
|
||||
if sys.version_info >= (3, 14):
|
||||
__all__ = [
|
||||
"LazyLoader",
|
||||
|
||||
@@ -73,7 +73,7 @@ class _BaseNetwork(_IPAddressBase, Generic[_A]):
|
||||
@property
|
||||
def broadcast_address(self) -> _A: ...
|
||||
def compare_networks(self, other: Self) -> int: ...
|
||||
def hosts(self) -> Iterator[_A] | list[_A]: ...
|
||||
def hosts(self) -> Iterator[_A]: ...
|
||||
@property
|
||||
def is_global(self) -> bool: ...
|
||||
@property
|
||||
|
||||
@@ -153,6 +153,10 @@ if sys.version_info < (3, 12):
|
||||
def format_string(f: _str, val: Any, grouping: bool = False, monetary: bool = False) -> _str: ...
|
||||
def currency(val: float | Decimal, symbol: bool = True, grouping: bool = False, international: bool = False) -> _str: ...
|
||||
def delocalize(string: _str) -> _str: ...
|
||||
|
||||
if sys.version_info >= (3, 10):
|
||||
def localize(string: _str, grouping: bool = False, monetary: bool = False) -> _str: ...
|
||||
|
||||
def atof(string: _str, func: Callable[[_str], float] = ...) -> float: ...
|
||||
def atoi(string: _str) -> int: ...
|
||||
def str(val: float) -> _str: ...
|
||||
|
||||
@@ -41,10 +41,22 @@ from typing import (
|
||||
runtime_checkable,
|
||||
type_check_only,
|
||||
)
|
||||
from typing_extensions import Self, TypeAlias, Unpack, deprecated
|
||||
from typing_extensions import LiteralString, Self, TypeAlias, Unpack, deprecated
|
||||
|
||||
from . import path as _path
|
||||
|
||||
# Re-export common definitions from os.path to reduce duplication
|
||||
from .path import (
|
||||
altsep as altsep,
|
||||
curdir as curdir,
|
||||
defpath as defpath,
|
||||
devnull as devnull,
|
||||
extsep as extsep,
|
||||
pardir as pardir,
|
||||
pathsep as pathsep,
|
||||
sep as sep,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
"F_OK",
|
||||
"O_APPEND",
|
||||
@@ -674,19 +686,8 @@ if sys.platform != "win32":
|
||||
ST_NOSUID: Final[int]
|
||||
ST_RDONLY: Final[int]
|
||||
|
||||
curdir: str
|
||||
pardir: str
|
||||
sep: str
|
||||
if sys.platform == "win32":
|
||||
altsep: str
|
||||
else:
|
||||
altsep: str | None
|
||||
extsep: str
|
||||
pathsep: str
|
||||
defpath: str
|
||||
linesep: Literal["\n", "\r\n"]
|
||||
devnull: str
|
||||
name: str
|
||||
name: LiteralString
|
||||
|
||||
F_OK: Final = 0
|
||||
R_OK: Final = 4
|
||||
@@ -729,6 +730,9 @@ environ: _Environ[str]
|
||||
if sys.platform != "win32":
|
||||
environb: _Environ[bytes]
|
||||
|
||||
if sys.version_info >= (3, 14):
|
||||
def reload_environ() -> None: ...
|
||||
|
||||
if sys.version_info >= (3, 11) or sys.platform != "win32":
|
||||
EX_OK: Final[int]
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@ def expr(source: str) -> STType: ...
|
||||
def suite(source: str) -> STType: ...
|
||||
def sequence2st(sequence: Sequence[Any]) -> STType: ...
|
||||
def tuple2st(sequence: Sequence[Any]) -> STType: ...
|
||||
def st2list(st: STType, line_info: bool = ..., col_info: bool = ...) -> list[Any]: ...
|
||||
def st2tuple(st: STType, line_info: bool = ..., col_info: bool = ...) -> tuple[Any, ...]: ...
|
||||
def st2list(st: STType, line_info: bool = False, col_info: bool = False) -> list[Any]: ...
|
||||
def st2tuple(st: STType, line_info: bool = False, col_info: bool = False) -> tuple[Any, ...]: ...
|
||||
def compilest(st: STType, filename: StrOrBytesPath = ...) -> CodeType: ...
|
||||
def isexpr(st: STType) -> bool: ...
|
||||
def issuite(st: STType) -> bool: ...
|
||||
@@ -21,5 +21,5 @@ class STType:
|
||||
def compile(self, filename: StrOrBytesPath = ...) -> CodeType: ...
|
||||
def isexpr(self) -> bool: ...
|
||||
def issuite(self) -> bool: ...
|
||||
def tolist(self, line_info: bool = ..., col_info: bool = ...) -> list[Any]: ...
|
||||
def totuple(self, line_info: bool = ..., col_info: bool = ...) -> tuple[Any, ...]: ...
|
||||
def tolist(self, line_info: bool = False, col_info: bool = False) -> list[Any]: ...
|
||||
def totuple(self, line_info: bool = False, col_info: bool = False) -> tuple[Any, ...]: ...
|
||||
|
||||
@@ -2,8 +2,8 @@ import sys
|
||||
from _typeshed import FileDescriptorLike
|
||||
from collections.abc import Iterable
|
||||
from types import TracebackType
|
||||
from typing import Any, ClassVar, Final, final
|
||||
from typing_extensions import Self
|
||||
from typing import Any, ClassVar, Final, TypeVar, final
|
||||
from typing_extensions import Never, Self
|
||||
|
||||
if sys.platform != "win32":
|
||||
PIPE_BUF: Final[int]
|
||||
@@ -31,9 +31,13 @@ if sys.platform != "win32":
|
||||
def unregister(self, fd: FileDescriptorLike, /) -> None: ...
|
||||
def poll(self, timeout: float | None = None, /) -> list[tuple[int, int]]: ...
|
||||
|
||||
_R = TypeVar("_R", default=Never)
|
||||
_W = TypeVar("_W", default=Never)
|
||||
_X = TypeVar("_X", default=Never)
|
||||
|
||||
def select(
|
||||
rlist: Iterable[Any], wlist: Iterable[Any], xlist: Iterable[Any], timeout: float | None = None, /
|
||||
) -> tuple[list[Any], list[Any], list[Any]]: ...
|
||||
rlist: Iterable[_R], wlist: Iterable[_W], xlist: Iterable[_X], timeout: float | None = None, /
|
||||
) -> tuple[list[_R], list[_W], list[_X]]: ...
|
||||
|
||||
error = OSError
|
||||
|
||||
|
||||
@@ -33,6 +33,9 @@ from typing_extensions import Never, Self, TypeAlias, deprecated
|
||||
if sys.version_info >= (3, 13):
|
||||
from _ssl import HAS_PSK as HAS_PSK
|
||||
|
||||
if sys.version_info >= (3, 14):
|
||||
from _ssl import HAS_PHA as HAS_PHA
|
||||
|
||||
if sys.version_info < (3, 12):
|
||||
from _ssl import RAND_pseudo_bytes as RAND_pseudo_bytes
|
||||
|
||||
|
||||
@@ -1,7 +1,114 @@
|
||||
import sys
|
||||
from _stat import *
|
||||
from _stat import (
|
||||
S_ENFMT as S_ENFMT,
|
||||
S_IEXEC as S_IEXEC,
|
||||
S_IFBLK as S_IFBLK,
|
||||
S_IFCHR as S_IFCHR,
|
||||
S_IFDIR as S_IFDIR,
|
||||
S_IFDOOR as S_IFDOOR,
|
||||
S_IFIFO as S_IFIFO,
|
||||
S_IFLNK as S_IFLNK,
|
||||
S_IFMT as S_IFMT,
|
||||
S_IFPORT as S_IFPORT,
|
||||
S_IFREG as S_IFREG,
|
||||
S_IFSOCK as S_IFSOCK,
|
||||
S_IFWHT as S_IFWHT,
|
||||
S_IMODE as S_IMODE,
|
||||
S_IREAD as S_IREAD,
|
||||
S_IRGRP as S_IRGRP,
|
||||
S_IROTH as S_IROTH,
|
||||
S_IRUSR as S_IRUSR,
|
||||
S_IRWXG as S_IRWXG,
|
||||
S_IRWXO as S_IRWXO,
|
||||
S_IRWXU as S_IRWXU,
|
||||
S_ISBLK as S_ISBLK,
|
||||
S_ISCHR as S_ISCHR,
|
||||
S_ISDIR as S_ISDIR,
|
||||
S_ISDOOR as S_ISDOOR,
|
||||
S_ISFIFO as S_ISFIFO,
|
||||
S_ISGID as S_ISGID,
|
||||
S_ISLNK as S_ISLNK,
|
||||
S_ISPORT as S_ISPORT,
|
||||
S_ISREG as S_ISREG,
|
||||
S_ISSOCK as S_ISSOCK,
|
||||
S_ISUID as S_ISUID,
|
||||
S_ISVTX as S_ISVTX,
|
||||
S_ISWHT as S_ISWHT,
|
||||
S_IWGRP as S_IWGRP,
|
||||
S_IWOTH as S_IWOTH,
|
||||
S_IWRITE as S_IWRITE,
|
||||
S_IWUSR as S_IWUSR,
|
||||
S_IXGRP as S_IXGRP,
|
||||
S_IXOTH as S_IXOTH,
|
||||
S_IXUSR as S_IXUSR,
|
||||
SF_APPEND as SF_APPEND,
|
||||
SF_ARCHIVED as SF_ARCHIVED,
|
||||
SF_IMMUTABLE as SF_IMMUTABLE,
|
||||
SF_NOUNLINK as SF_NOUNLINK,
|
||||
SF_SNAPSHOT as SF_SNAPSHOT,
|
||||
ST_ATIME as ST_ATIME,
|
||||
ST_CTIME as ST_CTIME,
|
||||
ST_DEV as ST_DEV,
|
||||
ST_GID as ST_GID,
|
||||
ST_INO as ST_INO,
|
||||
ST_MODE as ST_MODE,
|
||||
ST_MTIME as ST_MTIME,
|
||||
ST_NLINK as ST_NLINK,
|
||||
ST_SIZE as ST_SIZE,
|
||||
ST_UID as ST_UID,
|
||||
UF_APPEND as UF_APPEND,
|
||||
UF_COMPRESSED as UF_COMPRESSED,
|
||||
UF_HIDDEN as UF_HIDDEN,
|
||||
UF_IMMUTABLE as UF_IMMUTABLE,
|
||||
UF_NODUMP as UF_NODUMP,
|
||||
UF_NOUNLINK as UF_NOUNLINK,
|
||||
UF_OPAQUE as UF_OPAQUE,
|
||||
filemode as filemode,
|
||||
)
|
||||
from typing import Final
|
||||
|
||||
if sys.platform == "win32":
|
||||
from _stat import (
|
||||
IO_REPARSE_TAG_APPEXECLINK as IO_REPARSE_TAG_APPEXECLINK,
|
||||
IO_REPARSE_TAG_MOUNT_POINT as IO_REPARSE_TAG_MOUNT_POINT,
|
||||
IO_REPARSE_TAG_SYMLINK as IO_REPARSE_TAG_SYMLINK,
|
||||
)
|
||||
|
||||
if sys.version_info >= (3, 13):
|
||||
from _stat import (
|
||||
SF_DATALESS as SF_DATALESS,
|
||||
SF_FIRMLINK as SF_FIRMLINK,
|
||||
SF_SETTABLE as SF_SETTABLE,
|
||||
UF_DATAVAULT as UF_DATAVAULT,
|
||||
UF_SETTABLE as UF_SETTABLE,
|
||||
UF_TRACKED as UF_TRACKED,
|
||||
)
|
||||
|
||||
if sys.platform == "darwin":
|
||||
from _stat import SF_SUPPORTED as SF_SUPPORTED, SF_SYNTHETIC as SF_SYNTHETIC
|
||||
|
||||
# _stat.c defines FILE_ATTRIBUTE_* constants conditionally,
|
||||
# making them available only at runtime on Windows.
|
||||
# stat.py unconditionally redefines the same FILE_ATTRIBUTE_* constants
|
||||
# on all platforms.
|
||||
FILE_ATTRIBUTE_ARCHIVE: Final = 32
|
||||
FILE_ATTRIBUTE_COMPRESSED: Final = 2048
|
||||
FILE_ATTRIBUTE_DEVICE: Final = 64
|
||||
FILE_ATTRIBUTE_DIRECTORY: Final = 16
|
||||
FILE_ATTRIBUTE_ENCRYPTED: Final = 16384
|
||||
FILE_ATTRIBUTE_HIDDEN: Final = 2
|
||||
FILE_ATTRIBUTE_INTEGRITY_STREAM: Final = 32768
|
||||
FILE_ATTRIBUTE_NORMAL: Final = 128
|
||||
FILE_ATTRIBUTE_NOT_CONTENT_INDEXED: Final = 8192
|
||||
FILE_ATTRIBUTE_NO_SCRUB_DATA: Final = 131072
|
||||
FILE_ATTRIBUTE_OFFLINE: Final = 4096
|
||||
FILE_ATTRIBUTE_READONLY: Final = 1
|
||||
FILE_ATTRIBUTE_REPARSE_POINT: Final = 1024
|
||||
FILE_ATTRIBUTE_SPARSE_FILE: Final = 512
|
||||
FILE_ATTRIBUTE_SYSTEM: Final = 4
|
||||
FILE_ATTRIBUTE_TEMPORARY: Final = 256
|
||||
FILE_ATTRIBUTE_VIRTUAL: Final = 65536
|
||||
|
||||
if sys.version_info >= (3, 13):
|
||||
# https://github.com/python/cpython/issues/114081#issuecomment-2119017790
|
||||
SF_RESTRICTED: Final = 0x00080000
|
||||
|
||||
@@ -497,7 +497,6 @@ elif sys.version_info >= (3, 10):
|
||||
) -> CompletedProcess[Any]: ...
|
||||
|
||||
else:
|
||||
# 3.9 adds arguments "user", "group", "extra_groups" and "umask"
|
||||
@overload
|
||||
def run(
|
||||
args: _CMD,
|
||||
|
||||
@@ -5,7 +5,7 @@ from builtins import object as _object
|
||||
from collections.abc import AsyncGenerator, Callable, Sequence
|
||||
from io import TextIOWrapper
|
||||
from types import FrameType, ModuleType, TracebackType
|
||||
from typing import Any, Final, Literal, NoReturn, Protocol, TextIO, TypeVar, final, type_check_only
|
||||
from typing import Any, Final, Literal, NoReturn, Protocol, TextIO, TypeVar, final, overload, type_check_only
|
||||
from typing_extensions import LiteralString, TypeAlias, deprecated
|
||||
|
||||
_T = TypeVar("_T")
|
||||
@@ -354,6 +354,13 @@ else:
|
||||
def _current_frames() -> dict[int, FrameType]: ...
|
||||
def _getframe(depth: int = 0, /) -> FrameType: ...
|
||||
|
||||
# documented -- see https://docs.python.org/3/library/sys.html#sys._current_exceptions
|
||||
if sys.version_info >= (3, 12):
|
||||
def _current_exceptions() -> dict[int, BaseException | None]: ...
|
||||
|
||||
else:
|
||||
def _current_exceptions() -> dict[int, OptExcInfo]: ...
|
||||
|
||||
if sys.version_info >= (3, 12):
|
||||
def _getframemodulename(depth: int = 0) -> str | None: ...
|
||||
|
||||
@@ -366,14 +373,18 @@ if sys.version_info >= (3, 11):
|
||||
def exception() -> BaseException | None: ...
|
||||
|
||||
def exit(status: _ExitCode = None, /) -> NoReturn: ...
|
||||
|
||||
if sys.platform == "android": # noqa: Y008
|
||||
def getandroidapilevel() -> int: ...
|
||||
|
||||
def getallocatedblocks() -> int: ...
|
||||
def getdefaultencoding() -> str: ...
|
||||
def getdefaultencoding() -> Literal["utf-8"]: ...
|
||||
|
||||
if sys.platform != "win32":
|
||||
def getdlopenflags() -> int: ...
|
||||
|
||||
def getfilesystemencoding() -> str: ...
|
||||
def getfilesystemencodeerrors() -> str: ...
|
||||
def getfilesystemencoding() -> LiteralString: ...
|
||||
def getfilesystemencodeerrors() -> LiteralString: ...
|
||||
def getrefcount(object: Any, /) -> int: ...
|
||||
def getrecursionlimit() -> int: ...
|
||||
def getsizeof(obj: object, default: int = ...) -> int: ...
|
||||
@@ -411,7 +422,12 @@ if sys.platform == "win32":
|
||||
|
||||
def getwindowsversion() -> _WinVersion: ...
|
||||
|
||||
def intern(string: str, /) -> str: ...
|
||||
@overload
|
||||
def intern(string: LiteralString, /) -> LiteralString: ...
|
||||
@overload
|
||||
def intern(string: str, /) -> str: ... # type: ignore[misc]
|
||||
|
||||
__interactivehook__: Callable[[], object]
|
||||
|
||||
if sys.version_info >= (3, 13):
|
||||
def _is_gil_enabled() -> bool: ...
|
||||
@@ -501,3 +517,4 @@ if sys.version_info >= (3, 12):
|
||||
if sys.version_info >= (3, 14):
|
||||
def is_remote_debug_enabled() -> bool: ...
|
||||
def remote_exec(pid: int, script: StrOrBytesPath) -> None: ...
|
||||
def _is_immortal(op: object, /) -> bool: ...
|
||||
|
||||
@@ -17,6 +17,10 @@ PROFILER_ID: Final = 2
|
||||
OPTIMIZER_ID: Final = 5
|
||||
|
||||
def use_tool_id(tool_id: int, name: str, /) -> None: ...
|
||||
|
||||
if sys.version_info >= (3, 14):
|
||||
def clear_tool_id(tool_id: int, /) -> None: ...
|
||||
|
||||
def free_tool_id(tool_id: int, /) -> None: ...
|
||||
def get_tool(tool_id: int, /) -> str | None: ...
|
||||
|
||||
@@ -43,10 +47,10 @@ class _events:
|
||||
STOP_ITERATION: Final[int]
|
||||
if sys.version_info >= (3, 14):
|
||||
BRANCH_LEFT: Final[int]
|
||||
BRANCH_TAKEN: Final[int]
|
||||
BRANCH_RIGHT: Final[int]
|
||||
|
||||
@property
|
||||
@deprecated("Deprecated since Python 3.14. Use `BRANCH_LEFT` or `BRANCH_TAKEN` instead.")
|
||||
@deprecated("Deprecated since Python 3.14. Use `BRANCH_LEFT` or `BRANCH_RIGHT` instead.")
|
||||
def BRANCH(self) -> int: ...
|
||||
|
||||
else:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import sys
|
||||
from typing import IO, Any, Literal, overload
|
||||
from typing_extensions import deprecated
|
||||
from typing_extensions import LiteralString, deprecated
|
||||
|
||||
__all__ = [
|
||||
"get_config_h_filename",
|
||||
@@ -28,8 +28,10 @@ def get_config_vars(arg: str, /, *args: str) -> list[Any]: ...
|
||||
def get_scheme_names() -> tuple[str, ...]: ...
|
||||
|
||||
if sys.version_info >= (3, 10):
|
||||
def get_default_scheme() -> str: ...
|
||||
def get_preferred_scheme(key: Literal["prefix", "home", "user"]) -> str: ...
|
||||
def get_default_scheme() -> LiteralString: ...
|
||||
def get_preferred_scheme(key: Literal["prefix", "home", "user"]) -> LiteralString: ...
|
||||
# Documented -- see https://docs.python.org/3/library/sysconfig.html#sysconfig._get_preferred_schemes
|
||||
def _get_preferred_schemes() -> dict[Literal["prefix", "home", "user"], LiteralString]: ...
|
||||
|
||||
def get_path_names() -> tuple[str, ...]: ...
|
||||
def get_path(name: str, scheme: str = ..., vars: dict[str, Any] | None = None, expand: bool = True) -> str: ...
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import _thread
|
||||
import sys
|
||||
from _thread import _excepthook, _ExceptHookArgs, get_native_id as get_native_id
|
||||
from _thread import _ExceptHookArgs, get_native_id as get_native_id
|
||||
from _typeshed import ProfileFunction, TraceFunction
|
||||
from collections.abc import Callable, Iterable, Mapping
|
||||
from contextvars import ContextVar
|
||||
@@ -144,6 +144,9 @@ class Condition:
|
||||
) -> None: ...
|
||||
def acquire(self, blocking: bool = True, timeout: float = -1) -> bool: ...
|
||||
def release(self) -> None: ...
|
||||
if sys.version_info >= (3, 14):
|
||||
def locked(self) -> bool: ...
|
||||
|
||||
def wait(self, timeout: float | None = None) -> bool: ...
|
||||
def wait_for(self, predicate: Callable[[], _T], timeout: float | None = None) -> _T: ...
|
||||
def notify(self, n: int = 1) -> None: ...
|
||||
@@ -169,7 +172,9 @@ class Event:
|
||||
def clear(self) -> None: ...
|
||||
def wait(self, timeout: float | None = None) -> bool: ...
|
||||
|
||||
excepthook = _excepthook
|
||||
excepthook: Callable[[_ExceptHookArgs], object]
|
||||
if sys.version_info >= (3, 10):
|
||||
__excepthook__: Callable[[_ExceptHookArgs], object]
|
||||
ExceptHookArgs = _ExceptHookArgs
|
||||
|
||||
class Timer(Thread):
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
from typing import Final
|
||||
|
||||
# These are not actually bools. See #4669
|
||||
NO: Final[bool]
|
||||
YES: Final[bool]
|
||||
TRUE: Final[bool]
|
||||
FALSE: Final[bool]
|
||||
ON: Final[bool]
|
||||
OFF: Final[bool]
|
||||
YES: Final = True
|
||||
NO: Final = False
|
||||
TRUE: Final = True
|
||||
FALSE: Final = False
|
||||
ON: Final = True
|
||||
OFF: Final = False
|
||||
N: Final = "n"
|
||||
S: Final = "s"
|
||||
W: Final = "w"
|
||||
|
||||
@@ -717,9 +717,9 @@ if sys.version_info >= (3, 10):
|
||||
@final
|
||||
class EllipsisType: ...
|
||||
|
||||
from builtins import _NotImplementedType
|
||||
@final
|
||||
class NotImplementedType(Any): ...
|
||||
|
||||
NotImplementedType = _NotImplementedType
|
||||
@final
|
||||
class UnionType:
|
||||
@property
|
||||
|
||||
@@ -222,10 +222,6 @@ class TypeVar:
|
||||
@property
|
||||
def evaluate_default(self) -> EvaluateFunc | None: ...
|
||||
|
||||
# Used for an undocumented mypy feature. Does not exist at runtime.
|
||||
# Obsolete, use _typeshed._type_checker_internals.promote instead.
|
||||
_promote = object()
|
||||
|
||||
# N.B. Keep this definition in sync with typing_extensions._SpecialForm
|
||||
@final
|
||||
class _SpecialForm(_Final):
|
||||
@@ -412,7 +408,13 @@ _TC = TypeVar("_TC", bound=type[object])
|
||||
|
||||
def overload(func: _F) -> _F: ...
|
||||
def no_type_check(arg: _F) -> _F: ...
|
||||
def no_type_check_decorator(decorator: Callable[_P, _T]) -> Callable[_P, _T]: ...
|
||||
|
||||
if sys.version_info >= (3, 13):
|
||||
@deprecated("Deprecated since Python 3.13; removed in Python 3.15.")
|
||||
def no_type_check_decorator(decorator: Callable[_P, _T]) -> Callable[_P, _T]: ...
|
||||
|
||||
else:
|
||||
def no_type_check_decorator(decorator: Callable[_P, _T]) -> Callable[_P, _T]: ...
|
||||
|
||||
# This itself is only available during type checking
|
||||
def type_check_only(func_or_cls: _FT) -> _FT: ...
|
||||
@@ -1004,9 +1006,7 @@ class NamedTuple(tuple[Any, ...]):
|
||||
@overload
|
||||
def __init__(self, typename: str, fields: Iterable[tuple[str, Any]], /) -> None: ...
|
||||
@overload
|
||||
@typing_extensions.deprecated(
|
||||
"Creating a typing.NamedTuple using keyword arguments is deprecated and support will be removed in Python 3.15"
|
||||
)
|
||||
@deprecated("Creating a typing.NamedTuple using keyword arguments is deprecated and support will be removed in Python 3.15")
|
||||
def __init__(self, typename: str, fields: None = None, /, **kwargs: Any) -> None: ...
|
||||
@classmethod
|
||||
def _make(cls, iterable: Iterable[Any]) -> typing_extensions.Self: ...
|
||||
|
||||
@@ -1,9 +1,26 @@
|
||||
from collections.abc import MutableSequence, Sequence
|
||||
from typing import Any, Final, TypeVar
|
||||
from typing import Any, Final, Literal, Protocol, TypeVar, type_check_only
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
@type_check_only
|
||||
class _SupportsDunderLT(Protocol):
|
||||
def __lt__(self, other: Any, /) -> bool: ...
|
||||
|
||||
@type_check_only
|
||||
class _SupportsDunderGT(Protocol):
|
||||
def __gt__(self, other: Any, /) -> bool: ...
|
||||
|
||||
@type_check_only
|
||||
class _SupportsDunderLE(Protocol):
|
||||
def __le__(self, other: Any, /) -> bool: ...
|
||||
|
||||
@type_check_only
|
||||
class _SupportsDunderGE(Protocol):
|
||||
def __ge__(self, other: Any, /) -> bool: ...
|
||||
|
||||
_T = TypeVar("_T")
|
||||
_Mismatch: TypeAlias = tuple[_T, _T, int]
|
||||
_SupportsComparison: TypeAlias = _SupportsDunderLE | _SupportsDunderGE | _SupportsDunderGT | _SupportsDunderLT
|
||||
|
||||
_MAX_LENGTH: Final = 80
|
||||
_PLACEHOLDER_LEN: Final = 12
|
||||
@@ -18,6 +35,6 @@ def safe_repr(obj: object, short: bool = False) -> str: ...
|
||||
def strclass(cls: type) -> str: ...
|
||||
def sorted_list_difference(expected: Sequence[_T], actual: Sequence[_T]) -> tuple[list[_T], list[_T]]: ...
|
||||
def unorderable_list_difference(expected: MutableSequence[_T], actual: MutableSequence[_T]) -> tuple[list[_T], list[_T]]: ...
|
||||
def three_way_cmp(x: Any, y: Any) -> int: ...
|
||||
def three_way_cmp(x: _SupportsComparison, y: _SupportsComparison) -> Literal[-1, 0, 1]: ...
|
||||
def _count_diff_all_purpose(actual: Sequence[_T], expected: Sequence[_T]) -> list[_Mismatch[_T]]: ...
|
||||
def _count_diff_hashable(actual: Sequence[_T], expected: Sequence[_T]) -> list[_Mismatch[_T]]: ...
|
||||
|
||||
@@ -49,7 +49,14 @@ if sys.version_info < (3, 14):
|
||||
__all__ += ["URLopener", "FancyURLopener"]
|
||||
|
||||
_T = TypeVar("_T")
|
||||
|
||||
# The actual type is `addinfourl | HTTPResponse`, but users would need to use `typing.cast` or `isinstance` to narrow the type,
|
||||
# so we use `Any` instead.
|
||||
# See
|
||||
# - https://github.com/python/typeshed/pull/15042
|
||||
# - https://github.com/python/typing/issues/566
|
||||
_UrlopenRet: TypeAlias = Any
|
||||
|
||||
_DataType: TypeAlias = ReadableBuffer | SupportsRead[bytes] | Iterable[bytes] | None
|
||||
|
||||
if sys.version_info >= (3, 13):
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import builtins
|
||||
import sys
|
||||
from _typeshed import Unused
|
||||
from enum import Enum
|
||||
from typing import Final
|
||||
from typing import Final, NoReturn
|
||||
from typing_extensions import LiteralString, TypeAlias
|
||||
|
||||
_FieldsType: TypeAlias = tuple[int, int, int, int, int, int]
|
||||
@@ -13,6 +14,9 @@ class SafeUUID(Enum):
|
||||
|
||||
class UUID:
|
||||
__slots__ = ("int", "is_safe", "__weakref__")
|
||||
is_safe: Final[SafeUUID]
|
||||
int: Final[builtins.int]
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
hex: str | None = None,
|
||||
@@ -25,8 +29,6 @@ class UUID:
|
||||
is_safe: SafeUUID = SafeUUID.unknown,
|
||||
) -> None: ...
|
||||
@property
|
||||
def is_safe(self) -> SafeUUID: ...
|
||||
@property
|
||||
def bytes(self) -> builtins.bytes: ...
|
||||
@property
|
||||
def bytes_le(self) -> builtins.bytes: ...
|
||||
@@ -41,8 +43,6 @@ class UUID:
|
||||
@property
|
||||
def hex(self) -> str: ...
|
||||
@property
|
||||
def int(self) -> builtins.int: ...
|
||||
@property
|
||||
def node(self) -> builtins.int: ...
|
||||
@property
|
||||
def time(self) -> builtins.int: ...
|
||||
@@ -65,6 +65,7 @@ class UUID:
|
||||
def __gt__(self, other: UUID) -> bool: ...
|
||||
def __ge__(self, other: UUID) -> bool: ...
|
||||
def __hash__(self) -> builtins.int: ...
|
||||
def __setattr__(self, name: Unused, value: Unused) -> NoReturn: ...
|
||||
|
||||
def getnode() -> int: ...
|
||||
def uuid1(node: int | None = None, clock_seq: int | None = None) -> UUID: ...
|
||||
|
||||
@@ -18,13 +18,13 @@ if sys.platform == "win32":
|
||||
def ExpandEnvironmentStrings(string: str, /) -> str: ...
|
||||
def FlushKey(key: _KeyType, /) -> None: ...
|
||||
def LoadKey(key: _KeyType, sub_key: str, file_name: str, /) -> None: ...
|
||||
def OpenKey(key: _KeyType, sub_key: str, reserved: int = 0, access: int = 131097) -> HKEYType: ...
|
||||
def OpenKeyEx(key: _KeyType, sub_key: str, reserved: int = 0, access: int = 131097) -> HKEYType: ...
|
||||
def OpenKey(key: _KeyType, sub_key: str | None, reserved: int = 0, access: int = 131097) -> HKEYType: ...
|
||||
def OpenKeyEx(key: _KeyType, sub_key: str | None, reserved: int = 0, access: int = 131097) -> HKEYType: ...
|
||||
def QueryInfoKey(key: _KeyType, /) -> tuple[int, int, int]: ...
|
||||
def QueryValue(key: _KeyType, sub_key: str | None, /) -> str: ...
|
||||
def QueryValueEx(key: _KeyType, name: str, /) -> tuple[Any, int]: ...
|
||||
def SaveKey(key: _KeyType, file_name: str, /) -> None: ...
|
||||
def SetValue(key: _KeyType, sub_key: str, type: int, value: str, /) -> None: ...
|
||||
def SetValue(key: _KeyType, sub_key: str | None, type: int, value: str, /) -> None: ...
|
||||
@overload # type=REG_DWORD|REG_QWORD
|
||||
def SetValueEx(
|
||||
key: _KeyType, value_name: str | None, reserved: Unused, type: Literal[4, 5], value: int | None, /
|
||||
|
||||
@@ -26,8 +26,8 @@ Z_RLE: Final = 3
|
||||
Z_SYNC_FLUSH: Final = 2
|
||||
Z_TREES: Final = 6
|
||||
|
||||
if sys.version_info >= (3, 14) and sys.platform == "win32":
|
||||
# Available when zlib was built with zlib-ng, usually only on Windows
|
||||
if sys.version_info >= (3, 14):
|
||||
# Available when zlib was built with zlib-ng
|
||||
ZLIBNG_VERSION: Final[str]
|
||||
|
||||
class error(Exception): ...
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version = "~=1.2.15"
|
||||
version = "~=1.3.1"
|
||||
upstream_repository = "https://github.com/tantale/deprecated"
|
||||
requires = []
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
from .classic import deprecated as deprecated
|
||||
from typing import Final
|
||||
|
||||
__credits__: str
|
||||
__date__: str
|
||||
from .classic import deprecated as deprecated
|
||||
from .params import deprecated_params as deprecated_params
|
||||
|
||||
__version__: Final[str]
|
||||
__author__: Final[str]
|
||||
__date__: Final[str]
|
||||
__credits__: Final[str]
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
from collections.abc import Callable, Iterable
|
||||
from inspect import Signature
|
||||
from typing import Any, TypeVar
|
||||
from typing_extensions import ParamSpec
|
||||
|
||||
_P = ParamSpec("_P")
|
||||
_R = TypeVar("_R")
|
||||
|
||||
class DeprecatedParams:
|
||||
messages: dict[str, str]
|
||||
category: type[Warning]
|
||||
def __init__(self, param: str | dict[str, str], reason: str = "", category: type[Warning] = ...) -> None: ...
|
||||
def populate_messages(self, param: str | dict[str, str], reason: str = "") -> None: ...
|
||||
def check_params(
|
||||
self, signature: Signature, *args: Any, **kwargs: Any # args and kwargs passing to Signature.bind method
|
||||
) -> list[str]: ...
|
||||
def warn_messages(self, messages: Iterable[str]) -> None: ...
|
||||
def __call__(self, f: Callable[_P, _R]) -> Callable[_P, _R]: ...
|
||||
|
||||
deprecated_params = DeprecatedParams
|
||||
@@ -1,2 +0,0 @@
|
||||
# Stub-only module.
|
||||
exifread._types
|
||||
@@ -1,3 +0,0 @@
|
||||
version = "3.0.*"
|
||||
upstream_repository = "https://github.com/ianare/exif-py"
|
||||
obsolete_since = "3.1.0" # Released on 2025-04-25
|
||||
@@ -1,17 +0,0 @@
|
||||
from logging import Logger
|
||||
from typing import Any
|
||||
|
||||
from ._types import Reader
|
||||
|
||||
__version__: str
|
||||
logger: Logger
|
||||
|
||||
def process_file(
|
||||
fh: Reader,
|
||||
stop_tag: str = "UNDEF",
|
||||
details: bool = True,
|
||||
strict: bool = False,
|
||||
debug: bool = False,
|
||||
truncate_tags: bool = True,
|
||||
auto_seek: bool = True,
|
||||
) -> dict[str, Any]: ...
|
||||
@@ -1,15 +0,0 @@
|
||||
# Stubs-only module with type aliases for ExifRead.
|
||||
|
||||
from collections.abc import Iterator
|
||||
from typing import Any, Literal, Protocol
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
# The second item of the value tuple - if it exists - can be a variety of types,
|
||||
# including a callable or another dict.
|
||||
TagDict: TypeAlias = dict[int, tuple[str] | tuple[str, Any]]
|
||||
|
||||
class Reader(Protocol):
|
||||
def __iter__(self) -> Iterator[bytes]: ...
|
||||
def read(self, size: int, /) -> bytes: ...
|
||||
def tell(self) -> int: ...
|
||||
def seek(self, offset: int, whence: Literal[0, 1] = ..., /) -> object: ...
|
||||
@@ -1,47 +0,0 @@
|
||||
from logging import Logger
|
||||
from typing import Any, Literal
|
||||
|
||||
from ._types import Reader, TagDict
|
||||
|
||||
logger: Logger
|
||||
|
||||
class IfdTag:
|
||||
printable: str
|
||||
tag: int
|
||||
field_type: int
|
||||
field_offset: int
|
||||
field_length: int
|
||||
values: Any # either string, bytes or list of data items
|
||||
def __init__(self, printable: str, tag: int, field_type: int, values: Any, field_offset: int, field_length: int) -> None: ...
|
||||
|
||||
class ExifHeader:
|
||||
file_handle: Reader
|
||||
endian: Literal["I", "M"]
|
||||
offset: int
|
||||
fake_exif: bool
|
||||
strict: bool
|
||||
debug: bool
|
||||
detailed: bool
|
||||
truncate_tags: bool
|
||||
tags: dict[str, Any]
|
||||
def __init__(
|
||||
self,
|
||||
file_handle: Reader,
|
||||
endian: Literal["I", "M"],
|
||||
offset: int,
|
||||
fake_exif: bool,
|
||||
strict: bool,
|
||||
debug: bool = False,
|
||||
detailed: bool = True,
|
||||
truncate_tags: bool = True,
|
||||
) -> None: ...
|
||||
def s2n(self, offset: int, length: int, signed: bool = False) -> int: ...
|
||||
def n2b(self, offset: int, length: int) -> bytes: ...
|
||||
def list_ifd(self) -> list[int]: ...
|
||||
def dump_ifd(
|
||||
self, ifd: int, ifd_name: str, tag_dict: TagDict | None = None, relative: int = 0, stop_tag: str = "UNDEF"
|
||||
) -> None: ...
|
||||
def extract_tiff_thumbnail(self, thumb_ifd: int) -> None: ...
|
||||
def extract_jpeg_thumbnail(self) -> None: ...
|
||||
def decode_maker_note(self) -> None: ...
|
||||
def parse_xmp(self, xmp_bytes: bytes) -> None: ...
|
||||
@@ -1,2 +0,0 @@
|
||||
class InvalidExif(Exception): ...
|
||||
class ExifNotFound(Exception): ...
|
||||
@@ -1,24 +0,0 @@
|
||||
import logging
|
||||
from typing import TextIO
|
||||
|
||||
TEXT_NORMAL: int
|
||||
TEXT_BOLD: int
|
||||
TEXT_RED: int
|
||||
TEXT_GREEN: int
|
||||
TEXT_YELLOW: int
|
||||
TEXT_BLUE: int
|
||||
TEXT_MAGENTA: int
|
||||
TEXT_CYAN: int
|
||||
|
||||
def get_logger() -> logging.Logger: ...
|
||||
def setup_logger(debug: bool, color: bool) -> None: ...
|
||||
|
||||
class Formatter(logging.Formatter):
|
||||
color: bool
|
||||
debug: bool
|
||||
def __init__(self, debug: bool = False, color: bool = False) -> None: ...
|
||||
|
||||
class Handler(logging.StreamHandler[TextIO]):
|
||||
color: bool
|
||||
debug: bool
|
||||
def __init__(self, log_level: logging._Level, debug: bool = False, color: bool = False) -> None: ...
|
||||
@@ -1,56 +0,0 @@
|
||||
from collections.abc import Callable
|
||||
from logging import Logger
|
||||
|
||||
from ._types import Reader
|
||||
|
||||
logger: Logger
|
||||
|
||||
class WrongBox(Exception): ...
|
||||
class NoParser(Exception): ...
|
||||
class BoxVersion(Exception): ...
|
||||
class BadSize(Exception): ...
|
||||
|
||||
class Box:
|
||||
version: int
|
||||
minor_version: int
|
||||
item_count: int
|
||||
size: int
|
||||
after: int
|
||||
pos: int
|
||||
compat: list[bytes]
|
||||
base_offset: int
|
||||
subs: dict[str, Box]
|
||||
locs: dict[int, list[tuple[int, int]]]
|
||||
exif_infe: Box | None
|
||||
item_id: int
|
||||
item_type: bytes
|
||||
item_name: bytes
|
||||
item_protection_index: int
|
||||
major_brand: bytes
|
||||
offset_size: int
|
||||
length_size: int
|
||||
base_offset_size: int
|
||||
index_size: int
|
||||
flags: int
|
||||
name: str
|
||||
def __init__(self, name: str) -> None: ...
|
||||
def set_sizes(self, offset: int, length: int, base_offset: int, index: int) -> None: ...
|
||||
def set_full(self, vflags: int) -> None: ...
|
||||
|
||||
class HEICExifFinder:
|
||||
file_handle: Reader
|
||||
def __init__(self, file_handle: Reader) -> None: ...
|
||||
def get(self, nbytes: int) -> bytes: ...
|
||||
def get16(self) -> int: ...
|
||||
def get32(self) -> int: ...
|
||||
def get64(self) -> int: ...
|
||||
def get_int4x2(self) -> tuple[int, int]: ...
|
||||
def get_int(self, size: int) -> int: ...
|
||||
def get_string(self) -> bytes: ...
|
||||
def next_box(self) -> Box: ...
|
||||
def get_full(self, box: Box) -> None: ...
|
||||
def skip(self, box: Box) -> None: ...
|
||||
def expect_parse(self, name: str) -> Box: ...
|
||||
def get_parser(self, box: Box) -> Callable[[Box], None]: ...
|
||||
def parse_box(self, box: Box) -> Box: ...
|
||||
def find_exif(self) -> tuple[int, bytes]: ...
|
||||
@@ -1,7 +0,0 @@
|
||||
from logging import Logger
|
||||
|
||||
from ._types import Reader
|
||||
|
||||
logger: Logger
|
||||
|
||||
def find_jpeg_exif(fh: Reader, data: bytes, fake_exif: bool) -> tuple[int, bytes, bool]: ...
|
||||
@@ -1,15 +0,0 @@
|
||||
from _typeshed import Incomplete
|
||||
|
||||
from exifread.tags.exif import EXIF_TAGS as EXIF_TAGS
|
||||
from exifread.tags.makernote import (
|
||||
apple as apple,
|
||||
canon as canon,
|
||||
casio as casio,
|
||||
fujifilm as fujifilm,
|
||||
nikon as nikon,
|
||||
olympus as olympus,
|
||||
)
|
||||
|
||||
DEFAULT_STOP_TAG: str
|
||||
FIELD_TYPES: Incomplete
|
||||
IGNORE_TAGS: Incomplete
|
||||
@@ -1,7 +0,0 @@
|
||||
from exifread._types import TagDict
|
||||
|
||||
INTEROP_TAGS: TagDict
|
||||
INTEROP_INFO: tuple[str, TagDict]
|
||||
GPS_TAGS: TagDict
|
||||
GPS_INFO: tuple[str, TagDict]
|
||||
EXIF_TAGS: TagDict
|
||||
@@ -1,3 +0,0 @@
|
||||
from exifread._types import TagDict
|
||||
|
||||
TAGS: TagDict
|
||||
@@ -1,26 +0,0 @@
|
||||
from collections.abc import Callable
|
||||
from typing import Any
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
from exifread._types import TagDict
|
||||
|
||||
TAGS: TagDict
|
||||
|
||||
CAMERA_SETTINGS: TagDict
|
||||
FOCAL_LENGTH: TagDict
|
||||
SHOT_INFO: TagDict
|
||||
AF_INFO_2: TagDict
|
||||
FILE_INFO: TagDict
|
||||
|
||||
def add_one(value: int) -> int: ...
|
||||
def subtract_one(value: int) -> int: ...
|
||||
def convert_temp(value: int) -> str: ...
|
||||
|
||||
_CameraInfo: TypeAlias = dict[int, tuple[str, str, Callable[[int], Any]]]
|
||||
|
||||
CAMERA_INFO_TAG_NAME: str
|
||||
CAMERA_INFO_5D: _CameraInfo
|
||||
CAMERA_INFO_5DMKII: _CameraInfo
|
||||
CAMERA_INFO_5DMKIII: _CameraInfo
|
||||
CAMERA_INFO_600D: _CameraInfo
|
||||
CAMERA_INFO_MODEL_MAP: dict[str, _CameraInfo]
|
||||
@@ -1,3 +0,0 @@
|
||||
from exifread._types import TagDict
|
||||
|
||||
TAGS: TagDict
|
||||
@@ -1,3 +0,0 @@
|
||||
from exifread._types import TagDict
|
||||
|
||||
TAGS: TagDict
|
||||
@@ -1,6 +0,0 @@
|
||||
from exifread._types import TagDict
|
||||
|
||||
def ev_bias(seq: list[int]) -> str: ...
|
||||
|
||||
TAGS_NEW: TagDict
|
||||
TAGS_OLD: TagDict
|
||||
@@ -1,6 +0,0 @@
|
||||
from exifread._types import TagDict
|
||||
|
||||
def special_mode(val: bytes) -> str: ...
|
||||
|
||||
TAGS: TagDict
|
||||
TAG_0x2020: TagDict
|
||||
@@ -1,22 +0,0 @@
|
||||
from collections.abc import Mapping
|
||||
from fractions import Fraction
|
||||
from typing import Any, TypeVar, overload
|
||||
from typing_extensions import Self
|
||||
|
||||
_T = TypeVar("_T")
|
||||
|
||||
@overload
|
||||
def ord_(dta: str) -> int: ...
|
||||
@overload
|
||||
def ord_(dta: _T) -> _T: ...
|
||||
def make_string(seq: str | list[int]) -> str: ...
|
||||
def make_string_uc(seq: str | list[int]) -> str: ...
|
||||
def get_gps_coords(tags: Mapping[str, Any]) -> tuple[float, float]: ...
|
||||
|
||||
class Ratio(Fraction):
|
||||
def __new__(cls, numerator: int = 0, denominator: int | None = None) -> Self: ...
|
||||
@property
|
||||
def num(self) -> int: ...
|
||||
@property
|
||||
def den(self) -> int: ...
|
||||
def decimal(self) -> float: ...
|
||||
@@ -1,2 +1,2 @@
|
||||
version = "3.9.*"
|
||||
version = "3.10.*"
|
||||
upstream_repository = "https://github.com/Python-Markdown/markdown"
|
||||
|
||||
@@ -6,6 +6,8 @@ from collections.abc import Sequence
|
||||
from markdown import Markdown
|
||||
|
||||
spec: ModuleSpec
|
||||
commentclose: re.Pattern[str]
|
||||
commentabruptclose: re.Pattern[str]
|
||||
blank_line_re: re.Pattern[str]
|
||||
|
||||
class HTMLExtractor(htmlparser.HTMLParser):
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
from typing import Any
|
||||
from _typeshed import Incomplete
|
||||
|
||||
esc: str
|
||||
codes: Any
|
||||
dark_colors: Any
|
||||
light_colors: Any
|
||||
codes: Incomplete
|
||||
dark_colors: Incomplete
|
||||
light_colors: Incomplete
|
||||
|
||||
def reset_color(): ...
|
||||
def colorize(color_key, text): ...
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Iterable, Iterator
|
||||
from typing import Any
|
||||
|
||||
from pygments.lexer import Lexer
|
||||
from pygments.token import _TokenType
|
||||
@@ -8,11 +8,11 @@ def apply_filters(stream, filters, lexer=None): ...
|
||||
def simplefilter(f): ...
|
||||
|
||||
class Filter:
|
||||
options: Any
|
||||
options: Incomplete
|
||||
def __init__(self, **options) -> None: ...
|
||||
def filter(self, lexer: Lexer, stream: Iterable[tuple[_TokenType, str]]) -> Iterator[tuple[_TokenType, str]]: ...
|
||||
|
||||
class FunctionFilter(Filter):
|
||||
function: Any
|
||||
function: Incomplete
|
||||
def __init__(self, **options) -> None: ...
|
||||
def filter(self, lexer: Lexer, stream: Iterable[tuple[_TokenType, str]]) -> Iterator[tuple[_TokenType, str]]: ...
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Generator, Iterable, Iterator
|
||||
from typing import Any
|
||||
|
||||
from pygments.filter import Filter
|
||||
from pygments.lexer import Lexer
|
||||
@@ -7,46 +7,46 @@ from pygments.token import _TokenType
|
||||
|
||||
def find_filter_class(filtername): ...
|
||||
def get_filter_by_name(filtername, **options): ...
|
||||
def get_all_filters() -> Generator[str, None, None]: ...
|
||||
def get_all_filters() -> Generator[str]: ...
|
||||
|
||||
class CodeTagFilter(Filter):
|
||||
tag_re: Any
|
||||
tag_re: Incomplete
|
||||
def __init__(self, **options) -> None: ...
|
||||
def filter(self, lexer: Lexer, stream: Iterable[tuple[_TokenType, str]]) -> Iterator[tuple[_TokenType, str]]: ...
|
||||
|
||||
class SymbolFilter(Filter):
|
||||
latex_symbols: Any
|
||||
isabelle_symbols: Any
|
||||
lang_map: Any
|
||||
symbols: Any
|
||||
latex_symbols: Incomplete
|
||||
isabelle_symbols: Incomplete
|
||||
lang_map: Incomplete
|
||||
symbols: Incomplete
|
||||
def __init__(self, **options) -> None: ...
|
||||
def filter(self, lexer: Lexer, stream: Iterable[tuple[_TokenType, str]]) -> Iterator[tuple[_TokenType, str]]: ...
|
||||
|
||||
class KeywordCaseFilter(Filter):
|
||||
convert: Any
|
||||
convert: Incomplete
|
||||
def __init__(self, **options) -> None: ...
|
||||
def filter(self, lexer: Lexer, stream: Iterable[tuple[_TokenType, str]]) -> Iterator[tuple[_TokenType, str]]: ...
|
||||
|
||||
class NameHighlightFilter(Filter):
|
||||
names: Any
|
||||
tokentype: Any
|
||||
names: Incomplete
|
||||
tokentype: Incomplete
|
||||
def __init__(self, **options) -> None: ...
|
||||
def filter(self, lexer: Lexer, stream: Iterable[tuple[_TokenType, str]]) -> Iterator[tuple[_TokenType, str]]: ...
|
||||
|
||||
class ErrorToken(Exception): ...
|
||||
|
||||
class RaiseOnErrorTokenFilter(Filter):
|
||||
exception: Any
|
||||
exception: Incomplete
|
||||
def __init__(self, **options) -> None: ...
|
||||
def filter(self, lexer: Lexer, stream: Iterable[tuple[_TokenType, str]]) -> Iterator[tuple[_TokenType, str]]: ...
|
||||
|
||||
class VisibleWhitespaceFilter(Filter):
|
||||
wstt: Any
|
||||
wstt: Incomplete
|
||||
def __init__(self, **options) -> None: ...
|
||||
def filter(self, lexer: Lexer, stream: Iterable[tuple[_TokenType, str]]) -> Iterator[tuple[_TokenType, str]]: ...
|
||||
|
||||
class GobbleFilter(Filter):
|
||||
n: Any
|
||||
n: Incomplete
|
||||
def __init__(self, **options) -> None: ...
|
||||
def gobble(self, value, left): ...
|
||||
def filter(self, lexer: Lexer, stream: Iterable[tuple[_TokenType, str]]) -> Iterator[tuple[_TokenType, str]]: ...
|
||||
@@ -55,4 +55,4 @@ class TokenMergeFilter(Filter):
|
||||
def __init__(self, **options) -> None: ...
|
||||
def filter(self, lexer: Lexer, stream: Iterable[tuple[_TokenType, str]]) -> Iterator[tuple[_TokenType, str]]: ...
|
||||
|
||||
FILTERS: Any
|
||||
FILTERS: Incomplete
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
from typing import Any, Generic, TypeVar, overload
|
||||
from _typeshed import Incomplete
|
||||
from typing import Generic, TypeVar, overload
|
||||
|
||||
_T = TypeVar("_T", str, bytes)
|
||||
|
||||
class Formatter(Generic[_T]):
|
||||
name: Any
|
||||
aliases: Any
|
||||
filenames: Any
|
||||
name: Incomplete
|
||||
aliases: Incomplete
|
||||
filenames: Incomplete
|
||||
unicodeoutput: bool
|
||||
style: Any
|
||||
full: Any
|
||||
title: Any
|
||||
encoding: Any
|
||||
options: Any
|
||||
style: Incomplete
|
||||
full: Incomplete
|
||||
title: Incomplete
|
||||
encoding: Incomplete
|
||||
options: Incomplete
|
||||
@overload
|
||||
def __init__(self: Formatter[str], *, encoding: None = None, outencoding: None = None, **options) -> None: ...
|
||||
@overload
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Generator
|
||||
from typing import Any
|
||||
|
||||
from ..formatter import Formatter
|
||||
from .bbcode import BBCodeFormatter as BBCodeFormatter
|
||||
@@ -19,7 +19,7 @@ from .svg import SvgFormatter as SvgFormatter
|
||||
from .terminal import TerminalFormatter as TerminalFormatter
|
||||
from .terminal256 import Terminal256Formatter as Terminal256Formatter, TerminalTrueColorFormatter as TerminalTrueColorFormatter
|
||||
|
||||
def get_all_formatters() -> Generator[type[Formatter[Any]], None, None]: ...
|
||||
def get_all_formatters() -> Generator[type[Formatter[Incomplete]]]: ...
|
||||
def get_formatter_by_name(_alias, **options): ...
|
||||
def load_formatter_from_file(filename, formattername: str = "CustomFormatter", **options): ...
|
||||
def get_formatter_for_filename(fn, **options): ...
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
from typing import Any
|
||||
from _typeshed import Incomplete
|
||||
|
||||
FORMATTERS: Any
|
||||
FORMATTERS: Incomplete
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from typing import Any, TypeVar
|
||||
from _typeshed import Incomplete
|
||||
from typing import TypeVar
|
||||
|
||||
from pygments.formatter import Formatter
|
||||
|
||||
@@ -6,7 +7,7 @@ _T = TypeVar("_T", str, bytes)
|
||||
|
||||
class BBCodeFormatter(Formatter[_T]):
|
||||
name: str
|
||||
aliases: Any
|
||||
filenames: Any
|
||||
styles: Any
|
||||
aliases: Incomplete
|
||||
filenames: Incomplete
|
||||
styles: Incomplete
|
||||
def format_unencoded(self, tokensource, outfile) -> None: ...
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from typing import Any, TypeVar
|
||||
from _typeshed import Incomplete
|
||||
from typing import TypeVar
|
||||
|
||||
from pygments.formatter import Formatter
|
||||
|
||||
@@ -6,32 +7,32 @@ _T = TypeVar("_T", str, bytes)
|
||||
|
||||
class HtmlFormatter(Formatter[_T]):
|
||||
name: str
|
||||
aliases: Any
|
||||
filenames: Any
|
||||
title: Any
|
||||
nowrap: Any
|
||||
noclasses: Any
|
||||
classprefix: Any
|
||||
cssclass: Any
|
||||
cssstyles: Any
|
||||
prestyles: Any
|
||||
cssfile: Any
|
||||
noclobber_cssfile: Any
|
||||
tagsfile: Any
|
||||
tagurlformat: Any
|
||||
filename: Any
|
||||
wrapcode: Any
|
||||
span_element_openers: Any
|
||||
aliases: Incomplete
|
||||
filenames: Incomplete
|
||||
title: Incomplete
|
||||
nowrap: Incomplete
|
||||
noclasses: Incomplete
|
||||
classprefix: Incomplete
|
||||
cssclass: Incomplete
|
||||
cssstyles: Incomplete
|
||||
prestyles: Incomplete
|
||||
cssfile: Incomplete
|
||||
noclobber_cssfile: Incomplete
|
||||
tagsfile: Incomplete
|
||||
tagurlformat: Incomplete
|
||||
filename: Incomplete
|
||||
wrapcode: Incomplete
|
||||
span_element_openers: Incomplete
|
||||
linenos: int
|
||||
linenostart: Any
|
||||
linenostep: Any
|
||||
linenospecial: Any
|
||||
nobackground: Any
|
||||
lineseparator: Any
|
||||
lineanchors: Any
|
||||
linespans: Any
|
||||
anchorlinenos: Any
|
||||
hl_lines: Any
|
||||
linenostart: Incomplete
|
||||
linenostep: Incomplete
|
||||
linenospecial: Incomplete
|
||||
nobackground: Incomplete
|
||||
lineseparator: Incomplete
|
||||
lineanchors: Incomplete
|
||||
linespans: Incomplete
|
||||
anchorlinenos: Incomplete
|
||||
hl_lines: Incomplete
|
||||
def get_style_defs(self, arg=None): ...
|
||||
def get_token_style_defs(self, arg=None): ...
|
||||
def get_background_style_defs(self, arg=None): ...
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from typing import Any, TypeVar
|
||||
from _typeshed import Incomplete
|
||||
from typing import TypeVar
|
||||
|
||||
from pygments.formatter import Formatter
|
||||
|
||||
@@ -8,10 +9,10 @@ class PilNotAvailable(ImportError): ...
|
||||
class FontNotFound(Exception): ...
|
||||
|
||||
class FontManager:
|
||||
font_name: Any
|
||||
font_size: Any
|
||||
fonts: Any
|
||||
encoding: Any
|
||||
font_name: Incomplete
|
||||
font_size: Incomplete
|
||||
fonts: Incomplete
|
||||
encoding: Incomplete
|
||||
variable: bool
|
||||
def __init__(self, font_name, font_size: int = 14) -> None: ...
|
||||
def get_char_size(self): ...
|
||||
@@ -21,48 +22,48 @@ class FontManager:
|
||||
|
||||
class ImageFormatter(Formatter[_T]):
|
||||
name: str
|
||||
aliases: Any
|
||||
filenames: Any
|
||||
aliases: Incomplete
|
||||
filenames: Incomplete
|
||||
unicodeoutput: bool
|
||||
default_image_format: str
|
||||
encoding: str
|
||||
styles: Any
|
||||
styles: Incomplete
|
||||
background_color: str
|
||||
image_format: Any
|
||||
image_pad: Any
|
||||
line_pad: Any
|
||||
fonts: Any
|
||||
line_number_fg: Any
|
||||
line_number_bg: Any
|
||||
line_number_chars: Any
|
||||
line_number_bold: Any
|
||||
line_number_italic: Any
|
||||
line_number_pad: Any
|
||||
line_numbers: Any
|
||||
line_number_separator: Any
|
||||
line_number_step: Any
|
||||
line_number_start: Any
|
||||
line_number_width: Any
|
||||
hl_lines: Any
|
||||
hl_color: Any
|
||||
drawables: Any
|
||||
image_format: Incomplete
|
||||
image_pad: Incomplete
|
||||
line_pad: Incomplete
|
||||
fonts: Incomplete
|
||||
line_number_fg: Incomplete
|
||||
line_number_bg: Incomplete
|
||||
line_number_chars: Incomplete
|
||||
line_number_bold: Incomplete
|
||||
line_number_italic: Incomplete
|
||||
line_number_pad: Incomplete
|
||||
line_numbers: Incomplete
|
||||
line_number_separator: Incomplete
|
||||
line_number_step: Incomplete
|
||||
line_number_start: Incomplete
|
||||
line_number_width: Incomplete
|
||||
hl_lines: Incomplete
|
||||
hl_color: Incomplete
|
||||
drawables: Incomplete
|
||||
def get_style_defs(self, arg: str = "") -> None: ...
|
||||
def format(self, tokensource, outfile) -> None: ...
|
||||
|
||||
class GifImageFormatter(ImageFormatter[_T]):
|
||||
name: str
|
||||
aliases: Any
|
||||
filenames: Any
|
||||
aliases: Incomplete
|
||||
filenames: Incomplete
|
||||
default_image_format: str
|
||||
|
||||
class JpgImageFormatter(ImageFormatter[_T]):
|
||||
name: str
|
||||
aliases: Any
|
||||
filenames: Any
|
||||
aliases: Incomplete
|
||||
filenames: Incomplete
|
||||
default_image_format: str
|
||||
|
||||
class BmpImageFormatter(ImageFormatter[_T]):
|
||||
name: str
|
||||
aliases: Any
|
||||
filenames: Any
|
||||
aliases: Incomplete
|
||||
filenames: Incomplete
|
||||
default_image_format: str
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from typing import Any, TypeVar
|
||||
from _typeshed import Incomplete
|
||||
from typing import TypeVar
|
||||
|
||||
from pygments.formatter import Formatter
|
||||
|
||||
@@ -6,9 +7,9 @@ _T = TypeVar("_T", str, bytes)
|
||||
|
||||
class IRCFormatter(Formatter[_T]):
|
||||
name: str
|
||||
aliases: Any
|
||||
filenames: Any
|
||||
darkbg: Any
|
||||
colorscheme: Any
|
||||
linenos: Any
|
||||
aliases: Incomplete
|
||||
filenames: Incomplete
|
||||
darkbg: Incomplete
|
||||
colorscheme: Incomplete
|
||||
linenos: Incomplete
|
||||
def format_unencoded(self, tokensource, outfile) -> None: ...
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from typing import Any, TypeVar
|
||||
from _typeshed import Incomplete
|
||||
from typing import TypeVar
|
||||
|
||||
from pygments.formatter import Formatter
|
||||
from pygments.lexer import Lexer
|
||||
@@ -7,28 +8,28 @@ _T = TypeVar("_T", str, bytes)
|
||||
|
||||
class LatexFormatter(Formatter[_T]):
|
||||
name: str
|
||||
aliases: Any
|
||||
filenames: Any
|
||||
docclass: Any
|
||||
preamble: Any
|
||||
linenos: Any
|
||||
linenostart: Any
|
||||
linenostep: Any
|
||||
verboptions: Any
|
||||
nobackground: Any
|
||||
commandprefix: Any
|
||||
texcomments: Any
|
||||
mathescape: Any
|
||||
escapeinside: Any
|
||||
left: Any
|
||||
right: Any
|
||||
envname: Any
|
||||
aliases: Incomplete
|
||||
filenames: Incomplete
|
||||
docclass: Incomplete
|
||||
preamble: Incomplete
|
||||
linenos: Incomplete
|
||||
linenostart: Incomplete
|
||||
linenostep: Incomplete
|
||||
verboptions: Incomplete
|
||||
nobackground: Incomplete
|
||||
commandprefix: Incomplete
|
||||
texcomments: Incomplete
|
||||
mathescape: Incomplete
|
||||
escapeinside: Incomplete
|
||||
left: Incomplete
|
||||
right: Incomplete
|
||||
envname: Incomplete
|
||||
def get_style_defs(self, arg: str = ""): ...
|
||||
def format_unencoded(self, tokensource, outfile) -> None: ...
|
||||
|
||||
class LatexEmbeddedLexer(Lexer):
|
||||
left: Any
|
||||
right: Any
|
||||
lang: Any
|
||||
left: Incomplete
|
||||
right: Incomplete
|
||||
lang: Incomplete
|
||||
def __init__(self, left, right, lang, **options) -> None: ...
|
||||
def get_tokens_unprocessed(self, text): ...
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from typing import Any, TypeVar
|
||||
from _typeshed import Incomplete
|
||||
from typing import TypeVar
|
||||
|
||||
from pygments.formatter import Formatter
|
||||
|
||||
@@ -6,21 +7,21 @@ _T = TypeVar("_T", str, bytes)
|
||||
|
||||
class NullFormatter(Formatter[_T]):
|
||||
name: str
|
||||
aliases: Any
|
||||
filenames: Any
|
||||
aliases: Incomplete
|
||||
filenames: Incomplete
|
||||
def format(self, tokensource, outfile) -> None: ...
|
||||
|
||||
class RawTokenFormatter(Formatter[bytes]):
|
||||
name: str
|
||||
aliases: Any
|
||||
filenames: Any
|
||||
aliases: Incomplete
|
||||
filenames: Incomplete
|
||||
unicodeoutput: bool
|
||||
encoding: str
|
||||
compress: Any
|
||||
error_color: Any
|
||||
compress: Incomplete
|
||||
error_color: Incomplete
|
||||
def format(self, tokensource, outfile) -> None: ...
|
||||
|
||||
class TestcaseFormatter(Formatter[_T]):
|
||||
name: str
|
||||
aliases: Any
|
||||
aliases: Incomplete
|
||||
def format(self, tokensource, outfile) -> None: ...
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from typing import Any, TypeVar
|
||||
from _typeshed import Incomplete
|
||||
from typing import TypeVar
|
||||
|
||||
from pygments.formatter import Formatter
|
||||
|
||||
@@ -6,7 +7,7 @@ _T = TypeVar("_T", str, bytes)
|
||||
|
||||
class PangoMarkupFormatter(Formatter[_T]):
|
||||
name: str
|
||||
aliases: Any
|
||||
filenames: Any
|
||||
styles: Any
|
||||
aliases: Incomplete
|
||||
filenames: Incomplete
|
||||
styles: Incomplete
|
||||
def format_unencoded(self, tokensource, outfile) -> None: ...
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from typing import Any, TypeVar
|
||||
from _typeshed import Incomplete
|
||||
from typing import TypeVar
|
||||
|
||||
from pygments.formatter import Formatter
|
||||
|
||||
@@ -6,8 +7,8 @@ _T = TypeVar("_T", str, bytes)
|
||||
|
||||
class RtfFormatter(Formatter[_T]):
|
||||
name: str
|
||||
aliases: Any
|
||||
filenames: Any
|
||||
fontface: Any
|
||||
fontsize: Any
|
||||
aliases: Incomplete
|
||||
filenames: Incomplete
|
||||
fontface: Incomplete
|
||||
fontsize: Incomplete
|
||||
def format_unencoded(self, tokensource, outfile) -> None: ...
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from typing import Any, TypeVar
|
||||
from _typeshed import Incomplete
|
||||
from typing import TypeVar
|
||||
|
||||
from pygments.formatter import Formatter
|
||||
|
||||
@@ -6,17 +7,17 @@ _T = TypeVar("_T", str, bytes)
|
||||
|
||||
class SvgFormatter(Formatter[_T]):
|
||||
name: str
|
||||
aliases: Any
|
||||
filenames: Any
|
||||
nowrap: Any
|
||||
fontfamily: Any
|
||||
fontsize: Any
|
||||
xoffset: Any
|
||||
yoffset: Any
|
||||
ystep: Any
|
||||
spacehack: Any
|
||||
linenos: Any
|
||||
linenostart: Any
|
||||
linenostep: Any
|
||||
linenowidth: Any
|
||||
aliases: Incomplete
|
||||
filenames: Incomplete
|
||||
nowrap: Incomplete
|
||||
fontfamily: Incomplete
|
||||
fontsize: Incomplete
|
||||
xoffset: Incomplete
|
||||
yoffset: Incomplete
|
||||
ystep: Incomplete
|
||||
spacehack: Incomplete
|
||||
linenos: Incomplete
|
||||
linenostart: Incomplete
|
||||
linenostep: Incomplete
|
||||
linenowidth: Incomplete
|
||||
def format_unencoded(self, tokensource, outfile) -> None: ...
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from typing import Any, TypeVar
|
||||
from _typeshed import Incomplete
|
||||
from typing import TypeVar
|
||||
|
||||
from pygments.formatter import Formatter
|
||||
|
||||
@@ -6,10 +7,10 @@ _T = TypeVar("_T", str, bytes)
|
||||
|
||||
class TerminalFormatter(Formatter[_T]):
|
||||
name: str
|
||||
aliases: Any
|
||||
filenames: Any
|
||||
darkbg: Any
|
||||
colorscheme: Any
|
||||
linenos: Any
|
||||
aliases: Incomplete
|
||||
filenames: Incomplete
|
||||
darkbg: Incomplete
|
||||
colorscheme: Incomplete
|
||||
linenos: Incomplete
|
||||
def format(self, tokensource, outfile): ...
|
||||
def format_unencoded(self, tokensource, outfile) -> None: ...
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
from typing import Any, TypeVar
|
||||
from _typeshed import Incomplete
|
||||
from typing import TypeVar
|
||||
|
||||
from pygments.formatter import Formatter
|
||||
|
||||
_T = TypeVar("_T", str, bytes)
|
||||
|
||||
class EscapeSequence:
|
||||
fg: Any
|
||||
bg: Any
|
||||
bold: Any
|
||||
underline: Any
|
||||
italic: Any
|
||||
fg: Incomplete
|
||||
bg: Incomplete
|
||||
bold: Incomplete
|
||||
underline: Incomplete
|
||||
italic: Incomplete
|
||||
def __init__(self, fg=None, bg=None, bold: bool = False, underline: bool = False, italic: bool = False) -> None: ...
|
||||
def escape(self, attrs): ...
|
||||
def color_string(self): ...
|
||||
@@ -18,19 +19,19 @@ class EscapeSequence:
|
||||
|
||||
class Terminal256Formatter(Formatter[_T]):
|
||||
name: str
|
||||
aliases: Any
|
||||
filenames: Any
|
||||
xterm_colors: Any
|
||||
best_match: Any
|
||||
style_string: Any
|
||||
usebold: Any
|
||||
useunderline: Any
|
||||
useitalic: Any
|
||||
linenos: Any
|
||||
aliases: Incomplete
|
||||
filenames: Incomplete
|
||||
xterm_colors: Incomplete
|
||||
best_match: Incomplete
|
||||
style_string: Incomplete
|
||||
usebold: Incomplete
|
||||
useunderline: Incomplete
|
||||
useitalic: Incomplete
|
||||
linenos: Incomplete
|
||||
def format(self, tokensource, outfile): ...
|
||||
def format_unencoded(self, tokensource, outfile) -> None: ...
|
||||
|
||||
class TerminalTrueColorFormatter(Terminal256Formatter[_T]):
|
||||
name: str
|
||||
aliases: Any
|
||||
filenames: Any
|
||||
aliases: Incomplete
|
||||
filenames: Incomplete
|
||||
|
||||
@@ -1,19 +1,18 @@
|
||||
from _typeshed import FileDescriptorOrPath, StrPath
|
||||
from collections.abc import Iterator
|
||||
from typing import Any
|
||||
|
||||
from pygments.lexer import Lexer, LexerMeta
|
||||
|
||||
def get_all_lexers(plugins: bool = True) -> Iterator[tuple[str, tuple[str, ...], tuple[str, ...], tuple[str, ...]]]: ...
|
||||
def find_lexer_class(name: str) -> LexerMeta | None: ...
|
||||
def find_lexer_class_by_name(_alias: str) -> LexerMeta: ...
|
||||
def get_lexer_by_name(_alias: str, **options: Any) -> Lexer: ...
|
||||
def load_lexer_from_file(filename: FileDescriptorOrPath, lexername: str = "CustomLexer", **options: Any) -> Lexer: ...
|
||||
def get_lexer_by_name(_alias: str, **options) -> Lexer: ...
|
||||
def load_lexer_from_file(filename: FileDescriptorOrPath, lexername: str = "CustomLexer", **options) -> Lexer: ...
|
||||
def find_lexer_class_for_filename(_fn: StrPath, code: str | bytes | None = None) -> LexerMeta | None: ...
|
||||
def get_lexer_for_filename(_fn: StrPath, code: str | bytes | None = None, **options: Any) -> Lexer: ...
|
||||
def get_lexer_for_mimetype(_mime: str, **options: Any) -> Lexer: ...
|
||||
def guess_lexer_for_filename(_fn: StrPath, _text: str, **options: Any) -> Lexer: ...
|
||||
def guess_lexer(_text: str | bytes, **options: Any) -> Lexer: ...
|
||||
def get_lexer_for_filename(_fn: StrPath, code: str | bytes | None = None, **options) -> Lexer: ...
|
||||
def get_lexer_for_mimetype(_mime: str, **options) -> Lexer: ...
|
||||
def guess_lexer_for_filename(_fn: StrPath, _text: str, **options) -> Lexer: ...
|
||||
def guess_lexer(_text: str | bytes, **options) -> Lexer: ...
|
||||
|
||||
# Having every lexer class here doesn't seem to be worth it
|
||||
def __getattr__(name: str): ... # incomplete module
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import sys
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Generator
|
||||
from typing import Any
|
||||
|
||||
from pygments.filter import Filter
|
||||
from pygments.formatter import Formatter
|
||||
@@ -21,7 +21,7 @@ else:
|
||||
|
||||
def iter_entry_points(group_name: str) -> tuple[EntryPoint, ...] | list[EntryPoint]: ...
|
||||
|
||||
def find_plugin_lexers() -> Generator[type[Lexer], None, None]: ...
|
||||
def find_plugin_formatters() -> Generator[tuple[str, type[Formatter[Any]]], None, None]: ...
|
||||
def find_plugin_styles() -> Generator[tuple[str, type[Style]], None, None]: ...
|
||||
def find_plugin_filters() -> Generator[tuple[str, type[Filter]], None, None]: ...
|
||||
def find_plugin_lexers() -> Generator[type[Lexer]]: ...
|
||||
def find_plugin_formatters() -> Generator[tuple[str, type[Formatter[Incomplete]]]]: ...
|
||||
def find_plugin_styles() -> Generator[tuple[str, type[Style]]]: ...
|
||||
def find_plugin_filters() -> Generator[tuple[str, type[Filter]]]: ...
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from typing import Any
|
||||
from _typeshed import Incomplete
|
||||
|
||||
CS_ESCAPE: Any
|
||||
FIRST_ELEMENT: Any
|
||||
CS_ESCAPE: Incomplete
|
||||
FIRST_ELEMENT: Incomplete
|
||||
|
||||
def make_charset(letters): ...
|
||||
def regex_opt_inner(strings, open_paren): ...
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
from typing import Any
|
||||
from _typeshed import Incomplete
|
||||
|
||||
class EndOfText(RuntimeError): ...
|
||||
|
||||
class Scanner:
|
||||
data: Any
|
||||
data_length: Any
|
||||
data: Incomplete
|
||||
data_length: Incomplete
|
||||
start_pos: int
|
||||
pos: int
|
||||
flags: Any
|
||||
last: Any
|
||||
match: Any
|
||||
flags: Incomplete
|
||||
last: Incomplete
|
||||
match: Incomplete
|
||||
def __init__(self, text, flags: int = 0) -> None: ...
|
||||
@property
|
||||
def eos(self): ...
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from typing import Any
|
||||
from _typeshed import Incomplete
|
||||
|
||||
Cc: str
|
||||
Cf: str
|
||||
@@ -32,7 +32,7 @@ Zp: str
|
||||
Zs: str
|
||||
xid_continue: str
|
||||
xid_start: str
|
||||
cats: Any
|
||||
cats: Incomplete
|
||||
|
||||
def combine(*args): ...
|
||||
def allexcept(*args): ...
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
from _typeshed import Incomplete
|
||||
from io import TextIOWrapper
|
||||
from typing import Any
|
||||
|
||||
split_path_re: Any
|
||||
doctype_lookup_re: Any
|
||||
tag_re: Any
|
||||
xml_decl_re: Any
|
||||
split_path_re: Incomplete
|
||||
doctype_lookup_re: Incomplete
|
||||
tag_re: Incomplete
|
||||
xml_decl_re: Incomplete
|
||||
|
||||
class ClassNotFound(ValueError): ...
|
||||
class OptionError(Exception): ...
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user