basedpyright 1.12.2 → 1.12.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/pyright-langserver.js +1 -1
- package/dist/pyright-langserver.js.map +1 -1
- package/dist/pyright.js +1 -1
- package/dist/pyright.js.map +1 -1
- package/dist/typeshed-fallback/README.md +2 -2
- package/dist/typeshed-fallback/commit.txt +1 -1
- package/dist/typeshed-fallback/stdlib/VERSIONS +1 -1
- package/dist/typeshed-fallback/stdlib/_ast.pyi +661 -22
- package/dist/typeshed-fallback/stdlib/_ctypes.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/_socket.pyi +2 -2
- package/dist/typeshed-fallback/stdlib/_stat.pyi +27 -13
- package/dist/typeshed-fallback/stdlib/_typeshed/__init__.pyi +2 -0
- package/dist/typeshed-fallback/stdlib/_typeshed/importlib.pyi +18 -0
- package/dist/typeshed-fallback/stdlib/_weakref.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/_weakrefset.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/array.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/ast.pyi +160 -70
- package/dist/typeshed-fallback/stdlib/asyncio/futures.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/asyncio/queues.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/asyncio/tasks.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/atexit.pyi +2 -2
- package/dist/typeshed-fallback/stdlib/builtins.pyi +30 -8
- package/dist/typeshed-fallback/stdlib/calendar.pyi +29 -29
- package/dist/typeshed-fallback/stdlib/code.pyi +27 -8
- package/dist/typeshed-fallback/stdlib/concurrent/futures/_base.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/concurrent/futures/thread.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/contextvars.pyi +2 -2
- package/dist/typeshed-fallback/stdlib/csv.pyi +4 -4
- package/dist/typeshed-fallback/stdlib/ctypes/__init__.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/dataclasses.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/dbm/__init__.pyi +9 -2
- package/dist/typeshed-fallback/stdlib/dbm/dumb.pyi +7 -1
- package/dist/typeshed-fallback/stdlib/dbm/gnu.pyi +5 -2
- package/dist/typeshed-fallback/stdlib/dbm/ndbm.pyi +5 -2
- package/dist/typeshed-fallback/stdlib/difflib.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/dis.pyi +16 -1
- package/dist/typeshed-fallback/stdlib/distutils/archive_util.pyi +22 -7
- package/dist/typeshed-fallback/stdlib/distutils/ccompiler.pyi +37 -16
- package/dist/typeshed-fallback/stdlib/distutils/cmd.pyi +52 -19
- package/dist/typeshed-fallback/stdlib/distutils/command/bdist_msi.pyi +4 -4
- package/dist/typeshed-fallback/stdlib/distutils/command/build.pyi +4 -2
- package/dist/typeshed-fallback/stdlib/distutils/command/build_py.pyi +2 -2
- package/dist/typeshed-fallback/stdlib/distutils/command/check.pyi +2 -2
- package/dist/typeshed-fallback/stdlib/distutils/command/config.pyi +5 -4
- package/dist/typeshed-fallback/stdlib/distutils/command/install.pyi +4 -2
- package/dist/typeshed-fallback/stdlib/distutils/command/register.pyi +4 -2
- package/dist/typeshed-fallback/stdlib/distutils/command/sdist.pyi +4 -2
- package/dist/typeshed-fallback/stdlib/distutils/core.pyi +2 -2
- package/dist/typeshed-fallback/stdlib/distutils/dep_util.pyi +14 -3
- package/dist/typeshed-fallback/stdlib/distutils/dir_util.pyi +20 -10
- package/dist/typeshed-fallback/stdlib/distutils/dist.pyi +8 -5
- package/dist/typeshed-fallback/stdlib/distutils/file_util.pyi +35 -11
- package/dist/typeshed-fallback/stdlib/distutils/filelist.pyi +11 -3
- package/dist/typeshed-fallback/stdlib/distutils/spawn.pyi +5 -1
- package/dist/typeshed-fallback/stdlib/distutils/sysconfig.pyi +4 -2
- package/dist/typeshed-fallback/stdlib/distutils/text_file.pyi +7 -7
- package/dist/typeshed-fallback/stdlib/distutils/util.pyi +9 -5
- package/dist/typeshed-fallback/stdlib/faulthandler.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/filecmp.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/fileinput.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/functools.pyi +3 -3
- package/dist/typeshed-fallback/stdlib/genericpath.pyi +7 -0
- package/dist/typeshed-fallback/stdlib/graphlib.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/gzip.pyi +3 -3
- package/dist/typeshed-fallback/stdlib/http/__init__.pyi +11 -4
- package/dist/typeshed-fallback/stdlib/http/cookies.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/importlib/abc.pyi +2 -2
- package/dist/typeshed-fallback/stdlib/importlib/util.pyi +3 -2
- package/dist/typeshed-fallback/stdlib/inspect.pyi +6 -0
- package/dist/typeshed-fallback/stdlib/keyword.pyi +2 -2
- package/dist/typeshed-fallback/stdlib/logging/__init__.pyi +69 -42
- package/dist/typeshed-fallback/stdlib/mailbox.pyi +2 -2
- package/dist/typeshed-fallback/stdlib/marshal.pyi +12 -4
- package/dist/typeshed-fallback/stdlib/math.pyi +3 -0
- package/dist/typeshed-fallback/stdlib/multiprocessing/managers.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/multiprocessing/pool.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/multiprocessing/queues.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/multiprocessing/shared_memory.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/ntpath.pyi +8 -1
- package/dist/typeshed-fallback/stdlib/opcode.pyi +6 -2
- package/dist/typeshed-fallback/stdlib/optparse.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/os/__init__.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/pathlib.pyi +6 -2
- package/dist/typeshed-fallback/stdlib/pkgutil.pyi +6 -6
- package/dist/typeshed-fallback/stdlib/posixpath.pyi +5 -0
- package/dist/typeshed-fallback/stdlib/queue.pyi +4 -2
- package/dist/typeshed-fallback/stdlib/random.pyi +4 -1
- package/dist/typeshed-fallback/stdlib/re.pyi +20 -9
- package/dist/typeshed-fallback/stdlib/shelve.pyi +15 -2
- package/dist/typeshed-fallback/stdlib/shutil.pyi +38 -8
- package/dist/typeshed-fallback/stdlib/signal.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/socket.pyi +13 -0
- package/dist/typeshed-fallback/stdlib/stat.pyi +6 -0
- package/dist/typeshed-fallback/stdlib/statistics.pyi +30 -1
- package/dist/typeshed-fallback/stdlib/subprocess.pyi +2 -2
- package/dist/typeshed-fallback/stdlib/sys/__init__.pyi +15 -19
- package/dist/typeshed-fallback/stdlib/syslog.pyi +9 -0
- package/dist/typeshed-fallback/stdlib/tempfile.pyi +7 -3
- package/dist/typeshed-fallback/stdlib/threading.pyi +3 -0
- package/dist/typeshed-fallback/stdlib/token.pyi +5 -4
- package/dist/typeshed-fallback/stdlib/tokenize.pyi +10 -3
- package/dist/typeshed-fallback/stdlib/types.pyi +20 -18
- package/dist/typeshed-fallback/stdlib/typing.pyi +75 -21
- package/dist/typeshed-fallback/stdlib/typing_extensions.pyi +104 -83
- package/dist/typeshed-fallback/stdlib/unittest/case.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/urllib/parse.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/urllib/request.pyi +17 -10
- package/dist/typeshed-fallback/stdlib/venv/__init__.pyi +31 -3
- package/dist/typeshed-fallback/stdlib/warnings.pyi +13 -1
- package/dist/typeshed-fallback/stdlib/wsgiref/util.pyi +2 -0
- package/dist/typeshed-fallback/stubs/Pillow/PIL/DdsImagePlugin.pyi +17 -17
- package/dist/typeshed-fallback/stubs/Pillow/PIL/Image.pyi +29 -29
- package/dist/typeshed-fallback/stubs/Pillow/PIL/WalImageFile.pyi +2 -1
- package/dist/typeshed-fallback/stubs/Pillow/PIL/_binary.pyi +13 -13
- package/dist/typeshed-fallback/stubs/WebOb/webob/multidict.pyi +8 -3
- package/dist/typeshed-fallback/stubs/WebOb/webob/request.pyi +10 -3
- package/dist/typeshed-fallback/stubs/antlr4-python3-runtime/antlr4/atn/ATNType.pyi +2 -2
- package/dist/typeshed-fallback/stubs/antlr4-python3-runtime/antlr4/atn/LexerAction.pyi +8 -8
- package/dist/typeshed-fallback/stubs/antlr4-python3-runtime/antlr4/atn/PredictionMode.pyi +3 -3
- package/dist/typeshed-fallback/stubs/assertpy/METADATA.toml +2 -0
- package/dist/typeshed-fallback/stubs/assertpy/assertpy/__init__.pyi +12 -0
- package/dist/typeshed-fallback/stubs/assertpy/assertpy/assertpy.pyi +70 -0
- package/dist/typeshed-fallback/stubs/assertpy/assertpy/base.pyi +21 -0
- package/dist/typeshed-fallback/stubs/assertpy/assertpy/collection.pyi +11 -0
- package/dist/typeshed-fallback/stubs/assertpy/assertpy/contains.pyi +16 -0
- package/dist/typeshed-fallback/stubs/assertpy/assertpy/date.pyi +11 -0
- package/dist/typeshed-fallback/stubs/assertpy/assertpy/dict.pyi +12 -0
- package/dist/typeshed-fallback/stubs/assertpy/assertpy/dynamic.pyi +7 -0
- package/dist/typeshed-fallback/stubs/assertpy/assertpy/exception.pyi +8 -0
- package/dist/typeshed-fallback/stubs/assertpy/assertpy/extracting.pyi +7 -0
- package/dist/typeshed-fallback/stubs/assertpy/assertpy/file.pyi +15 -0
- package/dist/typeshed-fallback/stubs/assertpy/assertpy/helpers.pyi +3 -0
- package/dist/typeshed-fallback/stubs/assertpy/assertpy/numeric.pyi +24 -0
- package/dist/typeshed-fallback/stubs/assertpy/assertpy/snapshot.pyi +6 -0
- package/dist/typeshed-fallback/stubs/assertpy/assertpy/string.pyi +18 -0
- package/dist/typeshed-fallback/stubs/beautifulsoup4/bs4/element.pyi +15 -7
- package/dist/typeshed-fallback/stubs/docker/docker/api/container.pyi +119 -61
- package/dist/typeshed-fallback/stubs/docker/docker/errors.pyi +3 -3
- package/dist/typeshed-fallback/stubs/docker/docker/models/containers.pyi +31 -20
- package/dist/typeshed-fallback/stubs/docker/docker/utils/json_stream.pyi +16 -8
- package/dist/typeshed-fallback/stubs/flake8/METADATA.toml +3 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/__init__.pyi +8 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/_compat.pyi +5 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/api/__init__.pyi +0 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/api/legacy.pyi +27 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/checker.pyi +56 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/defaults.pyi +12 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/discover_files.pyi +8 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/exceptions.pyi +24 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/formatting/__init__.pyi +0 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/formatting/_windows_color.pyi +1 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/formatting/base.pyi +24 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/formatting/default.pyi +29 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/main/__init__.pyi +0 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/main/application.pyi +29 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/main/cli.pyi +3 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/main/debug.pyi +5 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/main/options.pyi +12 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/options/__init__.pyi +0 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/options/aggregator.pyi +12 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/options/config.pyi +10 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/options/manager.pyi +71 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/options/parse_args.pyi +6 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/plugins/__init__.pyi +0 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/plugins/finder.pyi +48 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/plugins/pycodestyle.pyi +32 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/plugins/pyflakes.pyi +21 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/plugins/reporter.pyi +9 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/processor.pyi +72 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/statistics.pyi +28 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/style_guide.pyi +70 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/utils.pyi +25 -0
- package/dist/typeshed-fallback/stubs/flake8/flake8/violation.pyi +13 -0
- package/dist/typeshed-fallback/stubs/fpdf2/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/fpdf2/fpdf/bidi.pyi +5 -3
- package/dist/typeshed-fallback/stubs/fpdf2/fpdf/drawing.pyi +5 -1
- package/dist/typeshed-fallback/stubs/fpdf2/fpdf/enums.pyi +15 -2
- package/dist/typeshed-fallback/stubs/fpdf2/fpdf/fpdf.pyi +2 -1
- package/dist/typeshed-fallback/stubs/fpdf2/fpdf/html.pyi +45 -32
- package/dist/typeshed-fallback/stubs/fpdf2/fpdf/line_break.pyi +4 -4
- package/dist/typeshed-fallback/stubs/fpdf2/fpdf/outline.pyi +1 -1
- package/dist/typeshed-fallback/stubs/fpdf2/fpdf/svg.pyi +0 -1
- package/dist/typeshed-fallback/stubs/fpdf2/fpdf/table.pyi +2 -1
- package/dist/typeshed-fallback/stubs/fpdf2/fpdf/util.pyi +4 -0
- package/dist/typeshed-fallback/stubs/hvac/hvac/adapters.pyi +1 -1
- package/dist/typeshed-fallback/stubs/hvac/hvac/v1/__init__.pyi +35 -23
- package/dist/typeshed-fallback/stubs/influxdb-client/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/influxdb-client/influxdb_client/client/exceptions.pyi +3 -1
- package/dist/typeshed-fallback/stubs/influxdb-client/influxdb_client/rest.pyi +8 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/dag.pyi +2 -0
- package/dist/typeshed-fallback/stubs/psutil/psutil/__init__.pyi +1 -1
- package/dist/typeshed-fallback/stubs/psutil/psutil/_pswindows.pyi +8 -6
- package/dist/typeshed-fallback/stubs/pyaudio/METADATA.toml +2 -2
- package/dist/typeshed-fallback/stubs/pyflakes/pyflakes/scripts/__init__.pyi +0 -0
- package/dist/typeshed-fallback/stubs/pyflakes/pyflakes/scripts/pyflakes.pyi +8 -0
- package/dist/typeshed-fallback/stubs/pygit2/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/pygit2/pygit2/_pygit2.pyi +1 -15
- package/dist/typeshed-fallback/stubs/pygit2/pygit2/enums.pyi +313 -314
- package/dist/typeshed-fallback/stubs/pygit2/pygit2/index.pyi +2 -1
- package/dist/typeshed-fallback/stubs/pygit2/pygit2/remotes.pyi +7 -1
- package/dist/typeshed-fallback/stubs/pygit2/pygit2/repository.pyi +4 -14
- package/dist/typeshed-fallback/stubs/pygit2/pygit2/utils.pyi +7 -1
- package/dist/typeshed-fallback/stubs/pynput/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/regex/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/regex/regex/_regex_core.pyi +35 -35
- package/dist/typeshed-fallback/stubs/regex/regex/regex.pyi +10 -10
- package/dist/typeshed-fallback/stubs/requests/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/setuptools/pkg_resources/__init__.pyi +16 -9
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/__init__.pyi +4 -2
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/_modified.pyi +16 -5
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/archive_util.pyi +25 -10
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/ccompiler.pyi +38 -16
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/cmd.pyi +58 -30
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/command/build_py.pyi +2 -1
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/command/install_lib.pyi +1 -1
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/command/install_scripts.pyi +1 -1
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/command/upload.pyi +2 -2
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/dep_util.pyi +1 -3
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/dist.pyi +8 -5
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/filelist.pyi +14 -6
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/sysconfig.pyi +4 -2
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/util.pyi +8 -4
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/build_meta.pyi +4 -3
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/bdist_egg.pyi +9 -1
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/build_ext.pyi +2 -2
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/install.pyi +3 -1
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/install_lib.pyi +10 -1
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/install_scripts.pyi +1 -3
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/upload_docs.pyi +2 -3
- package/dist/typeshed-fallback/stubs/setuptools/setuptools/config/expand.pyi +1 -1
- package/dist/typeshed-fallback/stubs/six/six/__init__.pyi +1 -1
- package/dist/typeshed-fallback/stubs/uWSGI/METADATA.toml +4 -1
- package/dist/typeshed-fallback/stubs/ujson/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/wurlitzer/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/wurlitzer/wurlitzer.pyi +48 -6
- package/package.json +1 -1
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
from _typeshed import Incomplete
|
|
2
|
+
from argparse import Namespace
|
|
3
|
+
from ast import AST
|
|
4
|
+
from collections.abc import Generator
|
|
5
|
+
from logging import Logger
|
|
6
|
+
from tokenize import TokenInfo
|
|
7
|
+
from typing import Any, Final
|
|
8
|
+
from typing_extensions import TypeAlias
|
|
9
|
+
|
|
10
|
+
from .plugins.finder import LoadedPlugin
|
|
11
|
+
|
|
12
|
+
LOG: Logger
|
|
13
|
+
NEWLINE: Final[frozenset[int]]
|
|
14
|
+
SKIP_TOKENS: Final[frozenset[int]]
|
|
15
|
+
|
|
16
|
+
_LogicalMapping: TypeAlias = list[tuple[int, tuple[int, int]]]
|
|
17
|
+
_Logical: TypeAlias = tuple[list[str], list[str], _LogicalMapping]
|
|
18
|
+
|
|
19
|
+
class FileProcessor:
|
|
20
|
+
noqa: bool
|
|
21
|
+
options: Incomplete
|
|
22
|
+
filename: Incomplete
|
|
23
|
+
lines: Incomplete
|
|
24
|
+
blank_before: int
|
|
25
|
+
blank_lines: int
|
|
26
|
+
checker_state: Incomplete
|
|
27
|
+
hang_closing: Incomplete
|
|
28
|
+
indent_char: Incomplete
|
|
29
|
+
indent_level: int
|
|
30
|
+
indent_size: Incomplete
|
|
31
|
+
line_number: int
|
|
32
|
+
logical_line: str
|
|
33
|
+
max_line_length: Incomplete
|
|
34
|
+
max_doc_length: Incomplete
|
|
35
|
+
multiline: bool
|
|
36
|
+
previous_indent_level: int
|
|
37
|
+
previous_logical: str
|
|
38
|
+
previous_unindented_logical_line: str
|
|
39
|
+
tokens: Incomplete
|
|
40
|
+
total_lines: Incomplete
|
|
41
|
+
verbose: Incomplete
|
|
42
|
+
statistics: Incomplete
|
|
43
|
+
def __init__(self, filename: str, options: Namespace, lines: list[str] | None = None) -> None: ...
|
|
44
|
+
@property
|
|
45
|
+
def file_tokens(self) -> list[TokenInfo]: ...
|
|
46
|
+
def fstring_start(self, lineno: int) -> None: ...
|
|
47
|
+
def multiline_string(self, token: TokenInfo) -> Generator[str, None, None]: ...
|
|
48
|
+
def reset_blank_before(self) -> None: ...
|
|
49
|
+
def delete_first_token(self) -> None: ...
|
|
50
|
+
def visited_new_blank_line(self) -> None: ...
|
|
51
|
+
def update_state(self, mapping: _LogicalMapping) -> None: ...
|
|
52
|
+
def update_checker_state_for(self, plugin: LoadedPlugin) -> None: ...
|
|
53
|
+
def next_logical_line(self) -> None: ...
|
|
54
|
+
def build_logical_line_tokens(self) -> _Logical: ...
|
|
55
|
+
def build_ast(self) -> AST: ...
|
|
56
|
+
def build_logical_line(self) -> tuple[str, str, _LogicalMapping]: ...
|
|
57
|
+
def keyword_arguments_for(self, parameters: dict[str, bool], arguments: dict[str, Any]) -> dict[str, Any]: ...
|
|
58
|
+
def generate_tokens(self) -> Generator[TokenInfo, None, None]: ...
|
|
59
|
+
def noqa_line_for(self, line_number: int) -> str | None: ...
|
|
60
|
+
def next_line(self) -> str: ...
|
|
61
|
+
def read_lines(self) -> list[str]: ...
|
|
62
|
+
def read_lines_from_filename(self) -> list[str]: ...
|
|
63
|
+
def read_lines_from_stdin(self) -> list[str]: ...
|
|
64
|
+
def should_ignore_file(self) -> bool: ...
|
|
65
|
+
def strip_utf_bom(self) -> None: ...
|
|
66
|
+
|
|
67
|
+
def is_eol_token(token: TokenInfo) -> bool: ...
|
|
68
|
+
def is_multiline_string(token: TokenInfo) -> bool: ...
|
|
69
|
+
def token_is_newline(token: TokenInfo) -> bool: ...
|
|
70
|
+
def count_parentheses(current_parentheses_count: int, token_text: str) -> int: ...
|
|
71
|
+
def expand_indent(line: str) -> int: ...
|
|
72
|
+
def mutate_string(text: str) -> str: ...
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
from _typeshed import Incomplete
|
|
2
|
+
from collections.abc import Generator
|
|
3
|
+
from typing import NamedTuple
|
|
4
|
+
|
|
5
|
+
from .violation import Violation
|
|
6
|
+
|
|
7
|
+
class Statistics:
|
|
8
|
+
def __init__(self) -> None: ...
|
|
9
|
+
def error_codes(self) -> list[str]: ...
|
|
10
|
+
def record(self, error: Violation) -> None: ...
|
|
11
|
+
def statistics_for(self, prefix: str, filename: str | None = None) -> Generator[Statistic, None, None]: ...
|
|
12
|
+
|
|
13
|
+
class Key(NamedTuple):
|
|
14
|
+
filename: str
|
|
15
|
+
code: str
|
|
16
|
+
@classmethod
|
|
17
|
+
def create_from(cls, error: Violation) -> Key: ...
|
|
18
|
+
def matches(self, prefix: str, filename: str | None) -> bool: ...
|
|
19
|
+
|
|
20
|
+
class Statistic:
|
|
21
|
+
error_code: Incomplete
|
|
22
|
+
filename: Incomplete
|
|
23
|
+
message: Incomplete
|
|
24
|
+
count: Incomplete
|
|
25
|
+
def __init__(self, error_code: str, filename: str, message: str, count: int) -> None: ...
|
|
26
|
+
@classmethod
|
|
27
|
+
def create_from(cls, error: Violation) -> Statistic: ...
|
|
28
|
+
def increment(self) -> None: ...
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import argparse
|
|
2
|
+
import enum
|
|
3
|
+
from _typeshed import Incomplete
|
|
4
|
+
from collections.abc import Generator, Sequence
|
|
5
|
+
|
|
6
|
+
from .formatting.base import BaseFormatter
|
|
7
|
+
from .statistics import Statistics
|
|
8
|
+
|
|
9
|
+
__all__ = ("StyleGuide",)
|
|
10
|
+
|
|
11
|
+
class Selected(enum.Enum):
|
|
12
|
+
Explicitly = "explicitly selected"
|
|
13
|
+
Implicitly = "implicitly selected"
|
|
14
|
+
|
|
15
|
+
class Ignored(enum.Enum):
|
|
16
|
+
Explicitly = "explicitly ignored"
|
|
17
|
+
Implicitly = "implicitly ignored"
|
|
18
|
+
|
|
19
|
+
class Decision(enum.Enum):
|
|
20
|
+
Ignored = "ignored error"
|
|
21
|
+
Selected = "selected error"
|
|
22
|
+
|
|
23
|
+
class DecisionEngine:
|
|
24
|
+
cache: Incomplete
|
|
25
|
+
selected_explicitly: Incomplete
|
|
26
|
+
ignored_explicitly: Incomplete
|
|
27
|
+
selected: Incomplete
|
|
28
|
+
ignored: Incomplete
|
|
29
|
+
def __init__(self, options: argparse.Namespace) -> None: ...
|
|
30
|
+
def was_selected(self, code: str) -> Selected | Ignored: ...
|
|
31
|
+
def was_ignored(self, code: str) -> Selected | Ignored: ...
|
|
32
|
+
def make_decision(self, code: str) -> Decision: ...
|
|
33
|
+
def decision_for(self, code: str) -> Decision: ...
|
|
34
|
+
|
|
35
|
+
class StyleGuideManager:
|
|
36
|
+
options: Incomplete
|
|
37
|
+
formatter: Incomplete
|
|
38
|
+
stats: Incomplete
|
|
39
|
+
decider: Incomplete
|
|
40
|
+
style_guides: Incomplete
|
|
41
|
+
default_style_guide: Incomplete
|
|
42
|
+
style_guide_for: Incomplete
|
|
43
|
+
def __init__(self, options: argparse.Namespace, formatter: BaseFormatter, decider: DecisionEngine | None = None) -> None: ...
|
|
44
|
+
def populate_style_guides_with(self, options: argparse.Namespace) -> Generator[StyleGuide, None, None]: ...
|
|
45
|
+
def processing_file(self, filename: str) -> Generator[StyleGuide, None, None]: ...
|
|
46
|
+
def handle_error(
|
|
47
|
+
self, code: str, filename: str, line_number: int, column_number: int, text: str, physical_line: str | None = None
|
|
48
|
+
) -> int: ...
|
|
49
|
+
|
|
50
|
+
class StyleGuide:
|
|
51
|
+
options: Incomplete
|
|
52
|
+
formatter: Incomplete
|
|
53
|
+
stats: Incomplete
|
|
54
|
+
decider: Incomplete
|
|
55
|
+
filename: Incomplete
|
|
56
|
+
def __init__(
|
|
57
|
+
self,
|
|
58
|
+
options: argparse.Namespace,
|
|
59
|
+
formatter: BaseFormatter,
|
|
60
|
+
stats: Statistics,
|
|
61
|
+
filename: str | None = None,
|
|
62
|
+
decider: DecisionEngine | None = None,
|
|
63
|
+
) -> None: ...
|
|
64
|
+
def copy(self, filename: str | None = None, extend_ignore_with: Sequence[str] | None = None) -> StyleGuide: ...
|
|
65
|
+
def processing_file(self, filename: str) -> Generator[StyleGuide, None, None]: ...
|
|
66
|
+
def applies_to(self, filename: str) -> bool: ...
|
|
67
|
+
def should_report_error(self, code: str) -> Decision: ...
|
|
68
|
+
def handle_error(
|
|
69
|
+
self, code: str, filename: str, line_number: int, column_number: int, text: str, physical_line: str | None = None
|
|
70
|
+
) -> int: ...
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
from collections.abc import Sequence
|
|
3
|
+
from re import Pattern
|
|
4
|
+
from typing import Final, NamedTuple
|
|
5
|
+
|
|
6
|
+
COMMA_SEPARATED_LIST_RE: Final[Pattern[str]]
|
|
7
|
+
LOCAL_PLUGIN_LIST_RE: Final[Pattern[str]]
|
|
8
|
+
NORMALIZE_PACKAGE_NAME_RE: Final[Pattern[str]]
|
|
9
|
+
|
|
10
|
+
def parse_comma_separated_list(value: str, regexp: Pattern[str] = ...) -> list[str]: ...
|
|
11
|
+
|
|
12
|
+
class _Token(NamedTuple):
|
|
13
|
+
tp: str
|
|
14
|
+
src: str
|
|
15
|
+
|
|
16
|
+
def parse_files_to_codes_mapping(value_: Sequence[str] | str) -> list[tuple[str, list[str]]]: ...
|
|
17
|
+
def normalize_paths(paths: Sequence[str], parent: str = ".") -> list[str]: ...
|
|
18
|
+
def normalize_path(path: str, parent: str = ".") -> str: ...
|
|
19
|
+
def stdin_get_value() -> str: ...
|
|
20
|
+
def stdin_get_lines() -> list[str]: ...
|
|
21
|
+
def is_using_stdin(paths: list[str]) -> bool: ...
|
|
22
|
+
def fnmatch(filename: str, patterns: Sequence[str]) -> bool: ...
|
|
23
|
+
def matches_filename(path: str, patterns: Sequence[str], log_message: str, logger: logging.Logger) -> bool: ...
|
|
24
|
+
def get_python_version() -> str: ...
|
|
25
|
+
def normalize_pypi_name(s: str) -> str: ...
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
from logging import Logger
|
|
2
|
+
from typing import NamedTuple
|
|
3
|
+
|
|
4
|
+
LOG: Logger
|
|
5
|
+
|
|
6
|
+
class Violation(NamedTuple):
|
|
7
|
+
code: str
|
|
8
|
+
filename: str
|
|
9
|
+
line_number: int
|
|
10
|
+
column_number: int
|
|
11
|
+
text: str
|
|
12
|
+
physical_line: str | None
|
|
13
|
+
def is_inline_ignored(self, disable_noqa: bool) -> bool: ...
|
|
@@ -3,6 +3,8 @@ from collections.abc import Sequence
|
|
|
3
3
|
from dataclasses import dataclass
|
|
4
4
|
from typing import Final, Literal, TypedDict, type_check_only
|
|
5
5
|
|
|
6
|
+
from .enums import TextDirection
|
|
7
|
+
|
|
6
8
|
MAX_DEPTH: Final = 125
|
|
7
9
|
|
|
8
10
|
@type_check_only
|
|
@@ -40,17 +42,17 @@ class IsolatingRun:
|
|
|
40
42
|
def resolve_neutral_types(self) -> None: ...
|
|
41
43
|
def resolve_implicit_levels(self) -> None: ...
|
|
42
44
|
|
|
43
|
-
def auto_detect_base_direction(string: str, stop_at_pdi: bool = False, debug: bool = False) ->
|
|
45
|
+
def auto_detect_base_direction(string: str, stop_at_pdi: bool = False, debug: bool = False) -> TextDirection: ...
|
|
44
46
|
def calculate_isolate_runs(paragraph: Sequence[BidiCharacter]) -> list[IsolatingRun]: ...
|
|
45
47
|
|
|
46
48
|
class BidiParagraph:
|
|
47
49
|
text: str
|
|
48
|
-
base_direction:
|
|
50
|
+
base_direction: TextDirection
|
|
49
51
|
debug: bool
|
|
50
52
|
base_embedding_level: int
|
|
51
53
|
characters: list[BidiCharacter]
|
|
52
54
|
|
|
53
|
-
def __init__(self, text: str, base_direction:
|
|
55
|
+
def __init__(self, text: str, base_direction: TextDirection | None = None, debug: bool = False) -> None: ...
|
|
54
56
|
def get_characters(self) -> list[BidiCharacter]: ...
|
|
55
57
|
def get_characters_with_embedding_level(self) -> list[BidiCharacter]: ...
|
|
56
58
|
def get_reordered_characters(self) -> list[BidiCharacter]: ...
|
|
@@ -41,6 +41,8 @@ class DeviceRGB(_DeviceRGBBase):
|
|
|
41
41
|
def __new__(cls, r: Number, g: Number, b: Number, a: Number | None = None) -> Self: ...
|
|
42
42
|
@property
|
|
43
43
|
def colors(self) -> tuple[Number, Number, Number]: ...
|
|
44
|
+
@property
|
|
45
|
+
def colors255(self) -> tuple[Number, Number, Number]: ...
|
|
44
46
|
def serialize(self) -> str: ...
|
|
45
47
|
|
|
46
48
|
class _DeviceGrayBase(NamedTuple):
|
|
@@ -51,7 +53,9 @@ class DeviceGray(_DeviceGrayBase):
|
|
|
51
53
|
OPERATOR: ClassVar[str]
|
|
52
54
|
def __new__(cls, g: Number, a: Number | None = None) -> Self: ...
|
|
53
55
|
@property
|
|
54
|
-
def colors(self) -> tuple[Number]: ...
|
|
56
|
+
def colors(self) -> tuple[Number, Number, Number]: ...
|
|
57
|
+
@property
|
|
58
|
+
def colors255(self) -> tuple[Number, Number, Number]: ...
|
|
55
59
|
def serialize(self) -> str: ...
|
|
56
60
|
|
|
57
61
|
class _DeviceCMYKBase(NamedTuple):
|
|
@@ -44,6 +44,7 @@ class VAlign(CoerciveEnum):
|
|
|
44
44
|
B = "BOTTOM"
|
|
45
45
|
|
|
46
46
|
class TextEmphasis(CoerciveIntFlag):
|
|
47
|
+
NONE = 0
|
|
47
48
|
B = 1
|
|
48
49
|
I = 2
|
|
49
50
|
U = 4
|
|
@@ -70,12 +71,18 @@ class TableCellFillMode(CoerciveEnum):
|
|
|
70
71
|
ALL = "ALL"
|
|
71
72
|
ROWS = "ROWS"
|
|
72
73
|
COLUMNS = "COLUMNS"
|
|
74
|
+
EVEN_ROWS = "EVEN_ROWS"
|
|
75
|
+
EVEN_COLUMNS = "EVEN_COLUMNS"
|
|
73
76
|
|
|
74
77
|
def should_fill_cell(self, i: int, j: int) -> bool: ...
|
|
75
78
|
|
|
76
79
|
class TableSpan(CoerciveEnum):
|
|
77
|
-
ROW
|
|
78
|
-
COL
|
|
80
|
+
ROW = "ROW"
|
|
81
|
+
COL = "COL"
|
|
82
|
+
|
|
83
|
+
class TableHeadingsDisplay(CoerciveIntEnum):
|
|
84
|
+
NONE = 0
|
|
85
|
+
ON_TOP_OF_EVERY_PAGE = 1
|
|
79
86
|
|
|
80
87
|
class RenderStyle(CoerciveEnum):
|
|
81
88
|
D = "DRAW"
|
|
@@ -259,3 +266,9 @@ class EncryptionMethod(Enum):
|
|
|
259
266
|
RC4 = 1
|
|
260
267
|
AES_128 = 2
|
|
261
268
|
AES_256 = 3
|
|
269
|
+
|
|
270
|
+
class TextDirection(CoerciveEnum):
|
|
271
|
+
LTR = "LTR"
|
|
272
|
+
RTL = "RTL"
|
|
273
|
+
TTB = "TTB"
|
|
274
|
+
BTT = "BTT"
|
|
@@ -25,6 +25,7 @@ from .enums import (
|
|
|
25
25
|
RenderStyle,
|
|
26
26
|
TableBordersLayout,
|
|
27
27
|
TableCellFillMode,
|
|
28
|
+
TextDirection,
|
|
28
29
|
TextMarkupType,
|
|
29
30
|
TextMode as TextMode,
|
|
30
31
|
WrapMode as WrapMode,
|
|
@@ -207,7 +208,7 @@ class FPDF(GraphicsStateMixin):
|
|
|
207
208
|
self,
|
|
208
209
|
use_shaping_engine: bool = True,
|
|
209
210
|
features: dict[str, bool] | None = None,
|
|
210
|
-
direction: Literal["ltr", "rtl"] | None = None,
|
|
211
|
+
direction: Literal["ltr", "rtl"] | TextDirection | None = None,
|
|
211
212
|
script: str | None = None,
|
|
212
213
|
language: str | None = None,
|
|
213
214
|
) -> None: ...
|
|
@@ -1,63 +1,70 @@
|
|
|
1
|
-
from _typeshed import Incomplete, SupportsKeysAndGetItem, Unused
|
|
2
|
-
from collections.abc import Callable, Iterable
|
|
1
|
+
from _typeshed import Incomplete, SupportsItemAccess, SupportsKeysAndGetItem, Unused
|
|
2
|
+
from collections.abc import Callable, Iterable, Mapping
|
|
3
3
|
from html.parser import HTMLParser
|
|
4
4
|
from logging import Logger
|
|
5
|
-
from typing import ClassVar, Final
|
|
5
|
+
from typing import ClassVar, Final, Literal, TypedDict, type_check_only
|
|
6
|
+
from typing_extensions import TypeAlias
|
|
6
7
|
|
|
7
8
|
from fpdf import FPDF
|
|
8
9
|
|
|
10
|
+
from .fonts import FontFace
|
|
11
|
+
from .table import Row, Table
|
|
12
|
+
|
|
9
13
|
__author__: Final[str]
|
|
10
14
|
__copyright__: Final[str]
|
|
11
15
|
|
|
16
|
+
_OLType: TypeAlias = Literal["1", "a", "A", "I", "i"]
|
|
17
|
+
|
|
12
18
|
LOGGER: Logger
|
|
13
19
|
BULLET_WIN1252: Final[str]
|
|
14
|
-
|
|
20
|
+
DEGREE_WIN1252: Final[str]
|
|
21
|
+
HEADING_TAGS: Final[tuple[str, ...]]
|
|
22
|
+
DEFAULT_TAG_STYLES: Final[dict[str, FontFace]]
|
|
23
|
+
DEFAULT_TAG_INDENTS: Final[dict[str, int]]
|
|
15
24
|
|
|
16
25
|
COLOR_DICT: Final[dict[str, str]]
|
|
17
26
|
|
|
18
27
|
def color_as_decimal(color: str | None = "#000000") -> tuple[int, int, int] | None: ...
|
|
28
|
+
def parse_style(elem_attrs: SupportsItemAccess[str, str]) -> None: ...
|
|
29
|
+
@type_check_only
|
|
30
|
+
class _Emphasis(TypedDict):
|
|
31
|
+
b: bool
|
|
32
|
+
i: bool
|
|
33
|
+
u: bool
|
|
19
34
|
|
|
20
35
|
class HTML2FPDF(HTMLParser):
|
|
21
36
|
HTML_UNCLOSED_TAGS: ClassVar[tuple[str, ...]]
|
|
37
|
+
TABLE_LINE_HEIGHT: ClassVar[float]
|
|
22
38
|
|
|
23
39
|
pdf: FPDF
|
|
24
|
-
image_map:
|
|
25
|
-
li_tag_indent: int
|
|
26
|
-
dd_tag_indent: int
|
|
40
|
+
image_map: Callable[[str], str]
|
|
27
41
|
ul_bullet_char: str
|
|
28
|
-
|
|
29
|
-
pre_code_font: str
|
|
42
|
+
li_prefix_color: tuple[int, int, int]
|
|
30
43
|
warn_on_tags_not_matching: bool
|
|
31
|
-
|
|
32
|
-
font_size:
|
|
44
|
+
emphasis: _Emphasis
|
|
45
|
+
font_size: float
|
|
33
46
|
follows_trailing_space: bool
|
|
34
47
|
follows_heading: bool
|
|
35
48
|
href: str
|
|
36
49
|
align: str
|
|
37
|
-
|
|
38
|
-
font_stack: Incomplete
|
|
50
|
+
style_stack: list[FontFace]
|
|
39
51
|
indent: int
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
table_col_index: Incomplete
|
|
45
|
-
td: Incomplete
|
|
46
|
-
th: Incomplete
|
|
47
|
-
tr: Incomplete
|
|
48
|
-
thead: Incomplete
|
|
49
|
-
tfoot: Incomplete
|
|
50
|
-
tr_index: Incomplete
|
|
51
|
-
theader: Incomplete
|
|
52
|
-
tfooter: Incomplete
|
|
53
|
-
theader_out: bool
|
|
54
|
-
table_row_height: int
|
|
55
|
-
heading_level: Incomplete
|
|
52
|
+
ol_type: list[_OLType]
|
|
53
|
+
bullet: list[Incomplete]
|
|
54
|
+
font_color: tuple[int, int, int]
|
|
55
|
+
heading_level: Incomplete | None
|
|
56
56
|
heading_above: float
|
|
57
57
|
heading_below: float
|
|
58
|
+
table_line_separators: bool
|
|
59
|
+
table: Table | None
|
|
60
|
+
table_row: Row | None
|
|
61
|
+
tr: dict[str, str] | None
|
|
62
|
+
td_th: dict[str, str] | None
|
|
63
|
+
tag_indents: dict[str, int]
|
|
64
|
+
tag_styles: dict[str, FontFace]
|
|
58
65
|
|
|
59
66
|
# Not initialized in __init__:
|
|
60
|
-
|
|
67
|
+
font_family: str
|
|
61
68
|
h: float
|
|
62
69
|
|
|
63
70
|
def __init__(
|
|
@@ -68,20 +75,26 @@ class HTML2FPDF(HTMLParser):
|
|
|
68
75
|
dd_tag_indent: int = 10,
|
|
69
76
|
table_line_separators: bool = False,
|
|
70
77
|
ul_bullet_char: str = "\x95",
|
|
78
|
+
li_prefix_color: tuple[int, int, int] = (190, 0, 0),
|
|
71
79
|
heading_sizes: SupportsKeysAndGetItem[str, int] | Iterable[tuple[str, int]] | None = None,
|
|
72
|
-
pre_code_font: str =
|
|
80
|
+
pre_code_font: str = ...,
|
|
73
81
|
warn_on_tags_not_matching: bool = True,
|
|
82
|
+
tag_indents: dict[str, int] | None = None,
|
|
83
|
+
tag_styles: Mapping[str, FontFace] | None = None,
|
|
74
84
|
**_: Unused,
|
|
75
85
|
): ...
|
|
76
86
|
def handle_data(self, data) -> None: ...
|
|
77
87
|
def handle_starttag(self, tag, attrs) -> None: ...
|
|
78
88
|
def handle_endtag(self, tag) -> None: ...
|
|
79
|
-
def set_font(self,
|
|
89
|
+
def set_font(self, family: str | None = None, size: float | None = None, set_default: bool = False) -> None: ...
|
|
80
90
|
def set_style(self, tag: Incomplete | None = None, enable: bool = False) -> None: ...
|
|
81
91
|
def set_text_color(self, r: Incomplete | None = None, g: int = 0, b: int = 0) -> None: ...
|
|
82
92
|
def put_link(self, text) -> None: ...
|
|
83
93
|
def render_toc(self, pdf, outline) -> None: ...
|
|
84
94
|
def error(self, message: str) -> None: ...
|
|
85
95
|
|
|
96
|
+
def ul_prefix(ul_type: str) -> str: ...
|
|
97
|
+
def ol_prefix(ol_type: _OLType, index: int) -> str: ...
|
|
98
|
+
|
|
86
99
|
class HTMLMixin:
|
|
87
100
|
def __init__(self, *args, **kwargs) -> None: ...
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
from _typeshed import Incomplete
|
|
2
2
|
from collections.abc import Callable, Sequence
|
|
3
|
-
from typing import Final,
|
|
3
|
+
from typing import Final, NamedTuple
|
|
4
4
|
|
|
5
|
-
from .enums import Align, WrapMode
|
|
5
|
+
from .enums import Align, TextDirection, WrapMode
|
|
6
6
|
|
|
7
7
|
SOFT_HYPHEN: Final[str]
|
|
8
8
|
HYPHEN: Final[str]
|
|
@@ -60,9 +60,9 @@ class Fragment:
|
|
|
60
60
|
@property
|
|
61
61
|
def text_shaping_parameters(self): ...
|
|
62
62
|
@property
|
|
63
|
-
def paragraph_direction(self) ->
|
|
63
|
+
def paragraph_direction(self) -> TextDirection: ...
|
|
64
64
|
@property
|
|
65
|
-
def fragment_direction(self) ->
|
|
65
|
+
def fragment_direction(self) -> TextDirection: ...
|
|
66
66
|
def trim(self, index: int) -> None: ...
|
|
67
67
|
def __eq__(self, other: Fragment) -> bool: ... # type: ignore[override]
|
|
68
68
|
def get_width(self, start: int = 0, end: int | None = None, chars: str | None = None, initial_cs: bool = True) -> float: ...
|
|
@@ -7,7 +7,7 @@ from typing import Literal, overload
|
|
|
7
7
|
from PIL import Image
|
|
8
8
|
|
|
9
9
|
from .drawing import DeviceGray, DeviceRGB
|
|
10
|
-
from .enums import Align, TableBordersLayout, TableCellFillMode, TableSpan, VAlign, WrapMode
|
|
10
|
+
from .enums import Align, TableBordersLayout, TableCellFillMode, TableHeadingsDisplay, TableSpan, VAlign, WrapMode
|
|
11
11
|
from .fonts import FontFace
|
|
12
12
|
from .fpdf import FPDF
|
|
13
13
|
from .util import Padding
|
|
@@ -40,6 +40,7 @@ class Table:
|
|
|
40
40
|
padding: float | Padding | None = None,
|
|
41
41
|
outer_border_width: float | None = None,
|
|
42
42
|
num_heading_rows: int = 1,
|
|
43
|
+
repeat_headings: TableHeadingsDisplay | int = 1,
|
|
43
44
|
) -> None: ...
|
|
44
45
|
def row(self, cells: Iterable[str] = (), style: FontFace | None = None) -> Row: ...
|
|
45
46
|
def render(self) -> None: ...
|
|
@@ -23,6 +23,10 @@ def convert_unit(
|
|
|
23
23
|
old_unit: str | float,
|
|
24
24
|
new_unit: str | float,
|
|
25
25
|
) -> float | tuple[float, ...]: ...
|
|
26
|
+
|
|
27
|
+
ROMAN_NUMERAL_MAP: Final[tuple[tuple[str, int], ...]]
|
|
28
|
+
|
|
29
|
+
def int2roman(n: int) -> str: ...
|
|
26
30
|
def print_mem_usage(prefix: str) -> None: ...
|
|
27
31
|
def get_mem_usage(prefix: str) -> str: ...
|
|
28
32
|
def get_process_rss() -> str: ...
|
|
@@ -42,7 +42,7 @@ class Adapter(Generic[_R], metaclass=ABCMeta):
|
|
|
42
42
|
def delete(self, url: str, **kwargs: Any) -> _R: ...
|
|
43
43
|
def list(self, url: str, **kwargs: Any) -> _R: ...
|
|
44
44
|
def head(self, url: str, **kwargs: Any) -> _R: ...
|
|
45
|
-
def login(self, url: str, use_token: bool = True, **kwargs: Any): ...
|
|
45
|
+
def login(self, url: str, use_token: bool = True, **kwargs: Any) -> Response: ...
|
|
46
46
|
@abstractmethod
|
|
47
47
|
def get_login_token(self, response: _R) -> str: ...
|
|
48
48
|
@abstractmethod
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
from
|
|
2
|
-
from typing import Any
|
|
1
|
+
from typing import Any, Literal, overload
|
|
3
2
|
|
|
4
3
|
from hvac.adapters import Adapter
|
|
4
|
+
from hvac.api import AuthMethods, SystemBackend
|
|
5
|
+
from hvac.api.secrets_engines import SecretsEngines
|
|
6
|
+
from requests import Session
|
|
7
|
+
from requests.models import Response
|
|
5
8
|
|
|
6
9
|
has_hcl_parser: bool
|
|
7
10
|
|
|
@@ -15,9 +18,9 @@ class Client:
|
|
|
15
18
|
timeout: int = 30,
|
|
16
19
|
proxies: dict[str, str] | None = None,
|
|
17
20
|
allow_redirects: bool = True,
|
|
18
|
-
session:
|
|
21
|
+
session: Session | None = None,
|
|
19
22
|
adapter: type[Adapter[Any]] = ...,
|
|
20
|
-
namespace:
|
|
23
|
+
namespace: str | None = None,
|
|
21
24
|
**kwargs: Any,
|
|
22
25
|
) -> None: ...
|
|
23
26
|
def __getattr__(self, name: str) -> Any: ...
|
|
@@ -34,39 +37,48 @@ class Client:
|
|
|
34
37
|
@token.setter
|
|
35
38
|
def token(self, token: str) -> None: ...
|
|
36
39
|
@property
|
|
37
|
-
def session(self): ...
|
|
40
|
+
def session(self) -> Session: ...
|
|
38
41
|
@session.setter
|
|
39
|
-
def session(self, session) -> None: ...
|
|
42
|
+
def session(self, session: Session) -> None: ...
|
|
40
43
|
@property
|
|
41
44
|
def allow_redirects(self) -> bool: ...
|
|
42
45
|
@allow_redirects.setter
|
|
43
46
|
def allow_redirects(self, allow_redirects: bool) -> None: ...
|
|
44
47
|
@property
|
|
45
|
-
def auth(self): ...
|
|
48
|
+
def auth(self) -> AuthMethods: ...
|
|
46
49
|
@property
|
|
47
|
-
def secrets(self): ...
|
|
50
|
+
def secrets(self) -> SecretsEngines: ...
|
|
48
51
|
@property
|
|
49
|
-
def sys(self): ...
|
|
52
|
+
def sys(self) -> SystemBackend: ...
|
|
50
53
|
@property
|
|
51
|
-
def generate_root_status(self): ...
|
|
54
|
+
def generate_root_status(self) -> dict[str, Any] | Response: ...
|
|
52
55
|
@property
|
|
53
|
-
def key_status(self): ...
|
|
56
|
+
def key_status(self) -> dict[str, Any] | Response: ...
|
|
54
57
|
@property
|
|
55
|
-
def rekey_status(self): ...
|
|
58
|
+
def rekey_status(self) -> dict[str, Any] | Response: ...
|
|
56
59
|
@property
|
|
57
|
-
def ha_status(self): ...
|
|
60
|
+
def ha_status(self) -> dict[str, Any] | Response: ...
|
|
58
61
|
@property
|
|
59
|
-
def seal_status(self): ...
|
|
60
|
-
def read(self, path: str, wrap_ttl: int | str | None = None): ...
|
|
61
|
-
def list(self, path: str): ...
|
|
62
|
-
def write(self, path: str, wrap_ttl: int | str | None, **kwargs: Any): ...
|
|
63
|
-
def write_data(
|
|
62
|
+
def seal_status(self) -> dict[str, Any] | Response: ...
|
|
63
|
+
def read(self, path: str, wrap_ttl: int | str | None = None) -> dict[str, Any] | Response | None: ...
|
|
64
|
+
def list(self, path: str) -> dict[str, Any] | Response | None: ...
|
|
65
|
+
def write(self, path: str, wrap_ttl: int | str | None, **kwargs: Any) -> dict[str, Any] | Response: ...
|
|
66
|
+
def write_data(
|
|
67
|
+
self, path: str, *, data: dict[str, Any] | None = None, wrap_ttl: int | str | None = None
|
|
68
|
+
) -> dict[str, Any] | Response: ...
|
|
64
69
|
def delete(self, path: str) -> None: ...
|
|
65
|
-
|
|
66
|
-
def
|
|
70
|
+
@overload
|
|
71
|
+
def get_policy(self, name: str, parse: Literal[False] = False) -> str | None: ...
|
|
72
|
+
@overload
|
|
73
|
+
def get_policy(self, name: str, parse: Literal[True]) -> dict[str, Any] | None: ...
|
|
74
|
+
def lookup_token(
|
|
75
|
+
self, token: str | None = None, accessor: bool = False, wrap_ttl: int | str | None = None
|
|
76
|
+
) -> dict[str, Any] | Response: ...
|
|
67
77
|
def revoke_token(self, token: str, orphan: bool = False, accessor: bool = False) -> None: ...
|
|
68
|
-
def renew_token(
|
|
78
|
+
def renew_token(
|
|
79
|
+
self, token: str, increment: bool | None = None, wrap_ttl: int | str | None = None
|
|
80
|
+
) -> dict[str, Any] | Response: ...
|
|
69
81
|
def logout(self, revoke_token: bool = False) -> None: ...
|
|
70
82
|
def is_authenticated(self) -> bool: ...
|
|
71
|
-
def auth_cubbyhole(self, token: str): ...
|
|
72
|
-
def login(self, url: str, use_token: bool = True, **kwargs: Any): ...
|
|
83
|
+
def auth_cubbyhole(self, token: str) -> Response: ...
|
|
84
|
+
def login(self, url: str, use_token: bool = True, **kwargs: Any) -> Response: ...
|
|
@@ -2,10 +2,12 @@ from _typeshed import Incomplete
|
|
|
2
2
|
|
|
3
3
|
from urllib3 import HTTPResponse
|
|
4
4
|
|
|
5
|
+
from .._sync.rest import RESTResponse
|
|
6
|
+
|
|
5
7
|
logger: Incomplete
|
|
6
8
|
|
|
7
9
|
class InfluxDBError(Exception):
|
|
8
10
|
response: Incomplete
|
|
9
11
|
message: Incomplete
|
|
10
12
|
retry_after: Incomplete
|
|
11
|
-
def __init__(self, response: HTTPResponse | None = None, message: str | None = None) -> None: ...
|
|
13
|
+
def __init__(self, response: HTTPResponse | RESTResponse | None = None, message: str | None = None) -> None: ...
|