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.
Files changed (236) hide show
  1. package/dist/pyright-langserver.js +1 -1
  2. package/dist/pyright-langserver.js.map +1 -1
  3. package/dist/pyright.js +1 -1
  4. package/dist/pyright.js.map +1 -1
  5. package/dist/typeshed-fallback/README.md +2 -2
  6. package/dist/typeshed-fallback/commit.txt +1 -1
  7. package/dist/typeshed-fallback/stdlib/VERSIONS +1 -1
  8. package/dist/typeshed-fallback/stdlib/_ast.pyi +661 -22
  9. package/dist/typeshed-fallback/stdlib/_ctypes.pyi +1 -1
  10. package/dist/typeshed-fallback/stdlib/_socket.pyi +2 -2
  11. package/dist/typeshed-fallback/stdlib/_stat.pyi +27 -13
  12. package/dist/typeshed-fallback/stdlib/_typeshed/__init__.pyi +2 -0
  13. package/dist/typeshed-fallback/stdlib/_typeshed/importlib.pyi +18 -0
  14. package/dist/typeshed-fallback/stdlib/_weakref.pyi +1 -1
  15. package/dist/typeshed-fallback/stdlib/_weakrefset.pyi +1 -1
  16. package/dist/typeshed-fallback/stdlib/array.pyi +1 -1
  17. package/dist/typeshed-fallback/stdlib/ast.pyi +160 -70
  18. package/dist/typeshed-fallback/stdlib/asyncio/futures.pyi +1 -1
  19. package/dist/typeshed-fallback/stdlib/asyncio/queues.pyi +1 -1
  20. package/dist/typeshed-fallback/stdlib/asyncio/tasks.pyi +1 -1
  21. package/dist/typeshed-fallback/stdlib/atexit.pyi +2 -2
  22. package/dist/typeshed-fallback/stdlib/builtins.pyi +30 -8
  23. package/dist/typeshed-fallback/stdlib/calendar.pyi +29 -29
  24. package/dist/typeshed-fallback/stdlib/code.pyi +27 -8
  25. package/dist/typeshed-fallback/stdlib/concurrent/futures/_base.pyi +1 -1
  26. package/dist/typeshed-fallback/stdlib/concurrent/futures/thread.pyi +1 -1
  27. package/dist/typeshed-fallback/stdlib/contextvars.pyi +2 -2
  28. package/dist/typeshed-fallback/stdlib/csv.pyi +4 -4
  29. package/dist/typeshed-fallback/stdlib/ctypes/__init__.pyi +1 -1
  30. package/dist/typeshed-fallback/stdlib/dataclasses.pyi +1 -1
  31. package/dist/typeshed-fallback/stdlib/dbm/__init__.pyi +9 -2
  32. package/dist/typeshed-fallback/stdlib/dbm/dumb.pyi +7 -1
  33. package/dist/typeshed-fallback/stdlib/dbm/gnu.pyi +5 -2
  34. package/dist/typeshed-fallback/stdlib/dbm/ndbm.pyi +5 -2
  35. package/dist/typeshed-fallback/stdlib/difflib.pyi +1 -1
  36. package/dist/typeshed-fallback/stdlib/dis.pyi +16 -1
  37. package/dist/typeshed-fallback/stdlib/distutils/archive_util.pyi +22 -7
  38. package/dist/typeshed-fallback/stdlib/distutils/ccompiler.pyi +37 -16
  39. package/dist/typeshed-fallback/stdlib/distutils/cmd.pyi +52 -19
  40. package/dist/typeshed-fallback/stdlib/distutils/command/bdist_msi.pyi +4 -4
  41. package/dist/typeshed-fallback/stdlib/distutils/command/build.pyi +4 -2
  42. package/dist/typeshed-fallback/stdlib/distutils/command/build_py.pyi +2 -2
  43. package/dist/typeshed-fallback/stdlib/distutils/command/check.pyi +2 -2
  44. package/dist/typeshed-fallback/stdlib/distutils/command/config.pyi +5 -4
  45. package/dist/typeshed-fallback/stdlib/distutils/command/install.pyi +4 -2
  46. package/dist/typeshed-fallback/stdlib/distutils/command/register.pyi +4 -2
  47. package/dist/typeshed-fallback/stdlib/distutils/command/sdist.pyi +4 -2
  48. package/dist/typeshed-fallback/stdlib/distutils/core.pyi +2 -2
  49. package/dist/typeshed-fallback/stdlib/distutils/dep_util.pyi +14 -3
  50. package/dist/typeshed-fallback/stdlib/distutils/dir_util.pyi +20 -10
  51. package/dist/typeshed-fallback/stdlib/distutils/dist.pyi +8 -5
  52. package/dist/typeshed-fallback/stdlib/distutils/file_util.pyi +35 -11
  53. package/dist/typeshed-fallback/stdlib/distutils/filelist.pyi +11 -3
  54. package/dist/typeshed-fallback/stdlib/distutils/spawn.pyi +5 -1
  55. package/dist/typeshed-fallback/stdlib/distutils/sysconfig.pyi +4 -2
  56. package/dist/typeshed-fallback/stdlib/distutils/text_file.pyi +7 -7
  57. package/dist/typeshed-fallback/stdlib/distutils/util.pyi +9 -5
  58. package/dist/typeshed-fallback/stdlib/faulthandler.pyi +1 -1
  59. package/dist/typeshed-fallback/stdlib/filecmp.pyi +1 -1
  60. package/dist/typeshed-fallback/stdlib/fileinput.pyi +1 -1
  61. package/dist/typeshed-fallback/stdlib/functools.pyi +3 -3
  62. package/dist/typeshed-fallback/stdlib/genericpath.pyi +7 -0
  63. package/dist/typeshed-fallback/stdlib/graphlib.pyi +1 -1
  64. package/dist/typeshed-fallback/stdlib/gzip.pyi +3 -3
  65. package/dist/typeshed-fallback/stdlib/http/__init__.pyi +11 -4
  66. package/dist/typeshed-fallback/stdlib/http/cookies.pyi +1 -1
  67. package/dist/typeshed-fallback/stdlib/importlib/abc.pyi +2 -2
  68. package/dist/typeshed-fallback/stdlib/importlib/util.pyi +3 -2
  69. package/dist/typeshed-fallback/stdlib/inspect.pyi +6 -0
  70. package/dist/typeshed-fallback/stdlib/keyword.pyi +2 -2
  71. package/dist/typeshed-fallback/stdlib/logging/__init__.pyi +69 -42
  72. package/dist/typeshed-fallback/stdlib/mailbox.pyi +2 -2
  73. package/dist/typeshed-fallback/stdlib/marshal.pyi +12 -4
  74. package/dist/typeshed-fallback/stdlib/math.pyi +3 -0
  75. package/dist/typeshed-fallback/stdlib/multiprocessing/managers.pyi +1 -1
  76. package/dist/typeshed-fallback/stdlib/multiprocessing/pool.pyi +1 -1
  77. package/dist/typeshed-fallback/stdlib/multiprocessing/queues.pyi +1 -1
  78. package/dist/typeshed-fallback/stdlib/multiprocessing/shared_memory.pyi +1 -1
  79. package/dist/typeshed-fallback/stdlib/ntpath.pyi +8 -1
  80. package/dist/typeshed-fallback/stdlib/opcode.pyi +6 -2
  81. package/dist/typeshed-fallback/stdlib/optparse.pyi +1 -1
  82. package/dist/typeshed-fallback/stdlib/os/__init__.pyi +1 -1
  83. package/dist/typeshed-fallback/stdlib/pathlib.pyi +6 -2
  84. package/dist/typeshed-fallback/stdlib/pkgutil.pyi +6 -6
  85. package/dist/typeshed-fallback/stdlib/posixpath.pyi +5 -0
  86. package/dist/typeshed-fallback/stdlib/queue.pyi +4 -2
  87. package/dist/typeshed-fallback/stdlib/random.pyi +4 -1
  88. package/dist/typeshed-fallback/stdlib/re.pyi +20 -9
  89. package/dist/typeshed-fallback/stdlib/shelve.pyi +15 -2
  90. package/dist/typeshed-fallback/stdlib/shutil.pyi +38 -8
  91. package/dist/typeshed-fallback/stdlib/signal.pyi +1 -1
  92. package/dist/typeshed-fallback/stdlib/socket.pyi +13 -0
  93. package/dist/typeshed-fallback/stdlib/stat.pyi +6 -0
  94. package/dist/typeshed-fallback/stdlib/statistics.pyi +30 -1
  95. package/dist/typeshed-fallback/stdlib/subprocess.pyi +2 -2
  96. package/dist/typeshed-fallback/stdlib/sys/__init__.pyi +15 -19
  97. package/dist/typeshed-fallback/stdlib/syslog.pyi +9 -0
  98. package/dist/typeshed-fallback/stdlib/tempfile.pyi +7 -3
  99. package/dist/typeshed-fallback/stdlib/threading.pyi +3 -0
  100. package/dist/typeshed-fallback/stdlib/token.pyi +5 -4
  101. package/dist/typeshed-fallback/stdlib/tokenize.pyi +10 -3
  102. package/dist/typeshed-fallback/stdlib/types.pyi +20 -18
  103. package/dist/typeshed-fallback/stdlib/typing.pyi +75 -21
  104. package/dist/typeshed-fallback/stdlib/typing_extensions.pyi +104 -83
  105. package/dist/typeshed-fallback/stdlib/unittest/case.pyi +1 -1
  106. package/dist/typeshed-fallback/stdlib/urllib/parse.pyi +1 -1
  107. package/dist/typeshed-fallback/stdlib/urllib/request.pyi +17 -10
  108. package/dist/typeshed-fallback/stdlib/venv/__init__.pyi +31 -3
  109. package/dist/typeshed-fallback/stdlib/warnings.pyi +13 -1
  110. package/dist/typeshed-fallback/stdlib/wsgiref/util.pyi +2 -0
  111. package/dist/typeshed-fallback/stubs/Pillow/PIL/DdsImagePlugin.pyi +17 -17
  112. package/dist/typeshed-fallback/stubs/Pillow/PIL/Image.pyi +29 -29
  113. package/dist/typeshed-fallback/stubs/Pillow/PIL/WalImageFile.pyi +2 -1
  114. package/dist/typeshed-fallback/stubs/Pillow/PIL/_binary.pyi +13 -13
  115. package/dist/typeshed-fallback/stubs/WebOb/webob/multidict.pyi +8 -3
  116. package/dist/typeshed-fallback/stubs/WebOb/webob/request.pyi +10 -3
  117. package/dist/typeshed-fallback/stubs/antlr4-python3-runtime/antlr4/atn/ATNType.pyi +2 -2
  118. package/dist/typeshed-fallback/stubs/antlr4-python3-runtime/antlr4/atn/LexerAction.pyi +8 -8
  119. package/dist/typeshed-fallback/stubs/antlr4-python3-runtime/antlr4/atn/PredictionMode.pyi +3 -3
  120. package/dist/typeshed-fallback/stubs/assertpy/METADATA.toml +2 -0
  121. package/dist/typeshed-fallback/stubs/assertpy/assertpy/__init__.pyi +12 -0
  122. package/dist/typeshed-fallback/stubs/assertpy/assertpy/assertpy.pyi +70 -0
  123. package/dist/typeshed-fallback/stubs/assertpy/assertpy/base.pyi +21 -0
  124. package/dist/typeshed-fallback/stubs/assertpy/assertpy/collection.pyi +11 -0
  125. package/dist/typeshed-fallback/stubs/assertpy/assertpy/contains.pyi +16 -0
  126. package/dist/typeshed-fallback/stubs/assertpy/assertpy/date.pyi +11 -0
  127. package/dist/typeshed-fallback/stubs/assertpy/assertpy/dict.pyi +12 -0
  128. package/dist/typeshed-fallback/stubs/assertpy/assertpy/dynamic.pyi +7 -0
  129. package/dist/typeshed-fallback/stubs/assertpy/assertpy/exception.pyi +8 -0
  130. package/dist/typeshed-fallback/stubs/assertpy/assertpy/extracting.pyi +7 -0
  131. package/dist/typeshed-fallback/stubs/assertpy/assertpy/file.pyi +15 -0
  132. package/dist/typeshed-fallback/stubs/assertpy/assertpy/helpers.pyi +3 -0
  133. package/dist/typeshed-fallback/stubs/assertpy/assertpy/numeric.pyi +24 -0
  134. package/dist/typeshed-fallback/stubs/assertpy/assertpy/snapshot.pyi +6 -0
  135. package/dist/typeshed-fallback/stubs/assertpy/assertpy/string.pyi +18 -0
  136. package/dist/typeshed-fallback/stubs/beautifulsoup4/bs4/element.pyi +15 -7
  137. package/dist/typeshed-fallback/stubs/docker/docker/api/container.pyi +119 -61
  138. package/dist/typeshed-fallback/stubs/docker/docker/errors.pyi +3 -3
  139. package/dist/typeshed-fallback/stubs/docker/docker/models/containers.pyi +31 -20
  140. package/dist/typeshed-fallback/stubs/docker/docker/utils/json_stream.pyi +16 -8
  141. package/dist/typeshed-fallback/stubs/flake8/METADATA.toml +3 -0
  142. package/dist/typeshed-fallback/stubs/flake8/flake8/__init__.pyi +8 -0
  143. package/dist/typeshed-fallback/stubs/flake8/flake8/_compat.pyi +5 -0
  144. package/dist/typeshed-fallback/stubs/flake8/flake8/api/__init__.pyi +0 -0
  145. package/dist/typeshed-fallback/stubs/flake8/flake8/api/legacy.pyi +27 -0
  146. package/dist/typeshed-fallback/stubs/flake8/flake8/checker.pyi +56 -0
  147. package/dist/typeshed-fallback/stubs/flake8/flake8/defaults.pyi +12 -0
  148. package/dist/typeshed-fallback/stubs/flake8/flake8/discover_files.pyi +8 -0
  149. package/dist/typeshed-fallback/stubs/flake8/flake8/exceptions.pyi +24 -0
  150. package/dist/typeshed-fallback/stubs/flake8/flake8/formatting/__init__.pyi +0 -0
  151. package/dist/typeshed-fallback/stubs/flake8/flake8/formatting/_windows_color.pyi +1 -0
  152. package/dist/typeshed-fallback/stubs/flake8/flake8/formatting/base.pyi +24 -0
  153. package/dist/typeshed-fallback/stubs/flake8/flake8/formatting/default.pyi +29 -0
  154. package/dist/typeshed-fallback/stubs/flake8/flake8/main/__init__.pyi +0 -0
  155. package/dist/typeshed-fallback/stubs/flake8/flake8/main/application.pyi +29 -0
  156. package/dist/typeshed-fallback/stubs/flake8/flake8/main/cli.pyi +3 -0
  157. package/dist/typeshed-fallback/stubs/flake8/flake8/main/debug.pyi +5 -0
  158. package/dist/typeshed-fallback/stubs/flake8/flake8/main/options.pyi +12 -0
  159. package/dist/typeshed-fallback/stubs/flake8/flake8/options/__init__.pyi +0 -0
  160. package/dist/typeshed-fallback/stubs/flake8/flake8/options/aggregator.pyi +12 -0
  161. package/dist/typeshed-fallback/stubs/flake8/flake8/options/config.pyi +10 -0
  162. package/dist/typeshed-fallback/stubs/flake8/flake8/options/manager.pyi +71 -0
  163. package/dist/typeshed-fallback/stubs/flake8/flake8/options/parse_args.pyi +6 -0
  164. package/dist/typeshed-fallback/stubs/flake8/flake8/plugins/__init__.pyi +0 -0
  165. package/dist/typeshed-fallback/stubs/flake8/flake8/plugins/finder.pyi +48 -0
  166. package/dist/typeshed-fallback/stubs/flake8/flake8/plugins/pycodestyle.pyi +32 -0
  167. package/dist/typeshed-fallback/stubs/flake8/flake8/plugins/pyflakes.pyi +21 -0
  168. package/dist/typeshed-fallback/stubs/flake8/flake8/plugins/reporter.pyi +9 -0
  169. package/dist/typeshed-fallback/stubs/flake8/flake8/processor.pyi +72 -0
  170. package/dist/typeshed-fallback/stubs/flake8/flake8/statistics.pyi +28 -0
  171. package/dist/typeshed-fallback/stubs/flake8/flake8/style_guide.pyi +70 -0
  172. package/dist/typeshed-fallback/stubs/flake8/flake8/utils.pyi +25 -0
  173. package/dist/typeshed-fallback/stubs/flake8/flake8/violation.pyi +13 -0
  174. package/dist/typeshed-fallback/stubs/fpdf2/METADATA.toml +1 -1
  175. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/bidi.pyi +5 -3
  176. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/drawing.pyi +5 -1
  177. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/enums.pyi +15 -2
  178. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/fpdf.pyi +2 -1
  179. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/html.pyi +45 -32
  180. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/line_break.pyi +4 -4
  181. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/outline.pyi +1 -1
  182. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/svg.pyi +0 -1
  183. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/table.pyi +2 -1
  184. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/util.pyi +4 -0
  185. package/dist/typeshed-fallback/stubs/hvac/hvac/adapters.pyi +1 -1
  186. package/dist/typeshed-fallback/stubs/hvac/hvac/v1/__init__.pyi +35 -23
  187. package/dist/typeshed-fallback/stubs/influxdb-client/METADATA.toml +1 -1
  188. package/dist/typeshed-fallback/stubs/influxdb-client/influxdb_client/client/exceptions.pyi +3 -1
  189. package/dist/typeshed-fallback/stubs/influxdb-client/influxdb_client/rest.pyi +8 -2
  190. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/dag.pyi +2 -0
  191. package/dist/typeshed-fallback/stubs/psutil/psutil/__init__.pyi +1 -1
  192. package/dist/typeshed-fallback/stubs/psutil/psutil/_pswindows.pyi +8 -6
  193. package/dist/typeshed-fallback/stubs/pyaudio/METADATA.toml +2 -2
  194. package/dist/typeshed-fallback/stubs/pyflakes/pyflakes/scripts/__init__.pyi +0 -0
  195. package/dist/typeshed-fallback/stubs/pyflakes/pyflakes/scripts/pyflakes.pyi +8 -0
  196. package/dist/typeshed-fallback/stubs/pygit2/METADATA.toml +1 -1
  197. package/dist/typeshed-fallback/stubs/pygit2/pygit2/_pygit2.pyi +1 -15
  198. package/dist/typeshed-fallback/stubs/pygit2/pygit2/enums.pyi +313 -314
  199. package/dist/typeshed-fallback/stubs/pygit2/pygit2/index.pyi +2 -1
  200. package/dist/typeshed-fallback/stubs/pygit2/pygit2/remotes.pyi +7 -1
  201. package/dist/typeshed-fallback/stubs/pygit2/pygit2/repository.pyi +4 -14
  202. package/dist/typeshed-fallback/stubs/pygit2/pygit2/utils.pyi +7 -1
  203. package/dist/typeshed-fallback/stubs/pynput/METADATA.toml +1 -1
  204. package/dist/typeshed-fallback/stubs/regex/METADATA.toml +1 -1
  205. package/dist/typeshed-fallback/stubs/regex/regex/_regex_core.pyi +35 -35
  206. package/dist/typeshed-fallback/stubs/regex/regex/regex.pyi +10 -10
  207. package/dist/typeshed-fallback/stubs/requests/METADATA.toml +1 -1
  208. package/dist/typeshed-fallback/stubs/setuptools/pkg_resources/__init__.pyi +16 -9
  209. package/dist/typeshed-fallback/stubs/setuptools/setuptools/__init__.pyi +4 -2
  210. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/_modified.pyi +16 -5
  211. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/archive_util.pyi +25 -10
  212. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/ccompiler.pyi +38 -16
  213. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/cmd.pyi +58 -30
  214. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/command/build_py.pyi +2 -1
  215. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/command/install_lib.pyi +1 -1
  216. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/command/install_scripts.pyi +1 -1
  217. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/command/upload.pyi +2 -2
  218. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/dep_util.pyi +1 -3
  219. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/dist.pyi +8 -5
  220. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/filelist.pyi +14 -6
  221. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/sysconfig.pyi +4 -2
  222. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/util.pyi +8 -4
  223. package/dist/typeshed-fallback/stubs/setuptools/setuptools/build_meta.pyi +4 -3
  224. package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/bdist_egg.pyi +9 -1
  225. package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/build_ext.pyi +2 -2
  226. package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/install.pyi +3 -1
  227. package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/install_lib.pyi +10 -1
  228. package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/install_scripts.pyi +1 -3
  229. package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/upload_docs.pyi +2 -3
  230. package/dist/typeshed-fallback/stubs/setuptools/setuptools/config/expand.pyi +1 -1
  231. package/dist/typeshed-fallback/stubs/six/six/__init__.pyi +1 -1
  232. package/dist/typeshed-fallback/stubs/uWSGI/METADATA.toml +4 -1
  233. package/dist/typeshed-fallback/stubs/ujson/METADATA.toml +1 -1
  234. package/dist/typeshed-fallback/stubs/wurlitzer/METADATA.toml +1 -1
  235. package/dist/typeshed-fallback/stubs/wurlitzer/wurlitzer.pyi +48 -6
  236. package/package.json +1 -1
@@ -8,9 +8,9 @@ from antlr4.atn.ATNState import RuleStopState as RuleStopState
8
8
  from antlr4.atn.SemanticContext import SemanticContext as SemanticContext
9
9
 
10
10
  class PredictionMode(Enum):
11
- SLL: int
12
- LL: int
13
- LL_EXACT_AMBIG_DETECTION: int
11
+ SLL = 0
12
+ LL = 1
13
+ LL_EXACT_AMBIG_DETECTION = 2
14
14
  @classmethod
15
15
  def hasSLLConflictTerminatingPrediction(cls, mode: PredictionMode, configs: ATNConfigSet): ...
16
16
  @classmethod
@@ -0,0 +1,2 @@
1
+ version = "1.1.*"
2
+ upstream_repository = "https://github.com/assertpy/assertpy"
@@ -0,0 +1,12 @@
1
+ from .assertpy import (
2
+ WarningLoggingAdapter as WarningLoggingAdapter,
3
+ __version__ as __version__,
4
+ add_extension as add_extension,
5
+ assert_that as assert_that,
6
+ assert_warn as assert_warn,
7
+ fail as fail,
8
+ remove_extension as remove_extension,
9
+ soft_assertions as soft_assertions,
10
+ soft_fail as soft_fail,
11
+ )
12
+ from .file import contents_of as contents_of
@@ -0,0 +1,70 @@
1
+ import logging
2
+ from collections.abc import Callable, Generator
3
+ from typing import Any
4
+ from typing_extensions import Self
5
+
6
+ from .base import BaseMixin
7
+ from .collection import CollectionMixin
8
+ from .contains import ContainsMixin
9
+ from .date import DateMixin
10
+ from .dict import DictMixin
11
+ from .dynamic import DynamicMixin
12
+ from .exception import ExceptionMixin
13
+ from .extracting import ExtractingMixin
14
+ from .file import FileMixin
15
+ from .helpers import HelpersMixin
16
+ from .numeric import NumericMixin
17
+ from .snapshot import SnapshotMixin
18
+ from .string import StringMixin
19
+
20
+ __version__: str
21
+ __tracebackhide__: bool
22
+
23
+ class WarningLoggingAdapter(logging.LoggerAdapter[logging.Logger]):
24
+ def process(self, msg: str, kwargs: Any) -> tuple[str, Any]: ...
25
+
26
+ class AssertionBuilder(
27
+ StringMixin,
28
+ SnapshotMixin,
29
+ NumericMixin,
30
+ HelpersMixin,
31
+ FileMixin,
32
+ ExtractingMixin,
33
+ ExceptionMixin,
34
+ DynamicMixin,
35
+ DictMixin,
36
+ DateMixin,
37
+ ContainsMixin,
38
+ CollectionMixin,
39
+ BaseMixin,
40
+ ):
41
+ val: Any
42
+ description: str
43
+ kind: str | None
44
+ expected: BaseException | None
45
+ logger: logging.Logger
46
+ def __init__(
47
+ self,
48
+ val: Any,
49
+ description: str = "",
50
+ kind: str | None = None,
51
+ expected: BaseException | None = None,
52
+ logger: logging.Logger | None = None,
53
+ ) -> None: ...
54
+ def builder(
55
+ self,
56
+ val: Any,
57
+ description: str = "",
58
+ kind: str | None = None,
59
+ expected: BaseException | None = None,
60
+ logger: logging.Logger | None = None,
61
+ ) -> Self: ...
62
+ def error(self, msg: str) -> Self: ...
63
+
64
+ def soft_assertions() -> Generator[None, None, None]: ...
65
+ def assert_that(val: Any, description: str = "") -> AssertionBuilder: ...
66
+ def assert_warn(val: Any, description: str = "", logger: logging.Logger | None = None) -> AssertionBuilder: ...
67
+ def fail(msg: str = "") -> None: ...
68
+ def soft_fail(msg: str = "") -> None: ...
69
+ def add_extension(func: Callable[[AssertionBuilder], AssertionBuilder]) -> None: ...
70
+ def remove_extension(func: Callable[[AssertionBuilder], AssertionBuilder]) -> None: ...
@@ -0,0 +1,21 @@
1
+ from typing import Any
2
+ from typing_extensions import Self, TypeAlias
3
+
4
+ __tracebackhide__: bool
5
+
6
+ _IncludeIgnore: TypeAlias = str | list[str] | list[tuple[str, ...]] | None
7
+
8
+ class BaseMixin:
9
+ description: str
10
+ def described_as(self, description: str) -> Self: ...
11
+ def is_equal_to(self, other: Any, *, include: _IncludeIgnore = None, ignore: _IncludeIgnore = None) -> Self: ...
12
+ def is_not_equal_to(self, other: Any) -> Self: ...
13
+ def is_same_as(self, other: Any) -> Self: ...
14
+ def is_not_same_as(self, other: Any) -> Self: ...
15
+ def is_true(self) -> Self: ...
16
+ def is_false(self) -> Self: ...
17
+ def is_none(self) -> Self: ...
18
+ def is_not_none(self) -> Self: ...
19
+ def is_type_of(self, some_type: type) -> Self: ...
20
+ def is_instance_of(self, some_class: type) -> Self: ...
21
+ def is_length(self, length: int) -> Self: ...
@@ -0,0 +1,11 @@
1
+ from collections.abc import Callable
2
+ from typing import Any
3
+ from typing_extensions import Self
4
+
5
+ __tracebackhide__: bool
6
+
7
+ class CollectionMixin:
8
+ def is_iterable(self) -> Self: ...
9
+ def is_not_iterable(self) -> Self: ...
10
+ def is_subset_of(self, *supersets: Any) -> Self: ...
11
+ def is_sorted(self, key: Callable[[Any], Any] = ..., reverse: bool = False) -> Self: ...
@@ -0,0 +1,16 @@
1
+ from typing import Any
2
+ from typing_extensions import Self
3
+
4
+ __tracebackhide__: bool
5
+
6
+ class ContainsMixin:
7
+ def contains(self, *items: Any) -> Self: ...
8
+ def does_not_contain(self, *items: Any) -> Self: ...
9
+ def contains_only(self, *items: Any) -> Self: ...
10
+ def contains_sequence(self, *items: Any) -> Self: ...
11
+ def contains_duplicates(self) -> Self: ...
12
+ def does_not_contain_duplicates(self) -> Self: ...
13
+ def is_empty(self) -> Self: ...
14
+ def is_not_empty(self) -> Self: ...
15
+ def is_in(self, *items: Any) -> Self: ...
16
+ def is_not_in(self, *items: Any) -> Self: ...
@@ -0,0 +1,11 @@
1
+ from datetime import date
2
+ from typing_extensions import Self
3
+
4
+ __tracebackhide__: bool
5
+
6
+ class DateMixin:
7
+ def is_before(self, other: date) -> Self: ...
8
+ def is_after(self, other: date) -> Self: ...
9
+ def is_equal_to_ignoring_milliseconds(self, other: date) -> Self: ...
10
+ def is_equal_to_ignoring_seconds(self, other: date) -> Self: ...
11
+ def is_equal_to_ignoring_time(self, other: date) -> Self: ...
@@ -0,0 +1,12 @@
1
+ from typing import Any
2
+ from typing_extensions import Self
3
+
4
+ __tracebackhide__: bool
5
+
6
+ class DictMixin:
7
+ def contains_key(self, *keys: Any) -> Self: ...
8
+ def does_not_contain_key(self, *keys: Any) -> Self: ...
9
+ def contains_value(self, *values: Any) -> Self: ...
10
+ def does_not_contain_value(self, *values: Any) -> Self: ...
11
+ def contains_entry(self, *args: Any, **kwargs: dict[str, Any]) -> Self: ...
12
+ def does_not_contain_entry(self, *args: Any, **kwargs: dict[str, Any]) -> Self: ...
@@ -0,0 +1,7 @@
1
+ from collections.abc import Callable
2
+ from typing_extensions import Self
3
+
4
+ __tracebackhide__: bool
5
+
6
+ class DynamicMixin:
7
+ def __getattr__(self, attr: str) -> Callable[..., Self]: ...
@@ -0,0 +1,8 @@
1
+ from typing import Any
2
+ from typing_extensions import Self
3
+
4
+ __tracebackhide__: bool
5
+
6
+ class ExceptionMixin:
7
+ def raises(self, ex: type[BaseException] | BaseException) -> Self: ...
8
+ def when_called_with(self, *some_args: Any, **some_kwargs: dict[str, Any]) -> Self: ...
@@ -0,0 +1,7 @@
1
+ from typing import Any
2
+ from typing_extensions import Self
3
+
4
+ __tracebackhide__: bool
5
+
6
+ class ExtractingMixin:
7
+ def extracting(self, *names: Any, **kwargs: dict[str, Any]) -> Self: ...
@@ -0,0 +1,15 @@
1
+ from _typeshed import StrPath
2
+ from typing import IO, AnyStr
3
+ from typing_extensions import Self
4
+
5
+ __tracebackhide__: bool
6
+
7
+ def contents_of(file: IO[AnyStr] | StrPath, encoding: str = "utf-8") -> str: ...
8
+
9
+ class FileMixin:
10
+ def exists(self) -> Self: ...
11
+ def does_not_exist(self) -> Self: ...
12
+ def is_file(self) -> Self: ...
13
+ def is_directory(self) -> Self: ...
14
+ def is_named(self, filename: str) -> Self: ...
15
+ def is_child_of(self, parent: str) -> Self: ...
@@ -0,0 +1,3 @@
1
+ __tracebackhide__: bool
2
+
3
+ class HelpersMixin: ...
@@ -0,0 +1,24 @@
1
+ from datetime import date
2
+ from typing_extensions import Self, TypeAlias
3
+
4
+ __tracebackhide__: bool
5
+
6
+ _Numeric: TypeAlias = date | int | float
7
+
8
+ class NumericMixin:
9
+ def is_zero(self) -> Self: ...
10
+ def is_not_zero(self) -> Self: ...
11
+ def is_nan(self) -> Self: ...
12
+ def is_not_nan(self) -> Self: ...
13
+ def is_inf(self) -> Self: ...
14
+ def is_not_inf(self) -> Self: ...
15
+ def is_greater_than(self, other: _Numeric) -> Self: ...
16
+ def is_greater_than_or_equal_to(self, other: _Numeric) -> Self: ...
17
+ def is_less_than(self, other: _Numeric) -> Self: ...
18
+ def is_less_than_or_equal_to(self, other: _Numeric) -> Self: ...
19
+ def is_positive(self) -> Self: ...
20
+ def is_negative(self) -> Self: ...
21
+ def is_between(self, low: _Numeric, high: _Numeric) -> Self: ...
22
+ def is_not_between(self, low: _Numeric, high: _Numeric) -> Self: ...
23
+ def is_close_to(self, other: _Numeric, tolerance: _Numeric) -> Self: ...
24
+ def is_not_close_to(self, other: _Numeric, tolerance: _Numeric) -> Self: ...
@@ -0,0 +1,6 @@
1
+ from typing_extensions import Self
2
+
3
+ __tracebackhide__: bool
4
+
5
+ class SnapshotMixin:
6
+ def snapshot(self, id: str | None = None, path: str = "__snapshots") -> Self: ...
@@ -0,0 +1,18 @@
1
+ from re import Pattern
2
+ from typing_extensions import Self
3
+
4
+ unicode = str
5
+ __tracebackhide__: bool
6
+
7
+ class StringMixin:
8
+ def is_equal_to_ignoring_case(self, other: str) -> Self: ...
9
+ def contains_ignoring_case(self, *items: str) -> Self: ...
10
+ def starts_with(self, prefix: str) -> Self: ...
11
+ def ends_with(self, suffix: str) -> Self: ...
12
+ def matches(self, pattern: Pattern[str]) -> Self: ...
13
+ def does_not_match(self, pattern: Pattern[str]) -> Self: ...
14
+ def is_alpha(self) -> Self: ...
15
+ def is_digit(self) -> Self: ...
16
+ def is_lower(self) -> Self: ...
17
+ def is_upper(self) -> Self: ...
18
+ def is_unicode(self) -> Self: ...
@@ -1,7 +1,7 @@
1
1
  from _typeshed import Incomplete, ReadableBuffer
2
2
  from collections.abc import Callable, Iterable, Iterator
3
3
  from re import Pattern
4
- from typing import Any, TypeVar, overload
4
+ from typing import Any, Literal, TypeVar, overload
5
5
  from typing_extensions import Self, TypeAlias
6
6
 
7
7
  from . import BeautifulSoup
@@ -295,25 +295,33 @@ class Tag(PageElement):
295
295
  self,
296
296
  encoding: str = "utf-8",
297
297
  indent_level: int | None = None,
298
- formatter: str | Formatter = "minimal",
298
+ formatter: Literal["html", "html5", "minimal"] | Formatter | None = "minimal",
299
299
  errors: str = "xmlcharrefreplace",
300
300
  ) -> bytes: ...
301
301
  def decode(
302
302
  self,
303
303
  indent_level: int | None = None,
304
304
  eventual_encoding: str = "utf-8",
305
- formatter: str | Formatter = "minimal",
305
+ formatter: Literal["html", "html5", "minimal"] | Formatter | None = "minimal",
306
306
  iterator: Iterator[PageElement] | None = None,
307
307
  ) -> str: ...
308
308
  @overload
309
- def prettify(self, encoding: str, formatter: str | Formatter = "minimal") -> bytes: ...
309
+ def prettify(self, encoding: str, formatter: Literal["html", "html5", "minimal"] | Formatter | None = "minimal") -> bytes: ...
310
310
  @overload
311
- def prettify(self, encoding: None = None, formatter: str | Formatter = "minimal") -> str: ...
311
+ def prettify(
312
+ self, encoding: None = None, formatter: Literal["html", "html5", "minimal"] | Formatter | None = "minimal"
313
+ ) -> str: ...
312
314
  def decode_contents(
313
- self, indent_level: int | None = None, eventual_encoding: str = "utf-8", formatter: str | Formatter = "minimal"
315
+ self,
316
+ indent_level: int | None = None,
317
+ eventual_encoding: str = "utf-8",
318
+ formatter: Literal["html", "html5", "minimal"] | Formatter | None = "minimal",
314
319
  ) -> str: ...
315
320
  def encode_contents(
316
- self, indent_level: int | None = None, encoding: str = "utf-8", formatter: str | Formatter = "minimal"
321
+ self,
322
+ indent_level: int | None = None,
323
+ encoding: str = "utf-8",
324
+ formatter: Literal["html", "html5", "minimal"] | Formatter | None = "minimal",
317
325
  ) -> bytes: ...
318
326
  def renderContents(self, encoding: str = "utf-8", prettyPrint: bool = False, indentLevel: int = 0) -> bytes: ...
319
327
  def find(
@@ -1,13 +1,36 @@
1
+ import datetime
1
2
  from _typeshed import Incomplete
3
+ from typing import Literal, TypedDict, overload, type_check_only
4
+ from typing_extensions import TypeAlias
5
+
6
+ from docker.types.daemon import CancellableStream
7
+
8
+ from ..types import ContainerConfig, EndpointConfig, HostConfig, NetworkingConfig
9
+
10
+ @type_check_only
11
+ class _HasId(TypedDict):
12
+ Id: str
13
+
14
+ @type_check_only
15
+ class _HasID(TypedDict):
16
+ ID: str
17
+
18
+ _Container: TypeAlias = _HasId | _HasID | str
2
19
 
3
20
  class ContainerApiMixin:
4
21
  def attach(
5
- self, container, stdout: bool = True, stderr: bool = True, stream: bool = False, logs: bool = False, demux: bool = False
22
+ self,
23
+ container: _Container,
24
+ stdout: bool = True,
25
+ stderr: bool = True,
26
+ stream: bool = False,
27
+ logs: bool = False,
28
+ demux: bool = False,
6
29
  ): ...
7
- def attach_socket(self, container, params: Incomplete | None = None, ws: bool = False): ...
30
+ def attach_socket(self, container: _Container, params: Incomplete | None = None, ws: bool = False): ...
8
31
  def commit(
9
32
  self,
10
- container,
33
+ container: _Container,
11
34
  repository: str | None = None,
12
35
  tag: str | None = None,
13
36
  message: Incomplete | None = None,
@@ -22,8 +45,8 @@ class ContainerApiMixin:
22
45
  all: bool = False,
23
46
  trunc: bool = False,
24
47
  latest: bool = False,
25
- since: Incomplete | None = None,
26
- before: Incomplete | None = None,
48
+ since: str | None = None,
49
+ before: str | None = None,
27
50
  limit: int = -1,
28
51
  size: bool = False,
29
52
  filters: Incomplete | None = None,
@@ -31,79 +54,114 @@ class ContainerApiMixin:
31
54
  def create_container(
32
55
  self,
33
56
  image,
34
- command: Incomplete | None = None,
35
- hostname: Incomplete | None = None,
36
- user: Incomplete | None = None,
57
+ command: str | list[str] | None = None,
58
+ hostname: str | None = None,
59
+ user: str | int | None = None,
37
60
  detach: bool = False,
38
61
  stdin_open: bool = False,
39
62
  tty: bool = False,
40
- ports: Incomplete | None = None,
41
- environment: Incomplete | None = None,
42
- volumes: Incomplete | None = None,
63
+ ports: list[int] | None = None,
64
+ environment: dict[str, str] | list[str] | None = None,
65
+ volumes: str | list[str] | None = None,
43
66
  network_disabled: bool = False,
44
- name: Incomplete | None = None,
45
- entrypoint: Incomplete | None = None,
46
- working_dir: Incomplete | None = None,
47
- domainname: Incomplete | None = None,
67
+ name: str | None = None,
68
+ entrypoint: str | list[str] | None = None,
69
+ working_dir: str | None = None,
70
+ domainname: str | None = None,
48
71
  host_config: Incomplete | None = None,
49
- mac_address: Incomplete | None = None,
50
- labels: Incomplete | None = None,
51
- stop_signal: Incomplete | None = None,
72
+ mac_address: str | None = None,
73
+ labels: dict[str, str] | list[str] | None = None,
74
+ stop_signal: str | None = None,
52
75
  networking_config: Incomplete | None = None,
53
76
  healthcheck: Incomplete | None = None,
54
- stop_timeout: Incomplete | None = None,
55
- runtime: Incomplete | None = None,
77
+ stop_timeout: int | None = None,
78
+ runtime: str | None = None,
56
79
  use_config_proxy: bool = True,
57
- platform: Incomplete | None = None,
80
+ platform: str | None = None,
58
81
  ): ...
59
- def create_container_config(self, *args, **kwargs): ...
82
+ def create_container_config(self, *args, **kwargs) -> ContainerConfig: ...
60
83
  def create_container_from_config(self, config, name: Incomplete | None = None, platform: Incomplete | None = None): ...
61
- def create_host_config(self, *args, **kwargs): ...
62
- def create_networking_config(self, *args, **kwargs): ...
63
- def create_endpoint_config(self, *args, **kwargs): ...
64
- def diff(self, container): ...
65
- def export(self, container, chunk_size=2097152): ...
66
- def get_archive(self, container, path, chunk_size=2097152, encode_stream: bool = False): ...
67
- def inspect_container(self, container): ...
68
- def kill(self, container, signal: Incomplete | None = None) -> None: ...
84
+ def create_host_config(self, *args, **kwargs) -> HostConfig: ...
85
+ def create_networking_config(self, *args, **kwargs) -> NetworkingConfig: ...
86
+ def create_endpoint_config(self, *args, **kwargs) -> EndpointConfig: ...
87
+ def diff(self, container: _Container) -> list[dict[Incomplete, Incomplete]]: ...
88
+ def export(self, container: _Container, chunk_size: int | None = 2097152): ...
89
+ def get_archive(
90
+ self, container: _Container, path, chunk_size: int | None = 2097152, encode_stream: bool = False
91
+ ) -> tuple[Incomplete, Incomplete]: ...
92
+ def inspect_container(self, container: _Container): ...
93
+ def kill(self, container: _Container, signal: str | int | None = None) -> None: ...
94
+ @overload
69
95
  def logs(
70
96
  self,
71
- container,
97
+ container: _Container,
72
98
  stdout: bool = True,
73
99
  stderr: bool = True,
74
- stream: bool = False,
100
+ *,
101
+ stream: Literal[True],
75
102
  timestamps: bool = False,
76
- tail: str = "all",
77
- since: Incomplete | None = None,
78
- follow: Incomplete | None = None,
79
- until: Incomplete | None = None,
80
- ): ...
81
- def pause(self, container) -> None: ...
82
- def port(self, container, private_port): ...
83
- def put_archive(self, container, path, data): ...
103
+ tail: Literal["all"] | int = "all",
104
+ since: datetime.datetime | float | None = None,
105
+ follow: bool | None = None,
106
+ until: datetime.datetime | float | None = None,
107
+ ) -> CancellableStream: ...
108
+ @overload
109
+ def logs(
110
+ self,
111
+ container: _Container,
112
+ stdout: bool,
113
+ stderr: bool,
114
+ stream: Literal[True],
115
+ timestamps: bool = False,
116
+ tail: Literal["all"] | int = "all",
117
+ since: datetime.datetime | float | None = None,
118
+ follow: bool | None = None,
119
+ until: datetime.datetime | float | None = None,
120
+ ) -> CancellableStream: ...
121
+ @overload
122
+ def logs(
123
+ self,
124
+ container: _Container,
125
+ stdout: bool = True,
126
+ stderr: bool = True,
127
+ stream: Literal[False] = False,
128
+ timestamps: bool = False,
129
+ tail: Literal["all"] | int = "all",
130
+ since: datetime.datetime | float | None = None,
131
+ follow: bool | None = None,
132
+ until: datetime.datetime | float | None = None,
133
+ ) -> bytes: ...
134
+ def pause(self, container: _Container) -> None: ...
135
+ def port(self, container: _Container, private_port: int): ...
136
+ def put_archive(self, container: _Container, path: str, data) -> bool: ...
84
137
  def prune_containers(self, filters: Incomplete | None = None): ...
85
- def remove_container(self, container, v: bool = False, link: bool = False, force: bool = False) -> None: ...
86
- def rename(self, container, name) -> None: ...
87
- def resize(self, container, height, width) -> None: ...
88
- def restart(self, container, timeout: int = 10) -> None: ...
89
- def start(self, container, *args, **kwargs) -> None: ...
90
- def stats(self, container, decode: Incomplete | None = None, stream: bool = True, one_shot: Incomplete | None = None): ...
91
- def stop(self, container, timeout: Incomplete | None = None) -> None: ...
92
- def top(self, container, ps_args: Incomplete | None = None): ...
93
- def unpause(self, container) -> None: ...
138
+ def remove_container(self, container: _Container, v: bool = False, link: bool = False, force: bool = False) -> None: ...
139
+ def rename(self, container: _Container, name: str) -> None: ...
140
+ def resize(self, container: _Container, height: int, width: int) -> None: ...
141
+ def restart(self, container: _Container, timeout: int = 10) -> None: ...
142
+ def start(self, container: _Container, *args, **kwargs) -> None: ...
143
+ def stats(self, container: _Container, decode: bool | None = None, stream: bool = True, one_shot: bool | None = None): ...
144
+ def stop(self, container: _Container, timeout: int | None = None) -> None: ...
145
+ def top(self, container: _Container, ps_args: str | None = None): ...
146
+ def unpause(self, container: _Container) -> None: ...
94
147
  def update_container(
95
148
  self,
96
- container,
97
- blkio_weight: Incomplete | None = None,
98
- cpu_period: Incomplete | None = None,
99
- cpu_quota: Incomplete | None = None,
100
- cpu_shares: Incomplete | None = None,
101
- cpuset_cpus: Incomplete | None = None,
102
- cpuset_mems: Incomplete | None = None,
103
- mem_limit: Incomplete | None = None,
104
- mem_reservation: Incomplete | None = None,
105
- memswap_limit: Incomplete | None = None,
106
- kernel_memory: Incomplete | None = None,
149
+ container: _Container,
150
+ blkio_weight: int | None = None,
151
+ cpu_period: int | None = None,
152
+ cpu_quota: int | None = None,
153
+ cpu_shares: int | None = None,
154
+ cpuset_cpus: str | None = None,
155
+ cpuset_mems: str | None = None,
156
+ mem_limit: float | str | None = None,
157
+ mem_reservation: float | str | None = None,
158
+ memswap_limit: int | str | None = None,
159
+ kernel_memory: int | str | None = None,
107
160
  restart_policy: Incomplete | None = None,
108
161
  ): ...
109
- def wait(self, container, timeout: Incomplete | None = None, condition: Incomplete | None = None): ...
162
+ def wait(
163
+ self,
164
+ container: _Container,
165
+ timeout: int | None = None,
166
+ condition: Literal["not-running", "next-exit", "removed"] | None = None,
167
+ ): ...
@@ -1,5 +1,5 @@
1
1
  from _typeshed import Incomplete
2
- from collections.abc import Mapping
2
+ from collections.abc import Iterator, Mapping
3
3
  from typing import NoReturn
4
4
 
5
5
  from docker.models.containers import Container
@@ -47,8 +47,8 @@ class StreamParseError(RuntimeError):
47
47
 
48
48
  class BuildError(DockerException):
49
49
  msg: str
50
- build_log: str
51
- def __init__(self, reason: str, build_log: str) -> None: ...
50
+ build_log: Iterator[dict[str, str]]
51
+ def __init__(self, reason: str, build_log: Iterator[dict[str, str]]) -> None: ...
52
52
 
53
53
  class ImageLoadError(DockerException): ...
54
54