basedpyright 1.16.0 → 1.17.0

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 (164) 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/commit.txt +1 -1
  6. package/dist/typeshed-fallback/stdlib/_ast.pyi +5 -3
  7. package/dist/typeshed-fallback/stdlib/_collections_abc.pyi +6 -3
  8. package/dist/typeshed-fallback/stdlib/_ctypes.pyi +2 -2
  9. package/dist/typeshed-fallback/stdlib/_operator.pyi +5 -1
  10. package/dist/typeshed-fallback/stdlib/_stat.pyi +6 -6
  11. package/dist/typeshed-fallback/stdlib/_tkinter.pyi +2 -2
  12. package/dist/typeshed-fallback/stdlib/argparse.pyi +11 -1
  13. package/dist/typeshed-fallback/stdlib/array.pyi +3 -3
  14. package/dist/typeshed-fallback/stdlib/ast.pyi +18 -17
  15. package/dist/typeshed-fallback/stdlib/builtins.pyi +7 -5
  16. package/dist/typeshed-fallback/stdlib/cmd.pyi +2 -1
  17. package/dist/typeshed-fallback/stdlib/collections/__init__.pyi +2 -1
  18. package/dist/typeshed-fallback/stdlib/contextlib.pyi +2 -0
  19. package/dist/typeshed-fallback/stdlib/crypt.pyi +6 -5
  20. package/dist/typeshed-fallback/stdlib/dataclasses.pyi +5 -1
  21. package/dist/typeshed-fallback/stdlib/datetime.pyi +2 -2
  22. package/dist/typeshed-fallback/stdlib/distutils/cmd.pyi +120 -0
  23. package/dist/typeshed-fallback/stdlib/distutils/command/__init__.pyi +48 -0
  24. package/dist/typeshed-fallback/stdlib/distutils/command/check.pyi +2 -2
  25. package/dist/typeshed-fallback/stdlib/distutils/command/config.pyi +2 -2
  26. package/dist/typeshed-fallback/stdlib/distutils/command/install.pyi +9 -4
  27. package/dist/typeshed-fallback/stdlib/distutils/command/install_lib.pyi +2 -2
  28. package/dist/typeshed-fallback/stdlib/distutils/core.pyi +2 -2
  29. package/dist/typeshed-fallback/stdlib/distutils/cygwinccompiler.pyi +5 -5
  30. package/dist/typeshed-fallback/stdlib/distutils/debug.pyi +3 -1
  31. package/dist/typeshed-fallback/stdlib/distutils/dist.pyi +149 -4
  32. package/dist/typeshed-fallback/stdlib/distutils/fancy_getopt.pyi +6 -6
  33. package/dist/typeshed-fallback/stdlib/distutils/log.pyi +6 -6
  34. package/dist/typeshed-fallback/stdlib/distutils/sysconfig.pyi +7 -7
  35. package/dist/typeshed-fallback/stdlib/email/message.pyi +2 -1
  36. package/dist/typeshed-fallback/stdlib/email/utils.pyi +4 -1
  37. package/dist/typeshed-fallback/stdlib/filecmp.pyi +18 -7
  38. package/dist/typeshed-fallback/stdlib/ftplib.pyi +1 -1
  39. package/dist/typeshed-fallback/stdlib/json/encoder.pyi +6 -6
  40. package/dist/typeshed-fallback/stdlib/logging/__init__.pyi +31 -36
  41. package/dist/typeshed-fallback/stdlib/marshal.pyi +2 -2
  42. package/dist/typeshed-fallback/stdlib/math.pyi +3 -3
  43. package/dist/typeshed-fallback/stdlib/operator.pyi +3 -0
  44. package/dist/typeshed-fallback/stdlib/os/__init__.pyi +4 -2
  45. package/dist/typeshed-fallback/stdlib/pathlib.pyi +24 -2
  46. package/dist/typeshed-fallback/stdlib/poplib.pyi +2 -1
  47. package/dist/typeshed-fallback/stdlib/pty.pyi +8 -3
  48. package/dist/typeshed-fallback/stdlib/pyexpat/__init__.pyi +3 -3
  49. package/dist/typeshed-fallback/stdlib/pyexpat/errors.pyi +45 -43
  50. package/dist/typeshed-fallback/stdlib/pyexpat/model.pyi +12 -10
  51. package/dist/typeshed-fallback/stdlib/select.pyi +1 -1
  52. package/dist/typeshed-fallback/stdlib/signal.pyi +1 -1
  53. package/dist/typeshed-fallback/stdlib/sqlite3/dbapi2.pyi +8 -2
  54. package/dist/typeshed-fallback/stdlib/tarfile.pyi +1 -1
  55. package/dist/typeshed-fallback/stdlib/time.pyi +5 -5
  56. package/dist/typeshed-fallback/stdlib/tkinter/__init__.pyi +28 -4
  57. package/dist/typeshed-fallback/stdlib/tkinter/constants.pyi +6 -6
  58. package/dist/typeshed-fallback/stdlib/tkinter/dialog.pyi +2 -2
  59. package/dist/typeshed-fallback/stdlib/tkinter/messagebox.pyi +17 -17
  60. package/dist/typeshed-fallback/stdlib/tkinter/ttk.pyi +3 -1
  61. package/dist/typeshed-fallback/stdlib/typing.pyi +2 -1
  62. package/dist/typeshed-fallback/stdlib/urllib/request.pyi +1 -0
  63. package/dist/typeshed-fallback/stdlib/zipfile/__init__.pyi +78 -3
  64. package/dist/typeshed-fallback/stdlib/zipfile/_path.pyi +1 -0
  65. package/dist/typeshed-fallback/stubs/JACK-Client/METADATA.toml +3 -1
  66. package/dist/typeshed-fallback/stubs/cachetools/METADATA.toml +1 -1
  67. package/dist/typeshed-fallback/stubs/cachetools/cachetools/__init__.pyi +2 -2
  68. package/dist/typeshed-fallback/stubs/corus/METADATA.toml +2 -0
  69. package/dist/typeshed-fallback/stubs/corus/corus/__init__.pyi +1 -0
  70. package/dist/typeshed-fallback/stubs/corus/corus/io.pyi +21 -0
  71. package/dist/typeshed-fallback/stubs/corus/corus/readme.pyi +17 -0
  72. package/dist/typeshed-fallback/stubs/corus/corus/record.pyi +8 -0
  73. package/dist/typeshed-fallback/stubs/corus/corus/sources/__init__.pyi +23 -0
  74. package/dist/typeshed-fallback/stubs/corus/corus/sources/bsnlp.pyi +75 -0
  75. package/dist/typeshed-fallback/stubs/corus/corus/sources/buriy.pyi +18 -0
  76. package/dist/typeshed-fallback/stubs/corus/corus/sources/corpora.pyi +50 -0
  77. package/dist/typeshed-fallback/stubs/corus/corus/sources/factru.pyi +74 -0
  78. package/dist/typeshed-fallback/stubs/corus/corus/sources/gareev.pyi +21 -0
  79. package/dist/typeshed-fallback/stubs/corus/corus/sources/gramru.pyi +1 -0
  80. package/dist/typeshed-fallback/stubs/corus/corus/sources/lenta.pyi +19 -0
  81. package/dist/typeshed-fallback/stubs/corus/corus/sources/librusec.pyi +14 -0
  82. package/dist/typeshed-fallback/stubs/corus/corus/sources/meta.pyi +54 -0
  83. package/dist/typeshed-fallback/stubs/corus/corus/sources/mokoron.pyi +28 -0
  84. package/dist/typeshed-fallback/stubs/corus/corus/sources/morphoru.pyi +24 -0
  85. package/dist/typeshed-fallback/stubs/corus/corus/sources/ne5.pyi +28 -0
  86. package/dist/typeshed-fallback/stubs/corus/corus/sources/ods.pyi +46 -0
  87. package/dist/typeshed-fallback/stubs/corus/corus/sources/omnia.pyi +49 -0
  88. package/dist/typeshed-fallback/stubs/corus/corus/sources/persons.pyi +27 -0
  89. package/dist/typeshed-fallback/stubs/corus/corus/sources/ria.pyi +21 -0
  90. package/dist/typeshed-fallback/stubs/corus/corus/sources/rudrec.pyi +27 -0
  91. package/dist/typeshed-fallback/stubs/corus/corus/sources/russe.pyi +16 -0
  92. package/dist/typeshed-fallback/stubs/corus/corus/sources/simlex.pyi +14 -0
  93. package/dist/typeshed-fallback/stubs/corus/corus/sources/taiga/__init__.pyi +10 -0
  94. package/dist/typeshed-fallback/stubs/corus/corus/sources/taiga/arzamas.pyi +6 -0
  95. package/dist/typeshed-fallback/stubs/corus/corus/sources/taiga/common.pyi +77 -0
  96. package/dist/typeshed-fallback/stubs/corus/corus/sources/taiga/fontanka.pyi +6 -0
  97. package/dist/typeshed-fallback/stubs/corus/corus/sources/taiga/interfax.pyi +6 -0
  98. package/dist/typeshed-fallback/stubs/corus/corus/sources/taiga/kp.pyi +6 -0
  99. package/dist/typeshed-fallback/stubs/corus/corus/sources/taiga/lenta.pyi +6 -0
  100. package/dist/typeshed-fallback/stubs/corus/corus/sources/taiga/magazines.pyi +6 -0
  101. package/dist/typeshed-fallback/stubs/corus/corus/sources/taiga/nplus1.pyi +6 -0
  102. package/dist/typeshed-fallback/stubs/corus/corus/sources/taiga/proza.pyi +8 -0
  103. package/dist/typeshed-fallback/stubs/corus/corus/sources/taiga/social.pyi +15 -0
  104. package/dist/typeshed-fallback/stubs/corus/corus/sources/taiga/subtitles.pyi +6 -0
  105. package/dist/typeshed-fallback/stubs/corus/corus/sources/toloka.pyi +28 -0
  106. package/dist/typeshed-fallback/stubs/corus/corus/sources/ud.pyi +29 -0
  107. package/dist/typeshed-fallback/stubs/corus/corus/sources/wiki.pyi +20 -0
  108. package/dist/typeshed-fallback/stubs/corus/corus/sources/wikiner.pyi +19 -0
  109. package/dist/typeshed-fallback/stubs/corus/corus/third/WikiExtractor.pyi +227 -0
  110. package/dist/typeshed-fallback/stubs/corus/corus/third/__init__.pyi +0 -0
  111. package/dist/typeshed-fallback/stubs/corus/corus/zip.pyi +28 -0
  112. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/drawing.pyi +2 -2
  113. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/fpdf.pyi +1 -1
  114. package/dist/typeshed-fallback/stubs/google-cloud-ndb/google/cloud/ndb/client.pyi +2 -2
  115. package/dist/typeshed-fallback/stubs/influxdb-client/METADATA.toml +1 -1
  116. package/dist/typeshed-fallback/stubs/jsonschema/jsonschema/validators.pyi +1 -1
  117. package/dist/typeshed-fallback/stubs/networkx/METADATA.toml +3 -2
  118. package/dist/typeshed-fallback/stubs/networkx/networkx/classes/digraph.pyi +14 -14
  119. package/dist/typeshed-fallback/stubs/networkx/networkx/classes/graph.pyi +15 -9
  120. package/dist/typeshed-fallback/stubs/networkx/networkx/classes/multidigraph.pyi +17 -4
  121. package/dist/typeshed-fallback/stubs/networkx/networkx/classes/multigraph.pyi +4 -0
  122. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/cell/__init__.pyi +2 -0
  123. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/chart/series.pyi +3 -1
  124. package/dist/typeshed-fallback/stubs/openpyxl/openpyxl/worksheet/_reader.pyi +4 -5
  125. package/dist/typeshed-fallback/stubs/passlib/passlib/utils/handlers.pyi +6 -2
  126. package/dist/typeshed-fallback/stubs/peewee/peewee.pyi +1 -1
  127. package/dist/typeshed-fallback/stubs/polib/polib.pyi +4 -2
  128. package/dist/typeshed-fallback/stubs/psycopg2/psycopg2/_psycopg.pyi +1 -1
  129. package/dist/typeshed-fallback/stubs/pyflakes/pyflakes/checker.pyi +2 -2
  130. package/dist/typeshed-fallback/stubs/pygit2/pygit2/utils.pyi +2 -2
  131. package/dist/typeshed-fallback/stubs/pyinstaller/METADATA.toml +1 -5
  132. package/dist/typeshed-fallback/stubs/pyinstaller/PyInstaller/building/splash.pyi +0 -1
  133. package/dist/typeshed-fallback/stubs/pyinstaller/PyInstaller/compat.pyi +2 -0
  134. package/dist/typeshed-fallback/stubs/pynput/pynput/keyboard/_base.pyi +2 -2
  135. package/dist/typeshed-fallback/stubs/redis/redis/client.pyi +24 -8
  136. package/dist/typeshed-fallback/stubs/reportlab/reportlab/platypus/doctemplate.pyi +7 -1
  137. package/dist/typeshed-fallback/stubs/seaborn/METADATA.toml +3 -1
  138. package/dist/typeshed-fallback/stubs/seaborn/seaborn/_core/plot.pyi +1 -1
  139. package/dist/typeshed-fallback/stubs/setuptools/setuptools/__init__.pyi +136 -4
  140. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/cmd.pyi +2 -0
  141. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/dist.pyi +6 -4
  142. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/sysconfig.pyi +3 -3
  143. package/dist/typeshed-fallback/stubs/setuptools/setuptools/dist.pyi +185 -0
  144. package/dist/typeshed-fallback/stubs/setuptools/setuptools/wheel.pyi +1 -1
  145. package/dist/typeshed-fallback/stubs/shapely/METADATA.toml +3 -1
  146. package/package.json +1 -1
  147. package/dist/typeshed-fallback/stubs/flake8-2020/METADATA.toml +0 -2
  148. package/dist/typeshed-fallback/stubs/flake8-2020/flake8_2020.pyi +0 -26
  149. package/dist/typeshed-fallback/stubs/paho-mqtt/METADATA.toml +0 -3
  150. package/dist/typeshed-fallback/stubs/paho-mqtt/paho/mqtt/__init__.pyi +0 -1
  151. package/dist/typeshed-fallback/stubs/paho-mqtt/paho/mqtt/client.pyi +0 -331
  152. package/dist/typeshed-fallback/stubs/paho-mqtt/paho/mqtt/matcher.pyi +0 -11
  153. package/dist/typeshed-fallback/stubs/paho-mqtt/paho/mqtt/packettypes.pyi +0 -19
  154. package/dist/typeshed-fallback/stubs/paho-mqtt/paho/mqtt/properties.pyi +0 -38
  155. package/dist/typeshed-fallback/stubs/paho-mqtt/paho/mqtt/publish.pyi +0 -63
  156. package/dist/typeshed-fallback/stubs/paho-mqtt/paho/mqtt/reasoncodes.pyi +0 -13
  157. package/dist/typeshed-fallback/stubs/paho-mqtt/paho/mqtt/subscribe.pyi +0 -39
  158. package/dist/typeshed-fallback/stubs/paho-mqtt/paho/mqtt/subscribeoptions.pyi +0 -24
  159. package/dist/typeshed-fallback/stubs/python-slugify/METADATA.toml +0 -3
  160. package/dist/typeshed-fallback/stubs/python-slugify/slugify/__init__.pyi +0 -12
  161. package/dist/typeshed-fallback/stubs/python-slugify/slugify/__version__.pyi +0 -8
  162. package/dist/typeshed-fallback/stubs/python-slugify/slugify/slugify.pyi +0 -20
  163. package/dist/typeshed-fallback/stubs/python-slugify/slugify/special.pyi +0 -8
  164. /package/dist/typeshed-fallback/stubs/{paho-mqtt/paho/__init__.pyi → corus/corus/path.pyi} +0 -0
@@ -1,51 +1,53 @@
1
1
  """Constants used to describe error conditions."""
2
2
 
3
3
  import sys
4
+ from typing import Final
5
+ from typing_extensions import LiteralString
4
6
 
5
7
  codes: dict[str, int]
6
8
  messages: dict[int, str]
7
9
 
8
- XML_ERROR_ABORTED: str
9
- XML_ERROR_ASYNC_ENTITY: str
10
- XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF: str
11
- XML_ERROR_BAD_CHAR_REF: str
12
- XML_ERROR_BINARY_ENTITY_REF: str
13
- XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING: str
14
- XML_ERROR_DUPLICATE_ATTRIBUTE: str
15
- XML_ERROR_ENTITY_DECLARED_IN_PE: str
16
- XML_ERROR_EXTERNAL_ENTITY_HANDLING: str
17
- XML_ERROR_FEATURE_REQUIRES_XML_DTD: str
18
- XML_ERROR_FINISHED: str
19
- XML_ERROR_INCOMPLETE_PE: str
20
- XML_ERROR_INCORRECT_ENCODING: str
21
- XML_ERROR_INVALID_TOKEN: str
22
- XML_ERROR_JUNK_AFTER_DOC_ELEMENT: str
23
- XML_ERROR_MISPLACED_XML_PI: str
24
- XML_ERROR_NOT_STANDALONE: str
25
- XML_ERROR_NOT_SUSPENDED: str
26
- XML_ERROR_NO_ELEMENTS: str
27
- XML_ERROR_NO_MEMORY: str
28
- XML_ERROR_PARAM_ENTITY_REF: str
29
- XML_ERROR_PARTIAL_CHAR: str
30
- XML_ERROR_PUBLICID: str
31
- XML_ERROR_RECURSIVE_ENTITY_REF: str
32
- XML_ERROR_SUSPENDED: str
33
- XML_ERROR_SUSPEND_PE: str
34
- XML_ERROR_SYNTAX: str
35
- XML_ERROR_TAG_MISMATCH: str
36
- XML_ERROR_TEXT_DECL: str
37
- XML_ERROR_UNBOUND_PREFIX: str
38
- XML_ERROR_UNCLOSED_CDATA_SECTION: str
39
- XML_ERROR_UNCLOSED_TOKEN: str
40
- XML_ERROR_UNDECLARING_PREFIX: str
41
- XML_ERROR_UNDEFINED_ENTITY: str
42
- XML_ERROR_UNEXPECTED_STATE: str
43
- XML_ERROR_UNKNOWN_ENCODING: str
44
- XML_ERROR_XML_DECL: str
10
+ XML_ERROR_ABORTED: Final[LiteralString]
11
+ XML_ERROR_ASYNC_ENTITY: Final[LiteralString]
12
+ XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF: Final[LiteralString]
13
+ XML_ERROR_BAD_CHAR_REF: Final[LiteralString]
14
+ XML_ERROR_BINARY_ENTITY_REF: Final[LiteralString]
15
+ XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING: Final[LiteralString]
16
+ XML_ERROR_DUPLICATE_ATTRIBUTE: Final[LiteralString]
17
+ XML_ERROR_ENTITY_DECLARED_IN_PE: Final[LiteralString]
18
+ XML_ERROR_EXTERNAL_ENTITY_HANDLING: Final[LiteralString]
19
+ XML_ERROR_FEATURE_REQUIRES_XML_DTD: Final[LiteralString]
20
+ XML_ERROR_FINISHED: Final[LiteralString]
21
+ XML_ERROR_INCOMPLETE_PE: Final[LiteralString]
22
+ XML_ERROR_INCORRECT_ENCODING: Final[LiteralString]
23
+ XML_ERROR_INVALID_TOKEN: Final[LiteralString]
24
+ XML_ERROR_JUNK_AFTER_DOC_ELEMENT: Final[LiteralString]
25
+ XML_ERROR_MISPLACED_XML_PI: Final[LiteralString]
26
+ XML_ERROR_NOT_STANDALONE: Final[LiteralString]
27
+ XML_ERROR_NOT_SUSPENDED: Final[LiteralString]
28
+ XML_ERROR_NO_ELEMENTS: Final[LiteralString]
29
+ XML_ERROR_NO_MEMORY: Final[LiteralString]
30
+ XML_ERROR_PARAM_ENTITY_REF: Final[LiteralString]
31
+ XML_ERROR_PARTIAL_CHAR: Final[LiteralString]
32
+ XML_ERROR_PUBLICID: Final[LiteralString]
33
+ XML_ERROR_RECURSIVE_ENTITY_REF: Final[LiteralString]
34
+ XML_ERROR_SUSPENDED: Final[LiteralString]
35
+ XML_ERROR_SUSPEND_PE: Final[LiteralString]
36
+ XML_ERROR_SYNTAX: Final[LiteralString]
37
+ XML_ERROR_TAG_MISMATCH: Final[LiteralString]
38
+ XML_ERROR_TEXT_DECL: Final[LiteralString]
39
+ XML_ERROR_UNBOUND_PREFIX: Final[LiteralString]
40
+ XML_ERROR_UNCLOSED_CDATA_SECTION: Final[LiteralString]
41
+ XML_ERROR_UNCLOSED_TOKEN: Final[LiteralString]
42
+ XML_ERROR_UNDECLARING_PREFIX: Final[LiteralString]
43
+ XML_ERROR_UNDEFINED_ENTITY: Final[LiteralString]
44
+ XML_ERROR_UNEXPECTED_STATE: Final[LiteralString]
45
+ XML_ERROR_UNKNOWN_ENCODING: Final[LiteralString]
46
+ XML_ERROR_XML_DECL: Final[LiteralString]
45
47
  if sys.version_info >= (3, 11):
46
- XML_ERROR_RESERVED_PREFIX_XML: str
47
- XML_ERROR_RESERVED_PREFIX_XMLNS: str
48
- XML_ERROR_RESERVED_NAMESPACE_URI: str
49
- XML_ERROR_INVALID_ARGUMENT: str
50
- XML_ERROR_NO_BUFFER: str
51
- XML_ERROR_AMPLIFICATION_LIMIT_BREACH: str
48
+ XML_ERROR_RESERVED_PREFIX_XML: Final[LiteralString]
49
+ XML_ERROR_RESERVED_PREFIX_XMLNS: Final[LiteralString]
50
+ XML_ERROR_RESERVED_NAMESPACE_URI: Final[LiteralString]
51
+ XML_ERROR_INVALID_ARGUMENT: Final[LiteralString]
52
+ XML_ERROR_NO_BUFFER: Final[LiteralString]
53
+ XML_ERROR_AMPLIFICATION_LIMIT_BREACH: Final[LiteralString]
@@ -1,13 +1,15 @@
1
1
  """Constants used to interpret content model information."""
2
2
 
3
- XML_CTYPE_ANY: int
4
- XML_CTYPE_CHOICE: int
5
- XML_CTYPE_EMPTY: int
6
- XML_CTYPE_MIXED: int
7
- XML_CTYPE_NAME: int
8
- XML_CTYPE_SEQ: int
3
+ from typing import Final
9
4
 
10
- XML_CQUANT_NONE: int
11
- XML_CQUANT_OPT: int
12
- XML_CQUANT_PLUS: int
13
- XML_CQUANT_REP: int
5
+ XML_CTYPE_ANY: Final = 2
6
+ XML_CTYPE_EMPTY: Final = 1
7
+ XML_CTYPE_MIXED: Final = 3
8
+ XML_CTYPE_NAME: Final = 4
9
+ XML_CTYPE_CHOICE: Final = 5
10
+ XML_CTYPE_SEQ: Final = 6
11
+
12
+ XML_CQUANT_NONE: Final = 0
13
+ XML_CQUANT_OPT: Final = 1
14
+ XML_CQUANT_REP: Final = 2
15
+ XML_CQUANT_PLUS: Final = 3
@@ -56,7 +56,7 @@ def select(
56
56
  gotten from a fileno() method call on one of those.
57
57
 
58
58
  The optional 4th argument specifies a timeout in seconds; it may be
59
- a floating point number to specify fractions of seconds. If it is absent
59
+ a floating-point number to specify fractions of seconds. If it is absent
60
60
  or None, the call will never time out.
61
61
 
62
62
  The return value is a tuple of three lists corresponding to the first three
@@ -223,7 +223,7 @@ else:
223
223
  """
224
224
  Like sigwaitinfo(), but with a timeout.
225
225
 
226
- The timeout is specified in seconds, with floating point numbers allowed.
226
+ The timeout is specified in seconds, with floating-point numbers allowed.
227
227
  """
228
228
  ...
229
229
  def sigwaitinfo(sigset: Iterable[int], /) -> struct_siginfo:
@@ -29,7 +29,10 @@ def DateFromTicks(ticks: float) -> Date: ...
29
29
  def TimeFromTicks(ticks: float) -> Time: ...
30
30
  def TimestampFromTicks(ticks: float) -> Timestamp: ...
31
31
 
32
- version_info: tuple[int, int, int]
32
+ if sys.version_info < (3, 14):
33
+ # Deprecated in 3.12, removed in 3.14.
34
+ version_info: tuple[int, int, int]
35
+
33
36
  sqlite_version_info: tuple[int, int, int]
34
37
  Binary = memoryview
35
38
 
@@ -90,7 +93,10 @@ SQLITE_UPDATE: Final[int]
90
93
  adapters: dict[tuple[type[Any], type[Any]], _Adapter[Any]]
91
94
  converters: dict[str, _Converter]
92
95
  sqlite_version: str
93
- version: str
96
+
97
+ if sys.version_info < (3, 14):
98
+ # Deprecated in 3.12, removed in 3.14.
99
+ version: str
94
100
 
95
101
  if sys.version_info >= (3, 11):
96
102
  SQLITE_ABORT: Final[int]
@@ -423,7 +423,7 @@ class TarInfo:
423
423
  name: str
424
424
  path: str
425
425
  size: int
426
- mtime: int
426
+ mtime: int | float
427
427
  chksum: int
428
428
  devmajor: int
429
429
  devminor: int
@@ -3,7 +3,7 @@ This module provides various functions to manipulate time values.
3
3
 
4
4
  There are two standard representations of time. One is the number
5
5
  of seconds since the Epoch, in UTC (a.k.a. GMT). It may be an integer
6
- or a floating point number (to represent fractions of seconds).
6
+ or a floating-point number (to represent fractions of seconds).
7
7
  The epoch is the point where the time starts, the return value of time.gmtime(0).
8
8
  It is January 1, 1970, 00:00:00 (UTC) on all platforms.
9
9
 
@@ -165,7 +165,7 @@ def localtime(seconds: float | None = None, /) -> struct_time:
165
165
  ...
166
166
  def mktime(time_tuple: _TimeTuple | struct_time, /) -> float:
167
167
  """
168
- mktime(tuple) -> floating point number
168
+ mktime(tuple) -> floating-point number
169
169
 
170
170
  Convert a time tuple in local time to seconds since the Epoch.
171
171
  Note that mktime(gmtime(0)) will not generally return zero for most
@@ -178,7 +178,7 @@ def sleep(seconds: float, /) -> None:
178
178
  sleep(seconds)
179
179
 
180
180
  Delay execution for a given number of seconds. The argument may be
181
- a floating point number for subsecond precision.
181
+ a floating-point number for subsecond precision.
182
182
  """
183
183
  ...
184
184
  def strftime(format: str, time_tuple: _TimeTuple | struct_time = ..., /) -> str:
@@ -241,7 +241,7 @@ def strptime(data_string: str, format: str = "%a %b %d %H:%M:%S %Y", /) -> struc
241
241
  ...
242
242
  def time() -> float:
243
243
  """
244
- time() -> floating point number
244
+ time() -> floating-point number
245
245
 
246
246
  Return the current time in seconds since the Epoch.
247
247
  Fractions of a second may be present if the system clock provides them.
@@ -303,7 +303,7 @@ def process_time() -> float:
303
303
  if sys.platform != "win32":
304
304
  def clock_getres(clk_id: int, /) -> float:
305
305
  """
306
- clock_getres(clk_id) -> floating point number
306
+ clock_getres(clk_id) -> floating-point number
307
307
 
308
308
  Return the resolution (precision) of the specified clock clk_id.
309
309
  """
@@ -2150,11 +2150,12 @@ class Listbox(Widget, XView, YView):
2150
2150
  selectborderwidth: _ScreenUnits = 0,
2151
2151
  selectforeground: str = ...,
2152
2152
  # from listbox man page: "The value of the [selectmode] option may be
2153
- # arbitrary, but the default bindings expect it to be ..."
2153
+ # arbitrary, but the default bindings expect it to be either single,
2154
+ # browse, multiple, or extended"
2154
2155
  #
2155
2156
  # I have never seen anyone setting this to something else than what
2156
2157
  # "the default bindings expect", but let's support it anyway.
2157
- selectmode: str = "browse",
2158
+ selectmode: str | Literal["single", "browse", "multiple", "extended"] = "browse", # noqa: Y051
2158
2159
  setgrid: bool = False,
2159
2160
  state: Literal["normal", "disabled"] = "normal",
2160
2161
  takefocus: _TakeFocusValue = "",
@@ -2189,7 +2190,7 @@ class Listbox(Widget, XView, YView):
2189
2190
  selectbackground: str = ...,
2190
2191
  selectborderwidth: _ScreenUnits = ...,
2191
2192
  selectforeground: str = ...,
2192
- selectmode: str = ...,
2193
+ selectmode: str | Literal["single", "browse", "multiple", "extended"] = ..., # noqa: Y051
2193
2194
  setgrid: bool = ...,
2194
2195
  state: Literal["normal", "disabled"] = ...,
2195
2196
  takefocus: _TakeFocusValue = ...,
@@ -2909,6 +2910,9 @@ class Scrollbar(Widget):
2909
2910
  def set(self, first: float | str, last: float | str) -> None: ...
2910
2911
 
2911
2912
  _TextIndex: TypeAlias = _tkinter.Tcl_Obj | str | float | Misc
2913
+ _WhatToCount: TypeAlias = Literal[
2914
+ "chars", "displaychars", "displayindices", "displaylines", "indices", "lines", "xpixels", "ypixels"
2915
+ ]
2912
2916
 
2913
2917
  class Text(Widget, XView, YView):
2914
2918
  def __init__(
@@ -3023,7 +3027,27 @@ class Text(Widget, XView, YView):
3023
3027
  config = configure
3024
3028
  def bbox(self, index: _TextIndex) -> tuple[int, int, int, int] | None: ... # type: ignore[override]
3025
3029
  def compare(self, index1: _TextIndex, op: Literal["<", "<=", "==", ">=", ">", "!="], index2: _TextIndex) -> bool: ...
3026
- def count(self, index1, index2, *args): ... # TODO
3030
+ @overload
3031
+ def count(self, index1: _TextIndex, index2: _TextIndex) -> tuple[int] | None: ...
3032
+ @overload
3033
+ def count(self, index1: _TextIndex, index2: _TextIndex, arg: _WhatToCount | Literal["update"], /) -> tuple[int] | None: ...
3034
+ @overload
3035
+ def count(self, index1: _TextIndex, index2: _TextIndex, arg1: Literal["update"], arg2: _WhatToCount, /) -> int | None: ...
3036
+ @overload
3037
+ def count(self, index1: _TextIndex, index2: _TextIndex, arg1: _WhatToCount, arg2: Literal["update"], /) -> int | None: ...
3038
+ @overload
3039
+ def count(self, index1: _TextIndex, index2: _TextIndex, arg1: _WhatToCount, arg2: _WhatToCount, /) -> tuple[int, int]: ...
3040
+ @overload
3041
+ def count(
3042
+ self,
3043
+ index1: _TextIndex,
3044
+ index2: _TextIndex,
3045
+ arg1: _WhatToCount | Literal["update"],
3046
+ arg2: _WhatToCount | Literal["update"],
3047
+ arg3: _WhatToCount | Literal["update"],
3048
+ /,
3049
+ *args: _WhatToCount | Literal["update"],
3050
+ ) -> tuple[int, ...]: ...
3027
3051
  @overload
3028
3052
  def debug(self, boolean: None = None) -> bool: ...
3029
3053
  @overload
@@ -1,12 +1,12 @@
1
1
  from typing import Final
2
2
 
3
3
  # These are not actually bools. See #4669
4
- NO: bool
5
- YES: bool
6
- TRUE: bool
7
- FALSE: bool
8
- ON: bool
9
- OFF: bool
4
+ NO: Final[bool]
5
+ YES: Final[bool]
6
+ TRUE: Final[bool]
7
+ FALSE: Final[bool]
8
+ ON: Final[bool]
9
+ OFF: Final[bool]
10
10
  N: Final = "n"
11
11
  S: Final = "s"
12
12
  W: Final = "w"
@@ -2,12 +2,12 @@ import sys
2
2
  from _typeshed import Incomplete
3
3
  from collections.abc import Mapping
4
4
  from tkinter import Widget
5
- from typing import Any
5
+ from typing import Any, Final
6
6
 
7
7
  if sys.version_info >= (3, 9):
8
8
  __all__ = ["Dialog"]
9
9
 
10
- DIALOG_ICON: str
10
+ DIALOG_ICON: Final = "questhead"
11
11
 
12
12
  class Dialog(Widget):
13
13
  widgetName: str
@@ -1,6 +1,6 @@
1
1
  import sys
2
2
  from tkinter.commondialog import Dialog
3
- from typing import ClassVar
3
+ from typing import ClassVar, Final
4
4
 
5
5
  if sys.version_info >= (3, 9):
6
6
  __all__ = [
@@ -14,22 +14,22 @@ if sys.version_info >= (3, 9):
14
14
  "askretrycancel",
15
15
  ]
16
16
 
17
- ERROR: str
18
- INFO: str
19
- QUESTION: str
20
- WARNING: str
21
- ABORTRETRYIGNORE: str
22
- OK: str
23
- OKCANCEL: str
24
- RETRYCANCEL: str
25
- YESNO: str
26
- YESNOCANCEL: str
27
- ABORT: str
28
- RETRY: str
29
- IGNORE: str
30
- CANCEL: str
31
- YES: str
32
- NO: str
17
+ ERROR: Final = "error"
18
+ INFO: Final = "info"
19
+ QUESTION: Final = "question"
20
+ WARNING: Final = "warning"
21
+ ABORTRETRYIGNORE: Final = "abortretryignore"
22
+ OK: Final = "ok"
23
+ OKCANCEL: Final = "okcancel"
24
+ RETRYCANCEL: Final = "retrycancel"
25
+ YESNO: Final = "yesno"
26
+ YESNOCANCEL: Final = "yesnocancel"
27
+ ABORT: Final = "abort"
28
+ RETRY: Final = "retry"
29
+ IGNORE: Final = "ignore"
30
+ CANCEL: Final = "cancel"
31
+ YES: Final = "yes"
32
+ NO: Final = "no"
33
33
 
34
34
  class Message(Dialog):
35
35
  command: ClassVar[str]
@@ -556,7 +556,9 @@ class Notebook(Widget):
556
556
  sticky: str = ..., # consists of letters 'n', 's', 'w', 'e', no repeats, may be empty
557
557
  padding: _Padding = ...,
558
558
  text: str = ...,
559
- image=..., # Sequence of an image name, followed by zero or more (sequences of one or more state names followed by an image name)
559
+ # `image` is a sequence of an image name, followed by zero or more
560
+ # (sequences of one or more state names followed by an image name)
561
+ image=...,
560
562
  compound: tkinter._Compound = ...,
561
563
  underline: int = ...,
562
564
  ) -> None: ...
@@ -905,7 +905,8 @@ class TextIO(IO[str]):
905
905
  @abstractmethod
906
906
  def __enter__(self) -> TextIO: ...
907
907
 
908
- ByteString: typing_extensions.TypeAlias = bytes | bytearray | memoryview
908
+ if sys.version_info < (3, 14):
909
+ ByteString: typing_extensions.TypeAlias = bytes | bytearray | memoryview
909
910
 
910
911
  # Functions
911
912
 
@@ -79,6 +79,7 @@ else:
79
79
  def pathname2url(pathname: str) -> str: ...
80
80
 
81
81
  def getproxies() -> dict[str, str]: ...
82
+ def getproxies_environment() -> dict[str, str]: ...
82
83
  def parse_http_list(s: str) -> list[str]: ...
83
84
  def parse_keqv_list(l: list[str]) -> dict[str, str]: ...
84
85
 
@@ -94,6 +94,20 @@ class ZipExtFile(io.BufferedIOBase):
94
94
  class _Writer(Protocol):
95
95
  def write(self, s: str, /) -> object: ...
96
96
 
97
+ class _ZipReadable(Protocol):
98
+ def seek(self, offset: int, whence: int = 0, /) -> int: ...
99
+ def read(self, n: int = -1, /) -> bytes: ...
100
+
101
+ class _ZipTellable(Protocol):
102
+ def tell(self) -> int: ...
103
+
104
+ class _ZipReadableTellable(_ZipReadable, _ZipTellable, Protocol): ...
105
+
106
+ class _ZipWritable(Protocol):
107
+ def flush(self) -> None: ...
108
+ def close(self) -> None: ...
109
+ def write(self, b: bytes, /) -> int: ...
110
+
97
111
  class ZipFile:
98
112
  filename: str | None
99
113
  debug: int
@@ -106,24 +120,50 @@ class ZipFile:
106
120
  compresslevel: int | None # undocumented
107
121
  mode: _ZipFileMode # undocumented
108
122
  pwd: bytes | None # undocumented
123
+ # metadata_encoding is new in 3.11
109
124
  if sys.version_info >= (3, 11):
110
125
  @overload
111
126
  def __init__(
112
127
  self,
113
128
  file: StrPath | IO[bytes],
129
+ mode: _ZipFileMode = "r",
130
+ compression: int = 0,
131
+ allowZip64: bool = True,
132
+ compresslevel: int | None = None,
133
+ *,
134
+ strict_timestamps: bool = True,
135
+ metadata_encoding: str | None = None,
136
+ ) -> None: ...
137
+ # metadata_encoding is only allowed for read mode
138
+ @overload
139
+ def __init__(
140
+ self,
141
+ file: StrPath | _ZipReadable,
114
142
  mode: Literal["r"] = "r",
115
143
  compression: int = 0,
116
144
  allowZip64: bool = True,
117
145
  compresslevel: int | None = None,
118
146
  *,
119
147
  strict_timestamps: bool = True,
120
- metadata_encoding: str | None,
148
+ metadata_encoding: str | None = None,
121
149
  ) -> None: ...
122
150
  @overload
123
151
  def __init__(
124
152
  self,
125
- file: StrPath | IO[bytes],
126
- mode: _ZipFileMode = "r",
153
+ file: StrPath | _ZipWritable,
154
+ mode: Literal["w", "x"] = ...,
155
+ compression: int = 0,
156
+ allowZip64: bool = True,
157
+ compresslevel: int | None = None,
158
+ *,
159
+ strict_timestamps: bool = True,
160
+ metadata_encoding: None = None,
161
+ ) -> None: ...
162
+ @overload
163
+ def __init__(
164
+ self,
165
+ file: StrPath | _ZipReadableTellable,
166
+ mode: Literal["a"] = ...,
127
167
  compression: int = 0,
128
168
  allowZip64: bool = True,
129
169
  compresslevel: int | None = None,
@@ -132,6 +172,7 @@ class ZipFile:
132
172
  metadata_encoding: None = None,
133
173
  ) -> None: ...
134
174
  else:
175
+ @overload
135
176
  def __init__(
136
177
  self,
137
178
  file: StrPath | IO[bytes],
@@ -142,6 +183,39 @@ class ZipFile:
142
183
  *,
143
184
  strict_timestamps: bool = True,
144
185
  ) -> None: ...
186
+ @overload
187
+ def __init__(
188
+ self,
189
+ file: StrPath | _ZipReadable,
190
+ mode: Literal["r"] = "r",
191
+ compression: int = 0,
192
+ allowZip64: bool = True,
193
+ compresslevel: int | None = None,
194
+ *,
195
+ strict_timestamps: bool = True,
196
+ ) -> None: ...
197
+ @overload
198
+ def __init__(
199
+ self,
200
+ file: StrPath | _ZipWritable,
201
+ mode: Literal["w", "x"] = ...,
202
+ compression: int = 0,
203
+ allowZip64: bool = True,
204
+ compresslevel: int | None = None,
205
+ *,
206
+ strict_timestamps: bool = True,
207
+ ) -> None: ...
208
+ @overload
209
+ def __init__(
210
+ self,
211
+ file: StrPath | _ZipReadableTellable,
212
+ mode: Literal["a"] = ...,
213
+ compression: int = 0,
214
+ allowZip64: bool = True,
215
+ compresslevel: int | None = None,
216
+ *,
217
+ strict_timestamps: bool = True,
218
+ ) -> None: ...
145
219
 
146
220
  def __enter__(self) -> Self: ...
147
221
  def __exit__(
@@ -230,6 +304,7 @@ else:
230
304
 
231
305
  class Path:
232
306
  root: CompleteDirs
307
+ at: str
233
308
  def __init__(self, root: ZipFile | StrPath | IO[bytes], at: str = "") -> None: ...
234
309
  @property
235
310
  def name(self) -> str: ...
@@ -31,6 +31,7 @@ if sys.version_info >= (3, 12):
31
31
 
32
32
  class Path:
33
33
  root: CompleteDirs
34
+ at: str
34
35
  def __init__(self, root: ZipFile | StrPath | IO[bytes], at: str = "") -> None: ...
35
36
  @property
36
37
  def name(self) -> str: ...
@@ -1,7 +1,9 @@
1
1
  version = "0.5.*"
2
2
  upstream_repository = "https://github.com/spatialaudio/jackclient-python"
3
3
  # Requires a version of numpy with a `py.typed` file
4
- requires = ["numpy>=1.20", "types-cffi"]
4
+ # see https://github.com/python/typeshed/issues/12551
5
+ # on why we need the upper bound for numpy
6
+ requires = ["numpy>=1.20,<2.1.0", "types-cffi"]
5
7
 
6
8
  [tool.stubtest]
7
9
  # darwin and win32 are equivalent
@@ -1,2 +1,2 @@
1
- version = "5.4.*"
1
+ version = "5.5.*"
2
2
  upstream_repository = "https://github.com/tkem/cachetools"
@@ -85,7 +85,7 @@ class TTLCache(_TimedCache[_KT, _VT]):
85
85
  ) -> None: ...
86
86
  @property
87
87
  def ttl(self) -> float: ...
88
- def expire(self, time: float | None = None) -> None: ...
88
+ def expire(self, time: float | None = None) -> list[tuple[_KT, _VT]]: ...
89
89
 
90
90
  class TLRUCache(_TimedCache[_KT, _VT]):
91
91
  def __init__(
@@ -97,7 +97,7 @@ class TLRUCache(_TimedCache[_KT, _VT]):
97
97
  ) -> None: ...
98
98
  @property
99
99
  def ttu(self) -> Callable[[_KT, _VT, float], float]: ...
100
- def expire(self, time: float | None = None) -> None: ...
100
+ def expire(self, time: float | None = None) -> list[tuple[_KT, _VT]]: ...
101
101
 
102
102
  def cached(
103
103
  cache: MutableMapping[_KT, Any] | None,
@@ -0,0 +1,2 @@
1
+ version = "0.10.*"
2
+ upstream_repository = "https://github.com/natasha/corus"
@@ -0,0 +1 @@
1
+ from .sources import *
@@ -0,0 +1,21 @@
1
+ from _typeshed import Incomplete
2
+ from collections.abc import Generator
3
+
4
+ def match_names(records, pattern) -> Generator[Incomplete]: ...
5
+ def rstrip(text): ...
6
+ def load_text(path): ...
7
+ def dump_text(text, path) -> None: ...
8
+ def load_lines(path, encoding: str = "utf-8") -> Generator[Incomplete]: ...
9
+ def parse_xml(text): ...
10
+ def load_z_lines(path, open, encoding: str = "utf8") -> Generator[Incomplete]: ...
11
+ def load_gz_lines(path): ...
12
+ def load_bz2_lines(path): ...
13
+ def load_xz_lines(path): ...
14
+ def list_zip(path): ...
15
+ def load_zip_lines(path, name, encoding: str = "utf8") -> Generator[Incomplete]: ...
16
+ def load_zip_texts(path, names, encoding: str = "utf8") -> Generator[Incomplete]: ...
17
+ def parse_csv(lines, delimiter: str = ",", max_field: Incomplete | None = None): ...
18
+ def parse_tsv(lines): ...
19
+ def skip_header(rows): ...
20
+ def dict_csv(rows) -> Generator[Incomplete]: ...
21
+ def parse_jsonl(lines) -> Generator[Incomplete]: ...
@@ -0,0 +1,17 @@
1
+ from _typeshed import Incomplete
2
+ from collections.abc import Generator
3
+
4
+ COMMANDS: Incomplete
5
+ KB: int
6
+ MB: Incomplete
7
+ GB: Incomplete
8
+ LABELS: Incomplete
9
+
10
+ def is_command(step, commands=("wget", "unzip", "unrar", "rm", "mv", "tar")): ...
11
+ def format_bytes(value): ...
12
+ def format_count(value): ...
13
+ def unfold_metas(items) -> Generator[Incomplete]: ...
14
+ def format_metas_(metas, nbviewer: Incomplete | None = None) -> Generator[Incomplete]: ...
15
+ def format_metas(metas, url: Incomplete | None = None): ...
16
+ def show_html(html) -> None: ...
17
+ def patch_readme(html, path) -> None: ...
@@ -0,0 +1,8 @@
1
+ from _typeshed import Incomplete
2
+
3
+ class Record:
4
+ __attributes__: Incomplete
5
+ def __eq__(self, other): ...
6
+ def __ne__(self, other): ...
7
+ def __iter__(self): ...
8
+ def __hash__(self): ...
@@ -0,0 +1,23 @@
1
+ from .bsnlp import load_bsnlp as load_bsnlp
2
+ from .buriy import *
3
+ from .corpora import load_corpora as load_corpora
4
+ from .factru import load_factru as load_factru
5
+ from .gareev import load_gareev as load_gareev
6
+ from .gramru import load_gramru as load_gramru
7
+ from .lenta import load_lenta as load_lenta, load_lenta2 as load_lenta2
8
+ from .librusec import load_librusec as load_librusec
9
+ from .mokoron import *
10
+ from .morphoru import *
11
+ from .ne5 import load_ne5 as load_ne5
12
+ from .ods import *
13
+ from .omnia import load_omnia as load_omnia
14
+ from .persons import load_persons as load_persons
15
+ from .ria import *
16
+ from .rudrec import load_rudrec as load_rudrec
17
+ from .russe import *
18
+ from .simlex import load_simlex as load_simlex
19
+ from .taiga import *
20
+ from .toloka import load_ruadrect as load_ruadrect, load_toloka_lrwc as load_toloka_lrwc
21
+ from .ud import *
22
+ from .wiki import load_wiki as load_wiki
23
+ from .wikiner import load_wikiner as load_wikiner