basedpyright 1.28.3 → 1.28.4

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 (375) 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/_hashlib.pyi +15 -2
  7. package/dist/typeshed-fallback/stdlib/_socket.pyi +2 -2
  8. package/dist/typeshed-fallback/stdlib/_typeshed/__init__.pyi +7 -4
  9. package/dist/typeshed-fallback/stdlib/asyncio/__init__.pyi +2 -178
  10. package/dist/typeshed-fallback/stdlib/asyncio/base_events.pyi +3 -2
  11. package/dist/typeshed-fallback/stdlib/asyncio/events.pyi +3 -2
  12. package/dist/typeshed-fallback/stdlib/builtins.pyi +51 -33
  13. package/dist/typeshed-fallback/stdlib/configparser.pyi +61 -42
  14. package/dist/typeshed-fallback/stdlib/contextlib.pyi +5 -5
  15. package/dist/typeshed-fallback/stdlib/distutils/cmd.pyi +1 -1
  16. package/dist/typeshed-fallback/stdlib/distutils/dist.pyi +3 -3
  17. package/dist/typeshed-fallback/stdlib/distutils/fancy_getopt.pyi +15 -5
  18. package/dist/typeshed-fallback/stdlib/functools.pyi +18 -13
  19. package/dist/typeshed-fallback/stdlib/getopt.pyi +15 -3
  20. package/dist/typeshed-fallback/stdlib/hashlib.pyi +2 -1
  21. package/dist/typeshed-fallback/stdlib/heapq.pyi +2 -2
  22. package/dist/typeshed-fallback/stdlib/hmac.pyi +2 -2
  23. package/dist/typeshed-fallback/stdlib/http/server.pyi +2 -1
  24. package/dist/typeshed-fallback/stdlib/importlib/metadata/__init__.pyi +1 -1
  25. package/dist/typeshed-fallback/stdlib/importlib/readers.pyi +11 -7
  26. package/dist/typeshed-fallback/stdlib/inspect.pyi +10 -10
  27. package/dist/typeshed-fallback/stdlib/logging/config.pyi +6 -1
  28. package/dist/typeshed-fallback/stdlib/math.pyi +33 -3
  29. package/dist/typeshed-fallback/stdlib/multiprocessing/connection.pyi +9 -9
  30. package/dist/typeshed-fallback/stdlib/pathlib.pyi +13 -9
  31. package/dist/typeshed-fallback/stdlib/pkgutil.pyi +6 -6
  32. package/dist/typeshed-fallback/stdlib/shutil.pyi +9 -5
  33. package/dist/typeshed-fallback/stdlib/socketserver.pyi +8 -8
  34. package/dist/typeshed-fallback/stdlib/statistics.pyi +14 -15
  35. package/dist/typeshed-fallback/stdlib/tarfile.pyi +181 -162
  36. package/dist/typeshed-fallback/stdlib/types.pyi +27 -4
  37. package/dist/typeshed-fallback/stdlib/typing.pyi +10 -7
  38. package/dist/typeshed-fallback/stdlib/typing_extensions.pyi +95 -48
  39. package/dist/typeshed-fallback/stdlib/unittest/case.pyi +5 -1
  40. package/dist/typeshed-fallback/stdlib/xml/dom/NodeFilter.pyi +7 -4
  41. package/dist/typeshed-fallback/stdlib/xml/dom/__init__.pyi +84 -53
  42. package/dist/typeshed-fallback/stdlib/xml/dom/expatbuilder.pyi +66 -45
  43. package/dist/typeshed-fallback/stdlib/xml/dom/minidom.pyi +524 -193
  44. package/dist/typeshed-fallback/stdlib/xml/dom/pulldom.pyi +70 -55
  45. package/dist/typeshed-fallback/stdlib/xml/dom/xmlbuilder.pyi +20 -49
  46. package/dist/typeshed-fallback/stdlib/xml/etree/ElementInclude.pyi +13 -10
  47. package/dist/typeshed-fallback/stdlib/xml/etree/ElementPath.pyi +19 -12
  48. package/dist/typeshed-fallback/stdlib/xml/etree/ElementTree.pyi +83 -41
  49. package/dist/typeshed-fallback/stdlib/xml/sax/_exceptions.pyi +5 -5
  50. package/dist/typeshed-fallback/stdlib/xml/sax/expatreader.pyi +53 -24
  51. package/dist/typeshed-fallback/stdlib/xml/sax/handler.pyi +48 -17
  52. package/dist/typeshed-fallback/stdlib/xml/sax/saxutils.pyi +24 -16
  53. package/dist/typeshed-fallback/stdlib/xml/sax/xmlreader.pyi +59 -56
  54. package/dist/typeshed-fallback/stdlib/zipfile/__init__.pyi +0 -8
  55. package/dist/typeshed-fallback/stdlib/zipfile/_path/__init__.pyi +32 -52
  56. package/dist/typeshed-fallback/stubs/Deprecated/deprecated/classic.pyi +6 -1
  57. package/dist/typeshed-fallback/stubs/Deprecated/deprecated/sphinx.pyi +1 -0
  58. package/dist/typeshed-fallback/stubs/Pygments/METADATA.toml +1 -1
  59. package/dist/typeshed-fallback/stubs/Pygments/pygments/plugin.pyi +11 -3
  60. package/dist/typeshed-fallback/stubs/RPi.GPIO/RPi/GPIO/__init__.pyi +1 -1
  61. package/dist/typeshed-fallback/stubs/WTForms/wtforms/validators.pyi +13 -5
  62. package/dist/typeshed-fallback/stubs/WebOb/webob/__init__.pyi +15 -0
  63. package/dist/typeshed-fallback/stubs/WebOb/webob/_types.pyi +21 -0
  64. package/dist/typeshed-fallback/stubs/WebOb/webob/acceptparse.pyi +496 -285
  65. package/dist/typeshed-fallback/stubs/WebOb/webob/byterange.pyi +2 -0
  66. package/dist/typeshed-fallback/stubs/WebOb/webob/cachecontrol.pyi +75 -75
  67. package/dist/typeshed-fallback/stubs/WebOb/webob/client.pyi +2 -0
  68. package/dist/typeshed-fallback/stubs/WebOb/webob/compat.pyi +24 -0
  69. package/dist/typeshed-fallback/stubs/WebOb/webob/cookies.pyi +39 -34
  70. package/dist/typeshed-fallback/stubs/WebOb/webob/datetime_utils.pyi +16 -0
  71. package/dist/typeshed-fallback/stubs/WebOb/webob/dec.pyi +40 -40
  72. package/dist/typeshed-fallback/stubs/WebOb/webob/descriptors.pyi +23 -34
  73. package/dist/typeshed-fallback/stubs/WebOb/webob/etag.pyi +11 -18
  74. package/dist/typeshed-fallback/stubs/WebOb/webob/exc.pyi +70 -7
  75. package/dist/typeshed-fallback/stubs/WebOb/webob/headers.pyi +20 -2
  76. package/dist/typeshed-fallback/stubs/WebOb/webob/multidict.pyi +97 -31
  77. package/dist/typeshed-fallback/stubs/WebOb/webob/request.pyi +70 -79
  78. package/dist/typeshed-fallback/stubs/WebOb/webob/response.pyi +62 -62
  79. package/dist/typeshed-fallback/stubs/WebOb/webob/static.pyi +12 -9
  80. package/dist/typeshed-fallback/stubs/WebOb/webob/util.pyi +2 -5
  81. package/dist/typeshed-fallback/stubs/atheris/METADATA.toml +4 -0
  82. package/dist/typeshed-fallback/stubs/boltons/boltons/dictutils.pyi +1 -3
  83. package/dist/typeshed-fallback/stubs/boltons/boltons/tbutils.pyi +13 -13
  84. package/dist/typeshed-fallback/stubs/braintree/METADATA.toml +1 -1
  85. package/dist/typeshed-fallback/stubs/braintree/braintree/__init__.pyi +1 -0
  86. package/dist/typeshed-fallback/stubs/braintree/braintree/braintree_gateway.pyi +2 -0
  87. package/dist/typeshed-fallback/stubs/braintree/braintree/credit_card.pyi +1 -0
  88. package/dist/typeshed-fallback/stubs/braintree/braintree/error_codes.pyi +40 -0
  89. package/dist/typeshed-fallback/stubs/braintree/braintree/paypal_payment_resource.pyi +10 -0
  90. package/dist/typeshed-fallback/stubs/braintree/braintree/paypal_payment_resource_gateway.pyi +10 -0
  91. package/dist/typeshed-fallback/stubs/braintree/braintree/test/credit_card_numbers.pyi +1 -0
  92. package/dist/typeshed-fallback/stubs/braintree/braintree/test/nonces.pyi +1 -0
  93. package/dist/typeshed-fallback/stubs/cffi/METADATA.toml +2 -2
  94. package/dist/typeshed-fallback/stubs/cffi/_cffi_backend.pyi +8 -8
  95. package/dist/typeshed-fallback/stubs/cffi/cffi/recompiler.pyi +1 -0
  96. package/dist/typeshed-fallback/stubs/corus/METADATA.toml +4 -0
  97. package/dist/typeshed-fallback/stubs/dirhash/METADATA.toml +2 -0
  98. package/dist/typeshed-fallback/stubs/dirhash/dirhash/__init__.pyi +93 -0
  99. package/dist/typeshed-fallback/stubs/dirhash/dirhash/cli.pyi +5 -0
  100. package/dist/typeshed-fallback/stubs/fanstatic/METADATA.toml +1 -1
  101. package/dist/typeshed-fallback/stubs/fanstatic/fanstatic/registry.pyi +8 -3
  102. package/dist/typeshed-fallback/stubs/fpdf2/fpdf/fonts.pyi +2 -8
  103. package/dist/typeshed-fallback/stubs/geopandas/geopandas/geodataframe.pyi +1 -1
  104. package/dist/typeshed-fallback/stubs/geopandas/geopandas/io/sql.pyi +0 -3
  105. package/dist/typeshed-fallback/stubs/gevent/gevent/hub.pyi +1 -1
  106. package/dist/typeshed-fallback/stubs/gevent/gevent/libev/corecext.pyi +1 -1
  107. package/dist/typeshed-fallback/stubs/gevent/gevent/libev/corecffi.pyi +1 -1
  108. package/dist/typeshed-fallback/stubs/gevent/gevent/libuv/loop.pyi +1 -1
  109. package/dist/typeshed-fallback/stubs/google-cloud-ndb/METADATA.toml +0 -1
  110. package/dist/typeshed-fallback/stubs/greenlet/greenlet/_greenlet.pyi +5 -1
  111. package/dist/typeshed-fallback/stubs/hdbcli/hdbcli/dbapi.pyi +1 -1
  112. package/dist/typeshed-fallback/stubs/hnswlib/METADATA.toml +1 -1
  113. package/dist/typeshed-fallback/stubs/hnswlib/hnswlib.pyi +8 -6
  114. package/dist/typeshed-fallback/stubs/humanfriendly/METADATA.toml +3 -0
  115. package/dist/typeshed-fallback/stubs/ibm-db/METADATA.toml +1 -1
  116. package/dist/typeshed-fallback/stubs/icalendar/icalendar/__init__.pyi +6 -6
  117. package/dist/typeshed-fallback/stubs/mock/METADATA.toml +1 -1
  118. package/dist/typeshed-fallback/stubs/mock/mock/backports.pyi +6 -1
  119. package/dist/typeshed-fallback/stubs/mock/mock/mock.pyi +1 -1
  120. package/dist/typeshed-fallback/stubs/mysqlclient/MySQLdb/_mysql.pyi +32 -32
  121. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/__init__.pyi +3 -0
  122. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/clique.pyi +5 -4
  123. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/clustering_coefficient.pyi +3 -3
  124. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/connectivity.pyi +5 -3
  125. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/distance_measures.pyi +3 -3
  126. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/dominating_set.pyi +3 -4
  127. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/kcomponents.pyi +2 -1
  128. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/matching.pyi +2 -1
  129. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/maxcut.pyi +8 -2
  130. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/ramsey.pyi +2 -1
  131. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/steinertree.pyi +4 -2
  132. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/traveling_salesman.pyi +33 -23
  133. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/treewidth.pyi +4 -2
  134. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/approximation/vertex_cover.pyi +2 -3
  135. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/assortativity/connectivity.pyi +3 -1
  136. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/assortativity/correlation.pyi +6 -4
  137. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/assortativity/mixing.pyi +16 -8
  138. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/assortativity/neighbor_degree.pyi +7 -1
  139. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/assortativity/pairs.pyi +6 -3
  140. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/asteroidal.pyi +3 -2
  141. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/__init__.pyi +1 -0
  142. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/basic.pyi +8 -6
  143. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/centrality.pyi +4 -3
  144. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/cluster.pyi +5 -3
  145. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/covering.pyi +3 -1
  146. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/edgelist.pyi +13 -12
  147. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/extendability.pyi +5 -0
  148. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/generators.pyi +22 -8
  149. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/matching.pyi +11 -5
  150. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/matrix.pyi +9 -7
  151. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/projection.pyi +9 -5
  152. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/redundancy.pyi +3 -1
  153. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/spectral.pyi +2 -3
  154. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/boundary.pyi +53 -58
  155. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/bridges.pyi +5 -6
  156. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/betweenness.pyi +7 -5
  157. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/betweenness_subset.pyi +10 -2
  158. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/closeness.pyi +7 -7
  159. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/current_flow_betweenness.pyi +9 -9
  160. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/current_flow_betweenness_subset.pyi +16 -3
  161. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/current_flow_closeness.pyi +2 -3
  162. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/eigenvector.pyi +10 -3
  163. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/flow_matrix.pyi +4 -0
  164. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/group.pyi +16 -12
  165. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/harmonic.pyi +3 -1
  166. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/katz.pyi +15 -10
  167. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/laplacian.pyi +6 -4
  168. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/load.pyi +3 -4
  169. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/percolation.pyi +6 -2
  170. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/reaching.pyi +9 -3
  171. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/second_order.pyi +2 -1
  172. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/subgraph_alg.pyi +5 -4
  173. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/trophic.pyi +5 -3
  174. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/voterank_alg.pyi +2 -3
  175. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/chordal.pyi +3 -3
  176. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/clique.pyi +9 -14
  177. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/cluster.pyi +10 -7
  178. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/coloring/equitable_coloring.pyi +2 -1
  179. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/coloring/greedy_coloring.pyi +2 -20
  180. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/communicability_alg.pyi +3 -2
  181. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/community/asyn_fluid.pyi +3 -3
  182. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/community/centrality.pyi +5 -2
  183. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/community/community_utils.pyi +2 -1
  184. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/community/divisive.pyi +5 -2
  185. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/community/kclique.pyi +2 -1
  186. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/community/kernighan_lin.pyi +7 -1
  187. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/community/label_propagation.pyi +4 -2
  188. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/community/louvain.pyi +13 -2
  189. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/community/lukes.pyi +2 -3
  190. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/community/modularity_max.pyi +3 -4
  191. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/community/quality.pyi +3 -2
  192. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/components/biconnected.pyi +5 -4
  193. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/components/connected.pyi +5 -4
  194. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/components/semiconnected.pyi +2 -3
  195. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/components/strongly_connected.pyi +5 -5
  196. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/components/weakly_connected.pyi +3 -3
  197. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/connectivity.pyi +29 -23
  198. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/cuts.pyi +21 -5
  199. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/disjoint_paths.pyi +17 -16
  200. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/edge_augmentation.pyi +5 -4
  201. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/edge_kcomponents.pyi +7 -5
  202. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/kcomponents.pyi +3 -2
  203. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/kcutsets.pyi +5 -3
  204. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/stoerwagner.pyi +2 -1
  205. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/core.pyi +9 -8
  206. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/covering.pyi +4 -2
  207. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/cuts.pyi +10 -9
  208. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/cycles.pyi +9 -6
  209. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/d_separation.pyi +3 -1
  210. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/dag.pyi +13 -10
  211. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/distance_measures.pyi +8 -9
  212. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/distance_regular.pyi +4 -3
  213. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/dominance.pyi +3 -2
  214. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/dominating.pyi +4 -2
  215. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/efficiency_measures.pyi +2 -1
  216. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/euler.pyi +8 -5
  217. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/boykovkolmogorov.pyi +6 -7
  218. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/capacityscaling.pyi +4 -1
  219. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/dinitz_alg.pyi +6 -7
  220. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/edmondskarp.pyi +6 -7
  221. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/gomory_hu.pyi +3 -2
  222. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/maxflow.pyi +34 -5
  223. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/mincost.pyi +7 -4
  224. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/networksimplex.pyi +3 -1
  225. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/preflowpush.pyi +5 -6
  226. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/shortestaugmentingpath.pyi +6 -7
  227. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/utils.pyi +1 -0
  228. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/graph_hashing.pyi +12 -4
  229. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/graphical.pyi +9 -6
  230. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/hierarchy.pyi +1 -3
  231. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/hybrid.pyi +3 -2
  232. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/isolate.pyi +4 -3
  233. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/isomorphism/ismags.pyi +1 -0
  234. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/isomorphism/isomorph.pyi +11 -4
  235. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/isomorphism/isomorphvf2.pyi +5 -0
  236. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/isomorphism/temporalisomorphvf2.pyi +2 -0
  237. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/isomorphism/tree_isomorphism.pyi +2 -1
  238. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/isomorphism/vf2pp.pyi +6 -3
  239. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/isomorphism/vf2userfunc.pyi +2 -0
  240. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/link_analysis/hits_alg.pyi +9 -2
  241. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/link_analysis/pagerank_alg.pyi +16 -14
  242. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/link_prediction.pyi +9 -10
  243. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/lowest_common_ancestors.pyi +5 -3
  244. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/matching.pyi +7 -6
  245. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/minors/contraction.pyi +10 -7
  246. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/mis.pyi +6 -1
  247. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/moral.pyi +2 -1
  248. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/node_classification.pyi +3 -2
  249. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/non_randomness.pyi +2 -3
  250. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/operators/all.pyi +7 -4
  251. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/operators/binary.pyi +11 -11
  252. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/operators/product.pyi +14 -7
  253. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/operators/unary.pyi +2 -2
  254. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/planarity.pyi +6 -3
  255. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/polynomials.pyi +3 -2
  256. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/reciprocity.pyi +4 -3
  257. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/regular.pyi +4 -3
  258. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/richclub.pyi +3 -3
  259. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/shortest_paths/astar.pyi +22 -3
  260. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/shortest_paths/dense.pyi +7 -5
  261. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/shortest_paths/generic.pyi +33 -11
  262. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/shortest_paths/unweighted.pyi +9 -8
  263. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/shortest_paths/weighted.pyi +116 -30
  264. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/similarity.pyi +69 -55
  265. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/simple_paths.pyi +11 -8
  266. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/smallworld.pyi +6 -6
  267. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/smetric.pyi +2 -1
  268. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/sparsifiers.pyi +3 -3
  269. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/structuralholes.pyi +5 -3
  270. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/summarization.pyi +5 -3
  271. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/swap.pyi +8 -5
  272. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/threshold.pyi +3 -4
  273. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/time_dependent.pyi +5 -0
  274. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/tournament.pyi +8 -8
  275. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/traversal/beamsearch.pyi +5 -2
  276. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/traversal/breadth_first_search.pyi +16 -7
  277. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/traversal/depth_first_search.pyi +20 -8
  278. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/traversal/edgebfs.pyi +2 -3
  279. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/traversal/edgedfs.pyi +2 -3
  280. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/branchings.pyi +13 -6
  281. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/coding.pyi +8 -4
  282. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/mst.pyi +22 -6
  283. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/operations.pyi +2 -1
  284. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/recognition.pyi +6 -4
  285. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/triads.pyi +11 -8
  286. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/vitality.pyi +2 -1
  287. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/voronoi.pyi +10 -1
  288. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/walks.pyi +5 -0
  289. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/wiener.pyi +2 -3
  290. package/dist/typeshed-fallback/stubs/networkx/networkx/classes/coreviews.pyi +3 -1
  291. package/dist/typeshed-fallback/stubs/networkx/networkx/classes/graph.pyi +4 -3
  292. package/dist/typeshed-fallback/stubs/networkx/networkx/classes/multidigraph.pyi +2 -0
  293. package/dist/typeshed-fallback/stubs/networkx/networkx/classes/multigraph.pyi +3 -0
  294. package/dist/typeshed-fallback/stubs/networkx/networkx/classes/reportviews.pyi +39 -9
  295. package/dist/typeshed-fallback/stubs/networkx/networkx/generators/__init__.pyi +2 -0
  296. package/dist/typeshed-fallback/stubs/networkx/networkx/generators/time_series.pyi +4 -0
  297. package/dist/typeshed-fallback/stubs/passlib/passlib/hosts.pyi +3 -1
  298. package/dist/typeshed-fallback/stubs/peewee/peewee.pyi +19 -19
  299. package/dist/typeshed-fallback/stubs/protobuf/google/protobuf/descriptor.pyi +6 -0
  300. package/dist/typeshed-fallback/stubs/psycopg2/psycopg2/_psycopg.pyi +1 -1
  301. package/dist/typeshed-fallback/stubs/pycurl/METADATA.toml +1 -1
  302. package/dist/typeshed-fallback/stubs/pycurl/pycurl.pyi +18 -0
  303. package/dist/typeshed-fallback/stubs/pygit2/METADATA.toml +2 -0
  304. package/dist/typeshed-fallback/stubs/pyinstaller/PyInstaller/building/build_main.pyi +19 -7
  305. package/dist/typeshed-fallback/stubs/pyinstaller/PyInstaller/building/splash.pyi +18 -16
  306. package/dist/typeshed-fallback/stubs/pyinstaller/PyInstaller/utils/hooks/__init__.pyi +1 -1
  307. package/dist/typeshed-fallback/stubs/pynput/METADATA.toml +1 -1
  308. package/dist/typeshed-fallback/stubs/pynput/pynput/_util.pyi +4 -4
  309. package/dist/typeshed-fallback/stubs/pynput/pynput/keyboard/__init__.pyi +4 -2
  310. package/dist/typeshed-fallback/stubs/pynput/pynput/keyboard/_base.pyi +3 -0
  311. package/dist/typeshed-fallback/stubs/pynput/pynput/mouse/__init__.pyi +6 -3
  312. package/dist/typeshed-fallback/stubs/pyserial/serial/tools/miniterm.pyi +2 -2
  313. package/dist/typeshed-fallback/stubs/pytz/pytz/tzinfo.pyi +3 -3
  314. package/dist/typeshed-fallback/stubs/pywin32/METADATA.toml +1 -1
  315. package/dist/typeshed-fallback/stubs/pywin32/pythoncom.pyi +19 -2
  316. package/dist/typeshed-fallback/stubs/pywin32/win32/lib/win32con.pyi +4895 -4764
  317. package/dist/typeshed-fallback/stubs/pywin32/win32/lib/win32timezone.pyi +81 -42
  318. package/dist/typeshed-fallback/stubs/pywin32/win32/lib/winerror.pyi +7258 -2574
  319. package/dist/typeshed-fallback/stubs/pywin32/win32/servicemanager.pyi +1 -1
  320. package/dist/typeshed-fallback/stubs/pywin32/win32/win32trace.pyi +1 -1
  321. package/dist/typeshed-fallback/stubs/pywin32/win32/win32ts.pyi +1 -0
  322. package/dist/typeshed-fallback/stubs/pywin32/win32com/client/__init__.pyi +3 -1
  323. package/dist/typeshed-fallback/stubs/regex/regex/regex.pyi +5 -5
  324. package/dist/typeshed-fallback/stubs/requests/requests/__init__.pyi +12 -13
  325. package/dist/typeshed-fallback/stubs/requests-oauthlib/requests_oauthlib/oauth1_auth.pyi +3 -0
  326. package/dist/typeshed-fallback/stubs/setuptools/METADATA.toml +4 -3
  327. package/dist/typeshed-fallback/stubs/setuptools/distutils/ccompiler.pyi +11 -0
  328. package/dist/typeshed-fallback/stubs/setuptools/distutils/compilers/C/base.pyi +1 -0
  329. package/dist/typeshed-fallback/stubs/setuptools/distutils/compilers/C/errors.pyi +1 -0
  330. package/dist/typeshed-fallback/stubs/setuptools/distutils/compilers/C/msvc.pyi +1 -0
  331. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/_msvccompiler.pyi +2 -21
  332. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/archive_util.pyi +1 -1
  333. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/ccompiler.pyi +13 -178
  334. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/command/bdist_rpm.pyi +6 -6
  335. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/command/build.pyi +2 -2
  336. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/command/build_clib.pyi +2 -2
  337. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/command/build_ext.pyi +2 -2
  338. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/command/build_py.pyi +3 -3
  339. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/command/install.pyi +5 -5
  340. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/command/install_data.pyi +1 -1
  341. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/command/install_lib.pyi +4 -4
  342. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/command/install_scripts.pyi +2 -2
  343. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/command/sdist.pyi +6 -6
  344. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/compat/__init__.pyi +6 -1
  345. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/compilers/C/base.pyi +196 -0
  346. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/compilers/C/errors.pyi +6 -0
  347. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/compilers/C/msvc.pyi +24 -0
  348. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/dist.pyi +23 -20
  349. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/errors.pyi +12 -6
  350. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/filelist.pyi +12 -11
  351. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/spawn.pyi +6 -1
  352. package/dist/typeshed-fallback/stubs/setuptools/setuptools/_distutils/util.pyi +6 -6
  353. package/dist/typeshed-fallback/stubs/setuptools/setuptools/command/bdist_wheel.pyi +0 -2
  354. package/dist/typeshed-fallback/stubs/simplejson/simplejson/encoder.pyi +1 -1
  355. package/dist/typeshed-fallback/stubs/six/six/moves/builtins.pyi +0 -1
  356. package/dist/typeshed-fallback/stubs/tqdm/METADATA.toml +4 -1
  357. package/dist/typeshed-fallback/stubs/tqdm/tqdm/asyncio.pyi +4 -3
  358. package/dist/typeshed-fallback/stubs/tqdm/tqdm/std.pyi +10 -3
  359. package/dist/typeshed-fallback/stubs/tree-sitter-languages/METADATA.toml +6 -0
  360. package/dist/typeshed-fallback/stubs/vobject/vobject/vcard.pyi +15 -8
  361. package/dist/typeshed-fallback/stubs/watchpoints/METADATA.toml +2 -0
  362. package/dist/typeshed-fallback/stubs/watchpoints/watchpoints/__init__.pyi +10 -0
  363. package/dist/typeshed-fallback/stubs/watchpoints/watchpoints/ast_monkey.pyi +3 -0
  364. package/dist/typeshed-fallback/stubs/watchpoints/watchpoints/util.pyi +6 -0
  365. package/dist/typeshed-fallback/stubs/watchpoints/watchpoints/watch.pyi +68 -0
  366. package/dist/typeshed-fallback/stubs/watchpoints/watchpoints/watch_element.pyi +56 -0
  367. package/dist/typeshed-fallback/stubs/watchpoints/watchpoints/watch_print.pyi +24 -0
  368. package/dist/typeshed-fallback/stubs/zstd/METADATA.toml +1 -1
  369. package/package.json +1 -1
  370. package/dist/typeshed-fallback/stubs/setuptools/pkg_resources/__init__.pyi +0 -543
  371. package/dist/typeshed-fallback/stubs/setuptools/pkg_resources/_vendored_packaging/__init__.pyi +0 -8
  372. package/dist/typeshed-fallback/stubs/setuptools/pkg_resources/_vendored_packaging/markers.pyi +0 -13
  373. package/dist/typeshed-fallback/stubs/setuptools/pkg_resources/_vendored_packaging/requirements.pyi +0 -14
  374. package/dist/typeshed-fallback/stubs/setuptools/pkg_resources/_vendored_packaging/specifiers.pyi +0 -66
  375. package/dist/typeshed-fallback/stubs/setuptools/pkg_resources/_vendored_packaging/version.pyi +0 -49
@@ -77,6 +77,19 @@ else:
77
77
  "MAX_INTERPOLATION_DEPTH",
78
78
  ]
79
79
 
80
+ if sys.version_info >= (3, 13):
81
+ class _UNNAMED_SECTION: ...
82
+ UNNAMED_SECTION: _UNNAMED_SECTION
83
+
84
+ _SectionName: TypeAlias = str | _UNNAMED_SECTION
85
+ # A list of sections can only include an unnamed section if the parser was initialized with
86
+ # allow_unnamed_section=True. Any prevents users from having to use explicit
87
+ # type checks if allow_unnamed_section is False (the default).
88
+ _SectionNameList: TypeAlias = list[Any]
89
+ else:
90
+ _SectionName: TypeAlias = str
91
+ _SectionNameList: TypeAlias = list[str]
92
+
80
93
  _Section: TypeAlias = Mapping[str, str]
81
94
  _Parser: TypeAlias = MutableMapping[str, _Section]
82
95
  _ConverterCallback: TypeAlias = Callable[[str], Any]
@@ -87,17 +100,17 @@ DEFAULTSECT: Final = "DEFAULT"
87
100
  MAX_INTERPOLATION_DEPTH: Final = 10
88
101
 
89
102
  class Interpolation:
90
- def before_get(self, parser: _Parser, section: str, option: str, value: str, defaults: _Section) -> str: ...
91
- def before_set(self, parser: _Parser, section: str, option: str, value: str) -> str: ...
92
- def before_read(self, parser: _Parser, section: str, option: str, value: str) -> str: ...
93
- def before_write(self, parser: _Parser, section: str, option: str, value: str) -> str: ...
103
+ def before_get(self, parser: _Parser, section: _SectionName, option: str, value: str, defaults: _Section) -> str: ...
104
+ def before_set(self, parser: _Parser, section: _SectionName, option: str, value: str) -> str: ...
105
+ def before_read(self, parser: _Parser, section: _SectionName, option: str, value: str) -> str: ...
106
+ def before_write(self, parser: _Parser, section: _SectionName, option: str, value: str) -> str: ...
94
107
 
95
108
  class BasicInterpolation(Interpolation): ...
96
109
  class ExtendedInterpolation(Interpolation): ...
97
110
 
98
111
  if sys.version_info < (3, 13):
99
112
  class LegacyInterpolation(Interpolation):
100
- def before_get(self, parser: _Parser, section: str, option: str, value: str, vars: _Section) -> str: ...
113
+ def before_get(self, parser: _Parser, section: _SectionName, option: str, value: str, vars: _Section) -> str: ...
101
114
 
102
115
  class RawConfigParser(_Parser):
103
116
  _SECT_TMPL: ClassVar[str] # undocumented
@@ -220,11 +233,11 @@ class RawConfigParser(_Parser):
220
233
  def __iter__(self) -> Iterator[str]: ...
221
234
  def __contains__(self, key: object) -> bool: ...
222
235
  def defaults(self) -> _Section: ...
223
- def sections(self) -> list[str]: ...
224
- def add_section(self, section: str) -> None: ...
225
- def has_section(self, section: str) -> bool: ...
226
- def options(self, section: str) -> list[str]: ...
227
- def has_option(self, section: str, option: str) -> bool: ...
236
+ def sections(self) -> _SectionNameList: ...
237
+ def add_section(self, section: _SectionName) -> None: ...
238
+ def has_section(self, section: _SectionName) -> bool: ...
239
+ def options(self, section: _SectionName) -> list[str]: ...
240
+ def has_option(self, section: _SectionName, option: str) -> bool: ...
228
241
  def read(self, filenames: StrOrBytesPath | Iterable[StrOrBytesPath], encoding: str | None = None) -> list[str]: ...
229
242
  def read_file(self, f: Iterable[str], source: str | None = None) -> None: ...
230
243
  def read_string(self, string: str, source: str = "<string>") -> None: ...
@@ -234,26 +247,26 @@ class RawConfigParser(_Parser):
234
247
  # These get* methods are partially applied (with the same names) in
235
248
  # SectionProxy; the stubs should be kept updated together
236
249
  @overload
237
- def getint(self, section: str, option: str, *, raw: bool = False, vars: _Section | None = None) -> int: ...
250
+ def getint(self, section: _SectionName, option: str, *, raw: bool = False, vars: _Section | None = None) -> int: ...
238
251
  @overload
239
252
  def getint(
240
- self, section: str, option: str, *, raw: bool = False, vars: _Section | None = None, fallback: _T = ...
253
+ self, section: _SectionName, option: str, *, raw: bool = False, vars: _Section | None = None, fallback: _T = ...
241
254
  ) -> int | _T: ...
242
255
  @overload
243
- def getfloat(self, section: str, option: str, *, raw: bool = False, vars: _Section | None = None) -> float: ...
256
+ def getfloat(self, section: _SectionName, option: str, *, raw: bool = False, vars: _Section | None = None) -> float: ...
244
257
  @overload
245
258
  def getfloat(
246
- self, section: str, option: str, *, raw: bool = False, vars: _Section | None = None, fallback: _T = ...
259
+ self, section: _SectionName, option: str, *, raw: bool = False, vars: _Section | None = None, fallback: _T = ...
247
260
  ) -> float | _T: ...
248
261
  @overload
249
- def getboolean(self, section: str, option: str, *, raw: bool = False, vars: _Section | None = None) -> bool: ...
262
+ def getboolean(self, section: _SectionName, option: str, *, raw: bool = False, vars: _Section | None = None) -> bool: ...
250
263
  @overload
251
264
  def getboolean(
252
- self, section: str, option: str, *, raw: bool = False, vars: _Section | None = None, fallback: _T = ...
265
+ self, section: _SectionName, option: str, *, raw: bool = False, vars: _Section | None = None, fallback: _T = ...
253
266
  ) -> bool | _T: ...
254
267
  def _get_conv(
255
268
  self,
256
- section: str,
269
+ section: _SectionName,
257
270
  option: str,
258
271
  conv: Callable[[str], _T],
259
272
  *,
@@ -263,19 +276,19 @@ class RawConfigParser(_Parser):
263
276
  ) -> _T: ...
264
277
  # This is incompatible with MutableMapping so we ignore the type
265
278
  @overload # type: ignore[override]
266
- def get(self, section: str, option: str, *, raw: bool = False, vars: _Section | None = None) -> str | MaybeNone: ...
279
+ def get(self, section: _SectionName, option: str, *, raw: bool = False, vars: _Section | None = None) -> str | MaybeNone: ...
267
280
  @overload
268
281
  def get(
269
- self, section: str, option: str, *, raw: bool = False, vars: _Section | None = None, fallback: _T
282
+ self, section: _SectionName, option: str, *, raw: bool = False, vars: _Section | None = None, fallback: _T
270
283
  ) -> str | _T | MaybeNone: ...
271
284
  @overload
272
285
  def items(self, *, raw: bool = False, vars: _Section | None = None) -> ItemsView[str, SectionProxy]: ...
273
286
  @overload
274
- def items(self, section: str, raw: bool = False, vars: _Section | None = None) -> list[tuple[str, str]]: ...
275
- def set(self, section: str, option: str, value: str | None = None) -> None: ...
287
+ def items(self, section: _SectionName, raw: bool = False, vars: _Section | None = None) -> list[tuple[str, str]]: ...
288
+ def set(self, section: _SectionName, option: str, value: str | None = None) -> None: ...
276
289
  def write(self, fp: SupportsWrite[str], space_around_delimiters: bool = True) -> None: ...
277
- def remove_option(self, section: str, option: str) -> bool: ...
278
- def remove_section(self, section: str) -> bool: ...
290
+ def remove_option(self, section: _SectionName, option: str) -> bool: ...
291
+ def remove_section(self, section: _SectionName) -> bool: ...
279
292
  def optionxform(self, optionstr: str) -> str: ...
280
293
  @property
281
294
  def converters(self) -> ConverterMapping: ...
@@ -283,9 +296,11 @@ class RawConfigParser(_Parser):
283
296
  class ConfigParser(RawConfigParser):
284
297
  # This is incompatible with MutableMapping so we ignore the type
285
298
  @overload # type: ignore[override]
286
- def get(self, section: str, option: str, *, raw: bool = False, vars: _Section | None = None) -> str: ...
299
+ def get(self, section: _SectionName, option: str, *, raw: bool = False, vars: _Section | None = None) -> str: ...
287
300
  @overload
288
- def get(self, section: str, option: str, *, raw: bool = False, vars: _Section | None = None, fallback: _T) -> str | _T: ...
301
+ def get(
302
+ self, section: _SectionName, option: str, *, raw: bool = False, vars: _Section | None = None, fallback: _T
303
+ ) -> str | _T: ...
289
304
 
290
305
  if sys.version_info < (3, 12):
291
306
  class SafeConfigParser(ConfigParser): ... # deprecated alias
@@ -305,7 +320,14 @@ class SectionProxy(MutableMapping[str, str]):
305
320
  # This is incompatible with MutableMapping so we ignore the type
306
321
  @overload # type: ignore[override]
307
322
  def get(
308
- self, option: str, *, raw: bool = False, vars: _Section | None = None, _impl: Any | None = None, **kwargs: Any
323
+ self,
324
+ option: str,
325
+ fallback: None = None,
326
+ *,
327
+ raw: bool = False,
328
+ vars: _Section | None = None,
329
+ _impl: Any | None = None,
330
+ **kwargs: Any, # passed to the underlying parser's get() method
309
331
  ) -> str | None: ...
310
332
  @overload
311
333
  def get(
@@ -316,7 +338,7 @@ class SectionProxy(MutableMapping[str, str]):
316
338
  raw: bool = False,
317
339
  vars: _Section | None = None,
318
340
  _impl: Any | None = None,
319
- **kwargs: Any,
341
+ **kwargs: Any, # passed to the underlying parser's get() method
320
342
  ) -> str | _T: ...
321
343
  # These are partially-applied version of the methods with the same names in
322
344
  # RawConfigParser; the stubs should be kept updated together
@@ -349,38 +371,38 @@ class Error(Exception):
349
371
  def __init__(self, msg: str = "") -> None: ...
350
372
 
351
373
  class NoSectionError(Error):
352
- section: str
353
- def __init__(self, section: str) -> None: ...
374
+ section: _SectionName
375
+ def __init__(self, section: _SectionName) -> None: ...
354
376
 
355
377
  class DuplicateSectionError(Error):
356
- section: str
378
+ section: _SectionName
357
379
  source: str | None
358
380
  lineno: int | None
359
- def __init__(self, section: str, source: str | None = None, lineno: int | None = None) -> None: ...
381
+ def __init__(self, section: _SectionName, source: str | None = None, lineno: int | None = None) -> None: ...
360
382
 
361
383
  class DuplicateOptionError(Error):
362
- section: str
384
+ section: _SectionName
363
385
  option: str
364
386
  source: str | None
365
387
  lineno: int | None
366
- def __init__(self, section: str, option: str, source: str | None = None, lineno: int | None = None) -> None: ...
388
+ def __init__(self, section: _SectionName, option: str, source: str | None = None, lineno: int | None = None) -> None: ...
367
389
 
368
390
  class NoOptionError(Error):
369
- section: str
391
+ section: _SectionName
370
392
  option: str
371
- def __init__(self, option: str, section: str) -> None: ...
393
+ def __init__(self, option: str, section: _SectionName) -> None: ...
372
394
 
373
395
  class InterpolationError(Error):
374
- section: str
396
+ section: _SectionName
375
397
  option: str
376
- def __init__(self, option: str, section: str, msg: str) -> None: ...
398
+ def __init__(self, option: str, section: _SectionName, msg: str) -> None: ...
377
399
 
378
400
  class InterpolationDepthError(InterpolationError):
379
- def __init__(self, option: str, section: str, rawval: object) -> None: ...
401
+ def __init__(self, option: str, section: _SectionName, rawval: object) -> None: ...
380
402
 
381
403
  class InterpolationMissingOptionError(InterpolationError):
382
404
  reference: str
383
- def __init__(self, option: str, section: str, rawval: object, reference: str) -> None: ...
405
+ def __init__(self, option: str, section: _SectionName, rawval: object, reference: str) -> None: ...
384
406
 
385
407
  class InterpolationSyntaxError(InterpolationError): ...
386
408
 
@@ -403,9 +425,6 @@ class MissingSectionHeaderError(ParsingError):
403
425
  def __init__(self, filename: str, lineno: int, line: str) -> None: ...
404
426
 
405
427
  if sys.version_info >= (3, 13):
406
- class _UNNAMED_SECTION: ...
407
- UNNAMED_SECTION: _UNNAMED_SECTION
408
-
409
428
  class MultilineContinuationError(ParsingError):
410
429
  lineno: int
411
430
  line: str
@@ -33,7 +33,7 @@ _T_co = TypeVar("_T_co", covariant=True)
33
33
  _T_io = TypeVar("_T_io", bound=IO[str] | None)
34
34
  _ExitT_co = TypeVar("_ExitT_co", covariant=True, bound=bool | None, default=bool | None)
35
35
  _F = TypeVar("_F", bound=Callable[..., Any])
36
- _G = TypeVar("_G", bound=Generator[Any, Any, Any] | AsyncGenerator[Any, Any], covariant=True)
36
+ _G_co = TypeVar("_G_co", bound=Generator[Any, Any, Any] | AsyncGenerator[Any, Any], covariant=True)
37
37
  _P = ParamSpec("_P")
38
38
 
39
39
  _SendT_contra = TypeVar("_SendT_contra", contravariant=True, default=None)
@@ -68,11 +68,11 @@ class ContextDecorator:
68
68
  def _recreate_cm(self) -> Self: ...
69
69
  def __call__(self, func: _F) -> _F: ...
70
70
 
71
- class _GeneratorContextManagerBase(Generic[_G]):
71
+ class _GeneratorContextManagerBase(Generic[_G_co]):
72
72
  # Ideally this would use ParamSpec, but that requires (*args, **kwargs), which this isn't. see #6676
73
- def __init__(self, func: Callable[..., _G], args: tuple[Any, ...], kwds: dict[str, Any]) -> None: ...
74
- gen: _G
75
- func: Callable[..., _G]
73
+ def __init__(self, func: Callable[..., _G_co], args: tuple[Any, ...], kwds: dict[str, Any]) -> None: ...
74
+ gen: _G_co
75
+ func: Callable[..., _G_co]
76
76
  args: tuple[Any, ...]
77
77
  kwds: dict[str, Any]
78
78
 
@@ -30,7 +30,7 @@ _CommandT = TypeVar("_CommandT", bound=Command)
30
30
  _Ts = TypeVarTuple("_Ts")
31
31
 
32
32
  class Command:
33
- dry_run: Literal[0, 1] # Exposed from __getattr_. Same as Distribution.dry_run
33
+ dry_run: bool | Literal[0, 1] # Exposed from __getattr_. Same as Distribution.dry_run
34
34
  distribution: Distribution
35
35
  # Any to work around variance issues
36
36
  sub_commands: ClassVar[list[tuple[str, Callable[[Any], bool] | None]]]
@@ -88,9 +88,9 @@ class Distribution:
88
88
  display_options: ClassVar[_OptionsList]
89
89
  display_option_names: ClassVar[list[str]]
90
90
  negative_opt: ClassVar[dict[str, str]]
91
- verbose: Literal[0, 1]
92
- dry_run: Literal[0, 1]
93
- help: Literal[0, 1]
91
+ verbose: bool | Literal[0, 1]
92
+ dry_run: bool | Literal[0, 1]
93
+ help: bool | Literal[0, 1]
94
94
  command_packages: list[str] | None
95
95
  script_name: str | None
96
96
  script_args: list[str] | None
@@ -1,10 +1,10 @@
1
1
  from collections.abc import Iterable, Mapping
2
+ from getopt import _SliceableT, _StrSequenceT_co
2
3
  from re import Pattern
3
4
  from typing import Any, Final, overload
4
5
  from typing_extensions import TypeAlias
5
6
 
6
7
  _Option: TypeAlias = tuple[str, str | None, str]
7
- _GR: TypeAlias = tuple[list[str], OptionDummy]
8
8
 
9
9
  longopt_pat: Final = r"[a-zA-Z](?:[a-zA-Z0-9-]*)"
10
10
  longopt_re: Final[Pattern[str]]
@@ -15,15 +15,25 @@ class FancyGetopt:
15
15
  def __init__(self, option_table: list[_Option] | None = None) -> None: ...
16
16
  # TODO kinda wrong, `getopt(object=object())` is invalid
17
17
  @overload
18
- def getopt(self, args: list[str] | None = None) -> _GR: ...
18
+ def getopt(
19
+ self, args: _SliceableT[_StrSequenceT_co] | None = None, object: None = None
20
+ ) -> tuple[_StrSequenceT_co, OptionDummy]: ...
19
21
  @overload
20
- def getopt(self, args: list[str] | None, object: Any) -> list[str]: ...
22
+ def getopt(
23
+ self, args: _SliceableT[_StrSequenceT_co] | None, object: Any
24
+ ) -> _StrSequenceT_co: ... # object is an arbitrary non-slotted object
21
25
  def get_option_order(self) -> list[tuple[str, str]]: ...
22
26
  def generate_help(self, header: str | None = None) -> list[str]: ...
23
27
 
28
+ # Same note as FancyGetopt.getopt
29
+ @overload
24
30
  def fancy_getopt(
25
- options: list[_Option], negative_opt: Mapping[_Option, _Option], object: Any, args: list[str] | None
26
- ) -> list[str] | _GR: ...
31
+ options: list[_Option], negative_opt: Mapping[_Option, _Option], object: None, args: _SliceableT[_StrSequenceT_co] | None
32
+ ) -> tuple[_StrSequenceT_co, OptionDummy]: ...
33
+ @overload
34
+ def fancy_getopt(
35
+ options: list[_Option], negative_opt: Mapping[_Option, _Option], object: Any, args: _SliceableT[_StrSequenceT_co] | None
36
+ ) -> _StrSequenceT_co: ...
27
37
 
28
38
  WS_TRANS: Final[dict[int, str]]
29
39
 
@@ -1,7 +1,7 @@
1
1
  import sys
2
2
  import types
3
3
  from _typeshed import SupportsAllComparisons, SupportsItems
4
- from collections.abc import Callable, Hashable, Iterable, Sequence, Sized
4
+ from collections.abc import Callable, Hashable, Iterable, Sized
5
5
  from typing import Any, Generic, Literal, NamedTuple, TypedDict, TypeVar, final, overload
6
6
  from typing_extensions import ParamSpec, Self, TypeAlias
7
7
 
@@ -129,26 +129,26 @@ if sys.version_info >= (3, 12):
129
129
  def update_wrapper(
130
130
  wrapper: Callable[_PWrapper, _RWrapper],
131
131
  wrapped: Callable[_PWrapped, _RWrapped],
132
- assigned: Sequence[str] = ("__module__", "__name__", "__qualname__", "__doc__", "__annotations__", "__type_params__"),
133
- updated: Sequence[str] = ("__dict__",),
132
+ assigned: Iterable[str] = ("__module__", "__name__", "__qualname__", "__doc__", "__annotations__", "__type_params__"),
133
+ updated: Iterable[str] = ("__dict__",),
134
134
  ) -> _Wrapped[_PWrapped, _RWrapped, _PWrapper, _RWrapper]: ...
135
135
  def wraps(
136
136
  wrapped: Callable[_PWrapped, _RWrapped],
137
- assigned: Sequence[str] = ("__module__", "__name__", "__qualname__", "__doc__", "__annotations__", "__type_params__"),
138
- updated: Sequence[str] = ("__dict__",),
137
+ assigned: Iterable[str] = ("__module__", "__name__", "__qualname__", "__doc__", "__annotations__", "__type_params__"),
138
+ updated: Iterable[str] = ("__dict__",),
139
139
  ) -> _Wrapper[_PWrapped, _RWrapped]: ...
140
140
 
141
141
  else:
142
142
  def update_wrapper(
143
143
  wrapper: Callable[_PWrapper, _RWrapper],
144
144
  wrapped: Callable[_PWrapped, _RWrapped],
145
- assigned: Sequence[str] = ("__module__", "__name__", "__qualname__", "__doc__", "__annotations__"),
146
- updated: Sequence[str] = ("__dict__",),
145
+ assigned: Iterable[str] = ("__module__", "__name__", "__qualname__", "__doc__", "__annotations__"),
146
+ updated: Iterable[str] = ("__dict__",),
147
147
  ) -> _Wrapped[_PWrapped, _RWrapped, _PWrapper, _RWrapper]: ...
148
148
  def wraps(
149
149
  wrapped: Callable[_PWrapped, _RWrapped],
150
- assigned: Sequence[str] = ("__module__", "__name__", "__qualname__", "__doc__", "__annotations__"),
151
- updated: Sequence[str] = ("__dict__",),
150
+ assigned: Iterable[str] = ("__module__", "__name__", "__qualname__", "__doc__", "__annotations__"),
151
+ updated: Iterable[str] = ("__dict__",),
152
152
  ) -> _Wrapper[_PWrapped, _RWrapped]: ...
153
153
 
154
154
  def total_ordering(cls: type[_T]) -> type[_T]: ...
@@ -206,20 +206,25 @@ class partialmethod(Generic[_T]):
206
206
  """
207
207
  ...
208
208
 
209
+ if sys.version_info >= (3, 11):
210
+ _RegType: TypeAlias = type[Any] | types.UnionType
211
+ else:
212
+ _RegType: TypeAlias = type[Any]
213
+
209
214
  class _SingleDispatchCallable(Generic[_T]):
210
215
  registry: types.MappingProxyType[Any, Callable[..., _T]]
211
216
  def dispatch(self, cls: Any) -> Callable[..., _T]: ...
212
217
  # @fun.register(complex)
213
218
  # def _(arg, verbose=False): ...
214
219
  @overload
215
- def register(self, cls: type[Any], func: None = None) -> Callable[[Callable[..., _T]], Callable[..., _T]]: ...
220
+ def register(self, cls: _RegType, func: None = None) -> Callable[[Callable[..., _T]], Callable[..., _T]]: ...
216
221
  # @fun.register
217
222
  # def _(arg: int, verbose=False):
218
223
  @overload
219
224
  def register(self, cls: Callable[..., _T], func: None = None) -> Callable[..., _T]: ...
220
225
  # fun.register(int, lambda x: x)
221
226
  @overload
222
- def register(self, cls: type[Any], func: Callable[..., _T]) -> Callable[..., _T]: ...
227
+ def register(self, cls: _RegType, func: Callable[..., _T]) -> Callable[..., _T]: ...
223
228
  def _clear_cache(self) -> None: ...
224
229
  def __call__(self, /, *args: Any, **kwargs: Any) -> _T: ...
225
230
 
@@ -232,11 +237,11 @@ class singledispatchmethod(Generic[_T]):
232
237
  @property
233
238
  def __isabstractmethod__(self) -> bool: ...
234
239
  @overload
235
- def register(self, cls: type[Any], method: None = None) -> Callable[[Callable[..., _T]], Callable[..., _T]]: ...
240
+ def register(self, cls: _RegType, method: None = None) -> Callable[[Callable[..., _T]], Callable[..., _T]]: ...
236
241
  @overload
237
242
  def register(self, cls: Callable[..., _T], method: None = None) -> Callable[..., _T]: ...
238
243
  @overload
239
- def register(self, cls: type[Any], method: Callable[..., _T]) -> Callable[..., _T]: ...
244
+ def register(self, cls: _RegType, method: Callable[..., _T]) -> Callable[..., _T]: ...
240
245
  def __get__(self, obj: _S, cls: type[_S] | None = None) -> Callable[..., _T]: ...
241
246
 
242
247
  class cached_property(Generic[_T_co]):
@@ -1,10 +1,22 @@
1
- from collections.abc import Iterable
1
+ from collections.abc import Iterable, Sequence
2
+ from typing import Protocol, TypeVar, overload, type_check_only
3
+
4
+ _StrSequenceT_co = TypeVar("_StrSequenceT_co", covariant=True, bound=Sequence[str])
5
+
6
+ @type_check_only
7
+ class _SliceableT(Protocol[_StrSequenceT_co]):
8
+ @overload
9
+ def __getitem__(self, key: int, /) -> str: ...
10
+ @overload
11
+ def __getitem__(self, key: slice, /) -> _StrSequenceT_co: ...
2
12
 
3
13
  __all__ = ["GetoptError", "error", "getopt", "gnu_getopt"]
4
14
 
5
- def getopt(args: list[str], shortopts: str, longopts: Iterable[str] | str = []) -> tuple[list[tuple[str, str]], list[str]]: ...
15
+ def getopt(
16
+ args: _SliceableT[_StrSequenceT_co], shortopts: str, longopts: Iterable[str] | str = []
17
+ ) -> tuple[list[tuple[str, str]], _StrSequenceT_co]: ...
6
18
  def gnu_getopt(
7
- args: list[str], shortopts: str, longopts: Iterable[str] | str = []
19
+ args: Sequence[str], shortopts: str, longopts: Iterable[str] | str = []
8
20
  ) -> tuple[list[tuple[str, str]], list[str]]: ...
9
21
 
10
22
  class GetoptError(Exception):
@@ -2,6 +2,7 @@ import sys
2
2
  from _blake2 import blake2b as blake2b, blake2s as blake2s
3
3
  from _hashlib import (
4
4
  HASH,
5
+ _HashObject,
5
6
  openssl_md5 as md5,
6
7
  openssl_sha1 as sha1,
7
8
  openssl_sha224 as sha224,
@@ -97,7 +98,7 @@ if sys.version_info >= (3, 11):
97
98
  def readable(self) -> bool: ...
98
99
 
99
100
  def file_digest(
100
- fileobj: _BytesIOLike | _FileDigestFileObj, digest: str | Callable[[], HASH], /, *, _bufsize: int = 262144
101
+ fileobj: _BytesIOLike | _FileDigestFileObj, digest: str | Callable[[], _HashObject], /, *, _bufsize: int = 262144
101
102
  ) -> HASH: ...
102
103
 
103
104
  # Legacy typing-only alias
@@ -1,6 +1,6 @@
1
1
  from _heapq import *
2
2
  from _typeshed import SupportsRichComparison
3
- from collections.abc import Callable, Iterable
3
+ from collections.abc import Callable, Generator, Iterable
4
4
  from typing import Any, Final, TypeVar
5
5
 
6
6
  __all__ = ["heappush", "heappop", "heapify", "heapreplace", "merge", "nlargest", "nsmallest", "heappushpop"]
@@ -11,7 +11,7 @@ __about__: Final[str]
11
11
 
12
12
  def merge(
13
13
  *iterables: Iterable[_S], key: Callable[[_S], SupportsRichComparison] | None = None, reverse: bool = False
14
- ) -> Iterable[_S]: ...
14
+ ) -> Generator[_S]: ...
15
15
  def nlargest(n: int, iterable: Iterable[_S], key: Callable[[_S], SupportsRichComparison] | None = None) -> list[_S]: ...
16
16
  def nsmallest(n: int, iterable: Iterable[_S], key: Callable[[_S], SupportsRichComparison] | None = None) -> list[_S]: ...
17
17
  def _heapify_max(heap: list[Any], /) -> None:
@@ -1,12 +1,12 @@
1
1
  import sys
2
- from _hashlib import HASH as _HashlibHash
2
+ from _hashlib import _HashObject
3
3
  from _typeshed import ReadableBuffer, SizedBuffer
4
4
  from collections.abc import Callable
5
5
  from types import ModuleType
6
6
  from typing import AnyStr, overload
7
7
  from typing_extensions import TypeAlias
8
8
 
9
- _DigestMod: TypeAlias = str | Callable[[], _HashlibHash] | ModuleType
9
+ _DigestMod: TypeAlias = str | Callable[[], _HashObject] | ModuleType
10
10
 
11
11
  trans_5C: bytes
12
12
  trans_36: bytes
@@ -6,6 +6,7 @@ import sys
6
6
  from _typeshed import StrPath, SupportsRead, SupportsWrite
7
7
  from collections.abc import Mapping, Sequence
8
8
  from typing import Any, AnyStr, BinaryIO, ClassVar
9
+ from typing_extensions import deprecated
9
10
 
10
11
  __all__ = ["HTTPServer", "ThreadingHTTPServer", "BaseHTTPRequestHandler", "SimpleHTTPRequestHandler", "CGIHTTPRequestHandler"]
11
12
 
@@ -72,7 +73,7 @@ class SimpleHTTPRequestHandler(BaseHTTPRequestHandler):
72
73
  def guess_type(self, path: StrPath) -> str: ... # undocumented
73
74
 
74
75
  def executable(path: StrPath) -> bool: ... # undocumented
75
-
76
+ @deprecated("Deprecated in Python 3.13; removal scheduled for Python 3.15")
76
77
  class CGIHTTPRequestHandler(SimpleHTTPRequestHandler):
77
78
  cgi_directories: list[str]
78
79
  have_fork: bool # undocumented
@@ -143,7 +143,7 @@ if sys.version_info >= (3, 10) and sys.version_info < (3, 12):
143
143
  class Deprecated(Generic[_KT, _VT]):
144
144
  def __getitem__(self, name: _KT) -> _VT: ...
145
145
  @overload
146
- def get(self, name: _KT) -> _VT | None: ...
146
+ def get(self, name: _KT, default: None = None) -> _VT | None: ...
147
147
  @overload
148
148
  def get(self, name: _KT, default: _T) -> _VT | _T: ...
149
149
  def __iter__(self) -> Iterator[_KT]: ...
@@ -5,16 +5,20 @@
5
5
  import pathlib
6
6
  import sys
7
7
  import zipfile
8
- from _typeshed import Incomplete, StrPath
8
+ from _typeshed import StrPath
9
9
  from collections.abc import Iterable, Iterator
10
10
  from io import BufferedReader
11
11
  from typing import Literal, NoReturn, TypeVar
12
12
  from typing_extensions import Never
13
13
 
14
+ if sys.version_info >= (3, 10):
15
+ from importlib._bootstrap_external import FileLoader
16
+ from zipimport import zipimporter
17
+
14
18
  if sys.version_info >= (3, 11):
15
- import importlib.resources.abc as abc
19
+ from importlib.resources import abc
16
20
  else:
17
- import importlib.abc as abc
21
+ from importlib import abc
18
22
 
19
23
  if sys.version_info >= (3, 10):
20
24
  if sys.version_info >= (3, 11):
@@ -27,14 +31,14 @@ if sys.version_info >= (3, 10):
27
31
 
28
32
  class FileReader(abc.TraversableResources):
29
33
  path: pathlib.Path
30
- def __init__(self, loader) -> None: ...
34
+ def __init__(self, loader: FileLoader) -> None: ...
31
35
  def resource_path(self, resource: StrPath) -> str: ...
32
36
  def files(self) -> pathlib.Path: ...
33
37
 
34
38
  class ZipReader(abc.TraversableResources):
35
39
  prefix: str
36
- archive: Incomplete
37
- def __init__(self, loader, module: str) -> None: ...
40
+ archive: str
41
+ def __init__(self, loader: zipimporter, module: str) -> None: ...
38
42
  def open_resource(self, resource: str) -> BufferedReader: ...
39
43
  def is_resource(self, path: StrPath) -> bool: ...
40
44
  def files(self) -> zipfile.Path: ...
@@ -63,6 +67,6 @@ if sys.version_info >= (3, 10):
63
67
 
64
68
  class NamespaceReader(abc.TraversableResources):
65
69
  path: MultiplexedPath
66
- def __init__(self, namespace_path) -> None: ...
70
+ def __init__(self, namespace_path: Iterable[str]) -> None: ...
67
71
  def resource_path(self, resource: str) -> str: ...
68
72
  def files(self) -> MultiplexedPath: ...
@@ -143,8 +143,8 @@ if sys.version_info >= (3, 11):
143
143
  _P = ParamSpec("_P")
144
144
  _T = TypeVar("_T")
145
145
  _F = TypeVar("_F", bound=Callable[..., Any])
146
- _T_cont = TypeVar("_T_cont", contravariant=True)
147
- _V_cont = TypeVar("_V_cont", contravariant=True)
146
+ _T_contra = TypeVar("_T_contra", contravariant=True)
147
+ _V_contra = TypeVar("_V_contra", contravariant=True)
148
148
 
149
149
  #
150
150
  # Types and members
@@ -228,11 +228,11 @@ def isasyncgenfunction(obj: Callable[_P, Any]) -> TypeGuard[Callable[_P, AsyncGe
228
228
  @overload
229
229
  def isasyncgenfunction(obj: object) -> TypeGuard[Callable[..., AsyncGeneratorType[Any, Any]]]: ...
230
230
 
231
- class _SupportsSet(Protocol[_T_cont, _V_cont]):
232
- def __set__(self, instance: _T_cont, value: _V_cont, /) -> None: ...
231
+ class _SupportsSet(Protocol[_T_contra, _V_contra]):
232
+ def __set__(self, instance: _T_contra, value: _V_contra, /) -> None: ...
233
233
 
234
- class _SupportsDelete(Protocol[_T_cont]):
235
- def __delete__(self, instance: _T_cont, /) -> None: ...
234
+ class _SupportsDelete(Protocol[_T_contra]):
235
+ def __delete__(self, instance: _T_contra, /) -> None: ...
236
236
 
237
237
  def isasyncgen(object: object) -> TypeIs[AsyncGeneratorType[Any, Any]]: ...
238
238
  def istraceback(object: object) -> TypeIs[TracebackType]: ...
@@ -345,12 +345,12 @@ class Signature:
345
345
 
346
346
  if sys.version_info >= (3, 10):
347
347
  def get_annotations(
348
- obj: Callable[..., object] | type[Any] | ModuleType,
348
+ obj: Callable[..., object] | type[object] | ModuleType, # any callable, class, or module
349
349
  *,
350
- globals: Mapping[str, Any] | None = None,
351
- locals: Mapping[str, Any] | None = None,
350
+ globals: Mapping[str, Any] | None = None, # value types depend on the key
351
+ locals: Mapping[str, Any] | None = None, # value types depend on the key
352
352
  eval_str: bool = False,
353
- ) -> dict[str, Any]: ...
353
+ ) -> dict[str, Any]: ... # values are type expressions
354
354
 
355
355
  # The name is the same as the enum's name in CPython
356
356
  class _ParameterKind(enum.IntEnum):
@@ -4,7 +4,7 @@ from collections.abc import Callable, Hashable, Iterable, Mapping, Sequence
4
4
  from configparser import RawConfigParser
5
5
  from re import Pattern
6
6
  from threading import Thread
7
- from typing import IO, Any, Final, Literal, SupportsIndex, TypedDict, overload
7
+ from typing import IO, Any, Final, Literal, SupportsIndex, TypedDict, overload, type_check_only
8
8
  from typing_extensions import Required, TypeAlias
9
9
 
10
10
  from . import Filter, Filterer, Formatter, Handler, Logger, _FilterType, _FormatStyle, _Level
@@ -14,17 +14,20 @@ RESET_ERROR: Final[int] # undocumented
14
14
  IDENTIFIER: Final[Pattern[str]] # undocumented
15
15
 
16
16
  if sys.version_info >= (3, 11):
17
+ @type_check_only
17
18
  class _RootLoggerConfiguration(TypedDict, total=False):
18
19
  level: _Level
19
20
  filters: Sequence[str | _FilterType]
20
21
  handlers: Sequence[str]
21
22
 
22
23
  else:
24
+ @type_check_only
23
25
  class _RootLoggerConfiguration(TypedDict, total=False):
24
26
  level: _Level
25
27
  filters: Sequence[str]
26
28
  handlers: Sequence[str]
27
29
 
30
+ @type_check_only
28
31
  class _LoggerConfiguration(_RootLoggerConfiguration, TypedDict, total=False):
29
32
  propagate: bool
30
33
 
@@ -32,6 +35,7 @@ _FormatterConfigurationTypedDict = TypedDict(
32
35
  "_FormatterConfigurationTypedDict", {"class": str, "format": str, "datefmt": str, "style": _FormatStyle}, total=False
33
36
  )
34
37
 
38
+ @type_check_only
35
39
  class _FilterConfigurationTypedDict(TypedDict):
36
40
  name: str
37
41
 
@@ -43,6 +47,7 @@ _FilterConfiguration: TypeAlias = _FilterConfigurationTypedDict | dict[str, Any]
43
47
  # Handler config can have additional keys even when not providing a custom factory so we just use `dict`.
44
48
  _HandlerConfiguration: TypeAlias = dict[str, Any]
45
49
 
50
+ @type_check_only
46
51
  class _DictConfigArgs(TypedDict, total=False):
47
52
  version: Required[Literal[1]]
48
53
  formatters: dict[str, _FormatterConfiguration]