basedpyright 1.31.7 → 1.32.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 (171) 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/_csv.pyi +4 -3
  7. package/dist/typeshed-fallback/stdlib/_frozen_importlib.pyi +1 -1
  8. package/dist/typeshed-fallback/stdlib/_frozen_importlib_external.pyi +5 -5
  9. package/dist/typeshed-fallback/stdlib/_typeshed/__init__.pyi +3 -0
  10. package/dist/typeshed-fallback/stdlib/ast.pyi +29 -10
  11. package/dist/typeshed-fallback/stdlib/builtins.pyi +79 -62
  12. package/dist/typeshed-fallback/stdlib/cmath.pyi +1 -1
  13. package/dist/typeshed-fallback/stdlib/copy.pyi +6 -6
  14. package/dist/typeshed-fallback/stdlib/ctypes/__init__.pyi +2 -2
  15. package/dist/typeshed-fallback/stdlib/email/headerregistry.pyi +1 -1
  16. package/dist/typeshed-fallback/stdlib/html/parser.pyi +4 -9
  17. package/dist/typeshed-fallback/stdlib/importlib/abc.pyi +3 -3
  18. package/dist/typeshed-fallback/stdlib/importlib/resources/__init__.pyi +6 -2
  19. package/dist/typeshed-fallback/stdlib/importlib/resources/_functional.pyi +2 -1
  20. package/dist/typeshed-fallback/stdlib/operator.pyi +4 -2
  21. package/dist/typeshed-fallback/stdlib/pdb.pyi +5 -0
  22. package/dist/typeshed-fallback/stdlib/tkinter/__init__.pyi +160 -69
  23. package/dist/typeshed-fallback/stdlib/turtle.pyi +18 -14
  24. package/dist/typeshed-fallback/stdlib/types.pyi +21 -16
  25. package/dist/typeshed-fallback/stdlib/typing.pyi +12 -2
  26. package/dist/typeshed-fallback/stdlib/typing_extensions.pyi +2 -1
  27. package/dist/typeshed-fallback/stdlib/xml/etree/ElementTree.pyi +15 -15
  28. package/dist/typeshed-fallback/stdlib/xxlimited.pyi +16 -3
  29. package/dist/typeshed-fallback/stubs/Authlib/METADATA.toml +1 -1
  30. package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7515/jws.pyi +3 -2
  31. package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7516/models.pyi +2 -2
  32. package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7518/jwe_zips.pyi +7 -2
  33. package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7591/endpoint.pyi +6 -4
  34. package/dist/typeshed-fallback/stubs/Jetson.GPIO/Jetson/GPIO/constants.pyi +22 -0
  35. package/dist/typeshed-fallback/stubs/Jetson.GPIO/Jetson/GPIO/gpio.pyi +2 -21
  36. package/dist/typeshed-fallback/stubs/Jetson.GPIO/Jetson/GPIO/gpio_cdev.pyi +11 -0
  37. package/dist/typeshed-fallback/stubs/Jetson.GPIO/Jetson/GPIO/gpio_pin_data.pyi +22 -3
  38. package/dist/typeshed-fallback/stubs/Jetson.GPIO/Jetson/GPIO/gpio_pinmux_lookup.pyi +6 -0
  39. package/dist/typeshed-fallback/stubs/Jetson.GPIO/METADATA.toml +1 -1
  40. package/dist/typeshed-fallback/stubs/PySocks/sockshandler.pyi +0 -5
  41. package/dist/typeshed-fallback/stubs/aiofiles/METADATA.toml +1 -1
  42. package/dist/typeshed-fallback/stubs/aiofiles/aiofiles/base.pyi +2 -0
  43. package/dist/typeshed-fallback/stubs/aiofiles/aiofiles/os.pyi +1 -1
  44. package/dist/typeshed-fallback/stubs/aiofiles/aiofiles/ospath.pyi +15 -4
  45. package/dist/typeshed-fallback/stubs/braintree/METADATA.toml +1 -1
  46. package/dist/typeshed-fallback/stubs/braintree/braintree/__init__.pyi +11 -0
  47. package/dist/typeshed-fallback/stubs/braintree/braintree/bank_account_instant_verification_gateway.pyi +13 -0
  48. package/dist/typeshed-fallback/stubs/braintree/braintree/bank_account_instant_verification_jwt.pyi +8 -0
  49. package/dist/typeshed-fallback/stubs/braintree/braintree/bank_account_instant_verification_jwt_request.pyi +18 -0
  50. package/dist/typeshed-fallback/stubs/braintree/braintree/braintree_gateway.pyi +4 -3
  51. package/dist/typeshed-fallback/stubs/braintree/braintree/error_codes.pyi +2 -0
  52. package/dist/typeshed-fallback/stubs/braintree/braintree/receiver.pyi +6 -0
  53. package/dist/typeshed-fallback/stubs/braintree/braintree/sender.pyi +6 -0
  54. package/dist/typeshed-fallback/stubs/braintree/braintree/transaction_us_bank_account_request.pyi +17 -0
  55. package/dist/typeshed-fallback/stubs/braintree/braintree/transfer.pyi +4 -0
  56. package/dist/typeshed-fallback/stubs/braintree/braintree/us_bank_account_verification.pyi +1 -0
  57. package/dist/typeshed-fallback/stubs/cachetools/cachetools/__init__.pyi +36 -5
  58. package/dist/typeshed-fallback/stubs/cachetools/cachetools/func.pyi +45 -10
  59. package/dist/typeshed-fallback/stubs/cachetools/cachetools/keys.pyi +2 -2
  60. package/dist/typeshed-fallback/stubs/django-filter/METADATA.toml +1 -1
  61. package/dist/typeshed-fallback/stubs/django-filter/django_filters/filters.pyi +1 -1
  62. package/dist/typeshed-fallback/stubs/docker/METADATA.toml +1 -1
  63. package/dist/typeshed-fallback/stubs/docker/docker/api/image.pyi +2 -2
  64. package/dist/typeshed-fallback/stubs/docker/docker/api/swarm.pyi +12 -9
  65. package/dist/typeshed-fallback/stubs/docker/docker/credentials/store.pyi +3 -3
  66. package/dist/typeshed-fallback/stubs/docker/docker/errors.pyi +9 -7
  67. package/dist/typeshed-fallback/stubs/docker/docker/models/services.pyi +4 -6
  68. package/dist/typeshed-fallback/stubs/docker/docker/transport/npipeconn.pyi +16 -16
  69. package/dist/typeshed-fallback/stubs/docker/docker/transport/npipesocket.pyi +40 -32
  70. package/dist/typeshed-fallback/stubs/docker/docker/transport/sshconn.pyi +30 -24
  71. package/dist/typeshed-fallback/stubs/docker/docker/transport/unixconn.pyi +22 -19
  72. package/dist/typeshed-fallback/stubs/docker/docker/types/networks.pyi +1 -1
  73. package/dist/typeshed-fallback/stubs/docker/docker/types/services.pyi +16 -10
  74. package/dist/typeshed-fallback/stubs/docker/docker/types/swarm.pyi +2 -7
  75. package/dist/typeshed-fallback/stubs/docker/docker/utils/decorators.pyi +8 -4
  76. package/dist/typeshed-fallback/stubs/docker/docker/utils/utils.pyi +4 -4
  77. package/dist/typeshed-fallback/stubs/docutils/docutils/nodes.pyi +2 -2
  78. package/dist/typeshed-fallback/stubs/flake8-rst-docstrings/METADATA.toml +1 -1
  79. package/dist/typeshed-fallback/stubs/flake8-typing-imports/METADATA.toml +1 -1
  80. package/dist/typeshed-fallback/stubs/grpcio/grpc/__init__.pyi +32 -34
  81. package/dist/typeshed-fallback/stubs/grpcio/grpc/aio/__init__.pyi +40 -21
  82. package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/app/base.pyi +0 -3
  83. package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/app/wsgiapp.pyi +0 -4
  84. package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/config.pyi +1 -2
  85. package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/glogging.pyi +1 -2
  86. package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/http/message.pyi +0 -3
  87. package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/http/unreader.pyi +0 -3
  88. package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/http/wsgi.pyi +0 -2
  89. package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/instrument/statsd.pyi +0 -9
  90. package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/reloader.pyi +1 -3
  91. package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/sock.pyi +0 -3
  92. package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/workers/geventlet.pyi +1 -8
  93. package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/workers/ggevent.pyi +0 -9
  94. package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/workers/gtornado.pyi +1 -4
  95. package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/workers/sync.pyi +0 -3
  96. package/dist/typeshed-fallback/stubs/html5lib/html5lib/html5parser.pyi +5 -5
  97. package/dist/typeshed-fallback/stubs/jsonschema/jsonschema/exceptions.pyi +1 -1
  98. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/edgelist.pyi +4 -2
  99. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/flow_matrix.pyi +2 -1
  100. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/chordal.pyi +1 -1
  101. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/clique.pyi +2 -2
  102. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/coloring/greedy_coloring.pyi +11 -9
  103. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/community/label_propagation.pyi +1 -1
  104. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/community/quality.pyi +1 -1
  105. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/edge_kcomponents.pyi +1 -1
  106. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/utils.pyi +3 -2
  107. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/d_separation.pyi +1 -1
  108. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/dag.pyi +2 -2
  109. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/efficiency_measures.pyi +4 -4
  110. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/networksimplex.pyi +3 -1
  111. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/utils.pyi +10 -3
  112. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/hierarchy.pyi +3 -1
  113. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/operators/binary.pyi +1 -1
  114. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/operators/product.pyi +1 -1
  115. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/planarity.pyi +1 -1
  116. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/branchings.pyi +2 -2
  117. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/decomposition.pyi +2 -2
  118. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/mst.pyi +3 -2
  119. package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/wiener.pyi +2 -2
  120. package/dist/typeshed-fallback/stubs/networkx/networkx/classes/function.pyi +26 -19
  121. package/dist/typeshed-fallback/stubs/networkx/networkx/convert_matrix.pyi +1 -1
  122. package/dist/typeshed-fallback/stubs/networkx/networkx/generators/ego.pyi +2 -1
  123. package/dist/typeshed-fallback/stubs/networkx/networkx/generators/geometric.pyi +2 -2
  124. package/dist/typeshed-fallback/stubs/networkx/networkx/generators/line.pyi +3 -2
  125. package/dist/typeshed-fallback/stubs/networkx/networkx/generators/mycielski.pyi +2 -1
  126. package/dist/typeshed-fallback/stubs/networkx/networkx/generators/spectral_graph_forge.pyi +2 -3
  127. package/dist/typeshed-fallback/stubs/networkx/networkx/generators/stochastic.pyi +3 -1
  128. package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/adjlist.pyi +3 -2
  129. package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/edgelist.pyi +8 -3
  130. package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/gexf.pyi +9 -8
  131. package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/gml.pyi +3 -2
  132. package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/graph6.pyi +2 -2
  133. package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/graphml.pyi +10 -9
  134. package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/json_graph/adjacency.pyi +2 -1
  135. package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/json_graph/cytoscape.pyi +2 -1
  136. package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/json_graph/node_link.pyi +22 -1
  137. package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/json_graph/tree.pyi +3 -1
  138. package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/multiline_adjlist.pyi +3 -2
  139. package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/p2g.pyi +3 -3
  140. package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/pajek.pyi +3 -2
  141. package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/sparse6.pyi +3 -4
  142. package/dist/typeshed-fallback/stubs/networkx/networkx/utils/backends.pyi +1 -1
  143. package/dist/typeshed-fallback/stubs/networkx/networkx/utils/misc.pyi +2 -1
  144. package/dist/typeshed-fallback/stubs/networkx/networkx/utils/rcm.pyi +2 -2
  145. package/dist/typeshed-fallback/stubs/psutil/psutil/__init__.pyi +11 -4
  146. package/dist/typeshed-fallback/stubs/psycopg2/METADATA.toml +1 -1
  147. package/dist/typeshed-fallback/stubs/psycopg2/psycopg2/errorcodes.pyi +3 -0
  148. package/dist/typeshed-fallback/stubs/pyserial/serial/rfc2217.pyi +2 -2
  149. package/dist/typeshed-fallback/stubs/pyserial/serial/serialutil.pyi +1 -1
  150. package/dist/typeshed-fallback/stubs/pyserial/serial/tools/list_ports.pyi +3 -1
  151. package/dist/typeshed-fallback/stubs/pyserial/serial/tools/list_ports_windows.pyi +1 -1
  152. package/dist/typeshed-fallback/stubs/pyserial/serial/urlhandler/protocol_spy.pyi +2 -2
  153. package/dist/typeshed-fallback/stubs/python-dateutil/dateutil/rrule.pyi +30 -1
  154. package/dist/typeshed-fallback/stubs/pywin32/win32/win32pipe.pyi +1 -1
  155. package/dist/typeshed-fallback/stubs/six/six/__init__.pyi +1 -1
  156. package/dist/typeshed-fallback/stubs/www-authenticate/METADATA.toml +2 -0
  157. package/dist/typeshed-fallback/stubs/www-authenticate/www_authenticate.pyi +34 -0
  158. package/dist/typeshed-fallback/stubs/xlrd/xlrd/sheet.pyi +5 -5
  159. package/dist/typeshed-fallback/stubs/xmldiff/METADATA.toml +2 -0
  160. package/dist/typeshed-fallback/stubs/xmldiff/xmldiff/__init__.pyi +0 -0
  161. package/dist/typeshed-fallback/stubs/xmldiff/xmldiff/actions.pyi +58 -0
  162. package/dist/typeshed-fallback/stubs/xmldiff/xmldiff/diff.pyi +36 -0
  163. package/dist/typeshed-fallback/stubs/xmldiff/xmldiff/diff_match_patch.pyi +58 -0
  164. package/dist/typeshed-fallback/stubs/xmldiff/xmldiff/formatting.pyi +80 -0
  165. package/dist/typeshed-fallback/stubs/xmldiff/xmldiff/main.pyi +70 -0
  166. package/dist/typeshed-fallback/stubs/xmldiff/xmldiff/patch.pyi +12 -0
  167. package/dist/typeshed-fallback/stubs/xmldiff/xmldiff/utils.pyi +16 -0
  168. package/dist/typeshed-fallback/stubs/yt-dlp/yt_dlp/extractor/common.pyi +48 -32
  169. package/dist/typeshed-fallback/stubs/yt-dlp/yt_dlp/extractor/commonmistakes.pyi +5 -3
  170. package/dist/typeshed-fallback/stubs/yt-dlp/yt_dlp/extractor/commonprotocols.pyi +5 -3
  171. package/package.json +1 -1
@@ -45,8 +45,6 @@ class AioRpcError(RpcError):
45
45
 
46
46
  # Create Client:
47
47
 
48
- class ClientInterceptor(metaclass=abc.ABCMeta): ...
49
-
50
48
  def insecure_channel(
51
49
  target: str,
52
50
  options: _Options | None = None,
@@ -65,8 +63,8 @@ def secure_channel(
65
63
 
66
64
  def server(
67
65
  migration_thread_pool: futures.Executor | None = None,
68
- handlers: Sequence[GenericRpcHandler[Any, Any]] | None = None,
69
- interceptors: Sequence[ServerInterceptor[Any, Any]] | None = None,
66
+ handlers: Sequence[GenericRpcHandler] | None = None,
67
+ interceptors: Sequence[ServerInterceptor] | None = None,
70
68
  options: _Options | None = None,
71
69
  maximum_concurrent_rpcs: int | None = None,
72
70
  compression: Compression | None = None,
@@ -125,7 +123,7 @@ class Channel(abc.ABC):
125
123
 
126
124
  class Server(metaclass=abc.ABCMeta):
127
125
  @abc.abstractmethod
128
- def add_generic_rpc_handlers(self, generic_rpc_handlers: Iterable[GenericRpcHandler[Any, Any]]) -> None: ...
126
+ def add_generic_rpc_handlers(self, generic_rpc_handlers: Iterable[GenericRpcHandler]) -> None: ...
129
127
 
130
128
  # Returns an integer port on which server will accept RPC requests.
131
129
  @abc.abstractmethod
@@ -288,7 +286,7 @@ class InterceptedUnaryUnaryCall(_InterceptedCall[_TRequest, _TResponse], metacla
288
286
  def __await__(self) -> Generator[Incomplete, None, _TResponse]: ...
289
287
  def __init__(
290
288
  self,
291
- interceptors: Sequence[UnaryUnaryClientInterceptor[_TRequest, _TResponse]],
289
+ interceptors: Sequence[UnaryUnaryClientInterceptor],
292
290
  request: _TRequest,
293
291
  timeout: float | None,
294
292
  metadata: Metadata,
@@ -304,7 +302,7 @@ class InterceptedUnaryUnaryCall(_InterceptedCall[_TRequest, _TResponse], metacla
304
302
  # pylint: disable=too-many-arguments
305
303
  async def _invoke(
306
304
  self,
307
- interceptors: Sequence[UnaryUnaryClientInterceptor[_TRequest, _TResponse]],
305
+ interceptors: Sequence[UnaryUnaryClientInterceptor],
308
306
  method: bytes,
309
307
  timeout: float | None,
310
308
  metadata: Metadata | None,
@@ -316,46 +314,67 @@ class InterceptedUnaryUnaryCall(_InterceptedCall[_TRequest, _TResponse], metacla
316
314
  ) -> UnaryUnaryCall[_TRequest, _TResponse]: ...
317
315
  def time_remaining(self) -> float | None: ...
318
316
 
319
- class UnaryUnaryClientInterceptor(Generic[_TRequest, _TResponse], metaclass=abc.ABCMeta):
317
+ class ClientInterceptor(metaclass=abc.ABCMeta): ...
318
+
319
+ class UnaryUnaryClientInterceptor(ClientInterceptor, metaclass=abc.ABCMeta):
320
+ # This method (not the class) is generic over _TRequest and _TResponse
321
+ # and the types must satisfy the no-op implementation of
322
+ # `return await continuation(client_call_details, request)`.
320
323
  @abc.abstractmethod
321
324
  async def intercept_unary_unary(
322
325
  self,
323
- # XXX: See equivalent function in grpc types for notes about continuation:
324
- continuation: Callable[[ClientCallDetails, _TRequest], UnaryUnaryCall[_TRequest, _TResponse]],
326
+ continuation: Callable[[ClientCallDetails, _TRequest], Awaitable[UnaryUnaryCall[_TRequest, _TResponse]]],
325
327
  client_call_details: ClientCallDetails,
326
328
  request: _TRequest,
327
- ) -> _TResponse: ...
329
+ ) -> _TResponse | UnaryUnaryCall[_TRequest, _TResponse]: ...
328
330
 
329
- class UnaryStreamClientInterceptor(Generic[_TRequest, _TResponse], metaclass=abc.ABCMeta):
331
+ class UnaryStreamClientInterceptor(ClientInterceptor, metaclass=abc.ABCMeta):
332
+ # This method (not the class) is generic over _TRequest and _TResponse
333
+ # and the types must satisfy the no-op implementation of
334
+ # `return await continuation(client_call_details, request)`.
330
335
  @abc.abstractmethod
331
336
  async def intercept_unary_stream(
332
337
  self,
333
- continuation: Callable[[ClientCallDetails, _TRequest], UnaryStreamCall[_TRequest, _TResponse]],
338
+ continuation: Callable[[ClientCallDetails, _TRequest], Awaitable[UnaryStreamCall[_TRequest, _TResponse]]],
334
339
  client_call_details: ClientCallDetails,
335
340
  request: _TRequest,
336
- ) -> AsyncIterable[_TResponse] | UnaryStreamCall[_TRequest, _TResponse]: ...
341
+ ) -> AsyncIterator[_TResponse] | UnaryStreamCall[_TRequest, _TResponse]: ...
337
342
 
338
- class StreamUnaryClientInterceptor(Generic[_TRequest, _TResponse], metaclass=abc.ABCMeta):
343
+ class StreamUnaryClientInterceptor(ClientInterceptor, metaclass=abc.ABCMeta):
344
+ # This method (not the class) is generic over _TRequest and _TResponse
345
+ # and the types must satisfy the no-op implementation of
346
+ # `return await continuation(client_call_details, request_iterator)`.
339
347
  @abc.abstractmethod
340
348
  async def intercept_stream_unary(
341
349
  self,
342
- continuation: Callable[[ClientCallDetails, _TRequest], StreamUnaryCall[_TRequest, _TResponse]],
350
+ continuation: Callable[
351
+ [ClientCallDetails, AsyncIterable[_TRequest] | Iterable[_TRequest]], Awaitable[StreamUnaryCall[_TRequest, _TResponse]]
352
+ ],
343
353
  client_call_details: ClientCallDetails,
344
354
  request_iterator: AsyncIterable[_TRequest] | Iterable[_TRequest],
345
- ) -> AsyncIterable[_TResponse] | UnaryStreamCall[_TRequest, _TResponse]: ...
355
+ ) -> _TResponse | StreamUnaryCall[_TRequest, _TResponse]: ...
346
356
 
347
- class StreamStreamClientInterceptor(Generic[_TRequest, _TResponse], metaclass=abc.ABCMeta):
357
+ class StreamStreamClientInterceptor(ClientInterceptor, metaclass=abc.ABCMeta):
358
+ # This method (not the class) is generic over _TRequest and _TResponse
359
+ # and the types must satisfy the no-op implementation of
360
+ # `return await continuation(client_call_details, request_iterator)`.
348
361
  @abc.abstractmethod
349
362
  async def intercept_stream_stream(
350
363
  self,
351
- continuation: Callable[[ClientCallDetails, _TRequest], StreamStreamCall[_TRequest, _TResponse]],
364
+ continuation: Callable[
365
+ [ClientCallDetails, AsyncIterable[_TRequest] | Iterable[_TRequest]],
366
+ Awaitable[StreamStreamCall[_TRequest, _TResponse]],
367
+ ],
352
368
  client_call_details: ClientCallDetails,
353
369
  request_iterator: AsyncIterable[_TRequest] | Iterable[_TRequest],
354
- ) -> AsyncIterable[_TResponse] | StreamStreamCall[_TRequest, _TResponse]: ...
370
+ ) -> AsyncIterator[_TResponse] | StreamStreamCall[_TRequest, _TResponse]: ...
355
371
 
356
372
  # Server-Side Interceptor:
357
373
 
358
- class ServerInterceptor(Generic[_TRequest, _TResponse], metaclass=abc.ABCMeta):
374
+ class ServerInterceptor(metaclass=abc.ABCMeta):
375
+ # This method (not the class) is generic over _TRequest and _TResponse
376
+ # and the types must satisfy the no-op implementation of
377
+ # `return await continuation(handler_call_details)`.
359
378
  @abc.abstractmethod
360
379
  async def intercept_service(
361
380
  self,
@@ -1,6 +1,5 @@
1
1
  from argparse import ArgumentParser, Namespace
2
2
  from typing import Any
3
- from typing_extensions import override
4
3
 
5
4
  from gunicorn.config import Config
6
5
  from gunicorn.glogging import Logger as GLogger
@@ -30,7 +29,5 @@ class Application(BaseApplication):
30
29
  def get_config_from_module_name(self, module_name: str) -> dict[str, Any]: ...
31
30
  def load_config_from_module_name_or_filename(self, location: str) -> dict[str, Any]: ...
32
31
  def load_config_from_file(self, filename: str) -> dict[str, Any]: ...
33
- @override
34
32
  def load_config(self) -> None: ...
35
- @override
36
33
  def run(self) -> None: ...
@@ -1,5 +1,4 @@
1
1
  from argparse import ArgumentParser, Namespace
2
- from typing_extensions import override
3
2
 
4
3
  from gunicorn.app.base import Application
5
4
 
@@ -8,13 +7,10 @@ from .._types import _WSGIAppType
8
7
  class WSGIApplication(Application):
9
8
  app_uri: str | None
10
9
 
11
- @override
12
10
  def init(self, parser: ArgumentParser, opts: Namespace, args: list[str]) -> None: ...
13
- @override
14
11
  def load_config(self) -> None: ...
15
12
  def load_wsgiapp(self) -> _WSGIAppType: ...
16
13
  def load_pasteapp(self) -> _WSGIAppType: ...
17
- @override
18
14
  def load(self) -> _WSGIAppType: ...
19
15
 
20
16
  def run(prog: str | None = None) -> None: ...
@@ -3,7 +3,7 @@ from _typeshed import ConvertibleToInt
3
3
  from collections.abc import Callable, Container
4
4
  from ssl import SSLContext, _SSLMethod
5
5
  from typing import Annotated, Any, ClassVar, overload
6
- from typing_extensions import TypeAlias, override
6
+ from typing_extensions import TypeAlias
7
7
 
8
8
  from gunicorn.arbiter import Arbiter
9
9
  from gunicorn.glogging import Logger as GLogger
@@ -90,7 +90,6 @@ class Config:
90
90
 
91
91
  def __init__(self, usage: str | None = None, prog: str | None = None) -> None: ...
92
92
  def __getattr__(self, name: str) -> Any: ...
93
- @override
94
93
  def __setattr__(self, name: str, value: Any) -> None: ...
95
94
  def set(self, name: str, value: _ConfigValueType) -> None: ...
96
95
  def get_cmd_args_from_env(self) -> list[str]: ...
@@ -5,7 +5,7 @@ from datetime import timedelta
5
5
  from logging.config import _DictConfigArgs
6
6
  from socket import SocketKind
7
7
  from typing import Annotated, Any, ClassVar, Literal, TypedDict, type_check_only
8
- from typing_extensions import TypeAlias, override
8
+ from typing_extensions import TypeAlias
9
9
 
10
10
  from gunicorn.http import Request
11
11
  from gunicorn.http.wsgi import Response
@@ -52,7 +52,6 @@ def loggers() -> list[logging.Logger]: ...
52
52
 
53
53
  class SafeAtoms(dict[str, Any]):
54
54
  def __init__(self, atoms: dict[str, Any]) -> None: ...
55
- @override
56
55
  def __getitem__(self, k: str) -> str: ...
57
56
 
58
57
  _SyslogAddressType: TypeAlias = (
@@ -1,6 +1,5 @@
1
1
  import io
2
2
  import re
3
- from typing_extensions import override
4
3
 
5
4
  from gunicorn.config import Config
6
5
  from gunicorn.http.body import Body
@@ -51,12 +50,10 @@ class Request(Message):
51
50
 
52
51
  def __init__(self, cfg: Config, unreader: Unreader, peer_addr: _AddressType, req_number: int = 1) -> None: ...
53
52
  def get_data(self, unreader: Unreader, buf: io.BytesIO, stop: bool = False) -> None: ...
54
- @override
55
53
  def parse(self, unreader: Unreader) -> bytes: ...
56
54
  def read_line(self, unreader: Unreader, buf: io.BytesIO, limit: int = 0) -> tuple[bytes, bytes]: ...
57
55
  def proxy_protocol(self, line: str) -> bool: ...
58
56
  def proxy_protocol_access_check(self) -> None: ...
59
57
  def parse_proxy_protocol(self, line: str) -> None: ...
60
58
  def parse_request_line(self, line_bytes: bytes) -> None: ...
61
- @override
62
59
  def set_body_reader(self) -> None: ...
@@ -2,7 +2,6 @@ import io
2
2
  import socket
3
3
  from _typeshed import ReadableBuffer
4
4
  from collections.abc import Iterable, Iterator
5
- from typing_extensions import override
6
5
 
7
6
  class Unreader:
8
7
  buf: io.BytesIO
@@ -17,12 +16,10 @@ class SocketUnreader(Unreader):
17
16
  mxchunk: int
18
17
 
19
18
  def __init__(self, sock: socket.socket, max_chunk: int = 8192) -> None: ...
20
- @override
21
19
  def chunk(self) -> bytes: ...
22
20
 
23
21
  class IterUnreader(Unreader):
24
22
  iter: Iterator[bytes] | None
25
23
 
26
24
  def __init__(self, iterable: Iterable[bytes]) -> None: ...
27
- @override
28
25
  def chunk(self) -> bytes: ...
@@ -5,7 +5,6 @@ import socket
5
5
  from _typeshed import ReadableBuffer
6
6
  from collections.abc import Callable
7
7
  from typing import Any
8
- from typing_extensions import override
9
8
 
10
9
  from gunicorn.config import Config
11
10
  from gunicorn.http import Request
@@ -28,7 +27,6 @@ class WSGIErrorsWrapper(io.RawIOBase):
28
27
  streams: list[io.TextIOBase]
29
28
 
30
29
  def __init__(self, cfg: Config) -> None: ...
31
- @override
32
30
  def write(self, data: ReadableBuffer) -> None: ...
33
31
 
34
32
  def base_environ(cfg: Config) -> _EnvironType: ...
@@ -2,7 +2,6 @@ import logging
2
2
  import socket
3
3
  from collections.abc import Mapping
4
4
  from datetime import timedelta
5
- from typing_extensions import override
6
5
 
7
6
  from gunicorn.config import Config
8
7
  from gunicorn.glogging import Logger
@@ -26,7 +25,6 @@ class Statsd(Logger):
26
25
  cfg: Config
27
26
 
28
27
  def __init__(self, cfg: Config) -> None: ...
29
- @override
30
28
  def critical(
31
29
  self,
32
30
  msg: object,
@@ -36,7 +34,6 @@ class Statsd(Logger):
36
34
  stacklevel: int = 1,
37
35
  extra: Mapping[str, object] | None = None,
38
36
  ) -> None: ...
39
- @override
40
37
  def error(
41
38
  self,
42
39
  msg: object,
@@ -46,7 +43,6 @@ class Statsd(Logger):
46
43
  stacklevel: int = 1,
47
44
  extra: Mapping[str, object] | None = None,
48
45
  ) -> None: ...
49
- @override
50
46
  def warning(
51
47
  self,
52
48
  msg: object,
@@ -56,7 +52,6 @@ class Statsd(Logger):
56
52
  stacklevel: int = 1,
57
53
  extra: Mapping[str, object] | None = None,
58
54
  ) -> None: ...
59
- @override
60
55
  def info(
61
56
  self,
62
57
  msg: object,
@@ -66,7 +61,6 @@ class Statsd(Logger):
66
61
  stacklevel: int = 1,
67
62
  extra: Mapping[str, object] | None = None,
68
63
  ) -> None: ...
69
- @override
70
64
  def debug(
71
65
  self,
72
66
  msg: object,
@@ -76,7 +70,6 @@ class Statsd(Logger):
76
70
  stacklevel: int = 1,
77
71
  extra: Mapping[str, object] | None = None,
78
72
  ) -> None: ...
79
- @override
80
73
  def exception(
81
74
  self,
82
75
  msg: object,
@@ -86,7 +79,6 @@ class Statsd(Logger):
86
79
  stacklevel: int = 1,
87
80
  extra: Mapping[str, object] | None = None,
88
81
  ) -> None: ...
89
- @override
90
82
  def log(
91
83
  self,
92
84
  lvl: _LogLevelType,
@@ -97,7 +89,6 @@ class Statsd(Logger):
97
89
  stacklevel: int = 1,
98
90
  extra: Mapping[str, object] | None = None,
99
91
  ) -> None: ...
100
- @override
101
92
  def access(self, resp: Response, req: Request, environ: _EnvironType, request_time: timedelta) -> None: ...
102
93
  def gauge(self, name: str, value: float) -> None: ...
103
94
  def increment(self, name: str, value: int, sampling_rate: float = 1.0) -> None: ...
@@ -3,7 +3,7 @@ import threading
3
3
  from collections.abc import Callable, Iterable
4
4
  from re import Pattern
5
5
  from typing import NoReturn, TypedDict, type_check_only
6
- from typing_extensions import TypeAlias, override
6
+ from typing_extensions import TypeAlias
7
7
 
8
8
  COMPILED_EXT_RE: Pattern[str]
9
9
 
@@ -15,7 +15,6 @@ class Reloader(threading.Thread):
15
15
  ) -> None: ...
16
16
  def add_extra_file(self, filename: str) -> None: ...
17
17
  def get_files(self) -> list[str]: ...
18
- @override
19
18
  def run(self) -> None: ...
20
19
 
21
20
  has_inotify: bool
@@ -28,7 +27,6 @@ if sys.platform == "linux":
28
27
  def __init__(self, extra_files: Iterable[str] | None = None, callback: Callable[[str], None] | None = None) -> None: ...
29
28
  def add_extra_file(self, filename: str) -> None: ...
30
29
  def get_dirs(self) -> set[str]: ...
31
- @override
32
30
  def run(self) -> None: ...
33
31
 
34
32
  else:
@@ -3,7 +3,6 @@ import sys
3
3
  from collections.abc import Iterable
4
4
  from ssl import SSLContext, SSLSocket
5
5
  from typing import Any, ClassVar, Literal, SupportsIndex
6
- from typing_extensions import override
7
6
 
8
7
  from gunicorn.glogging import Logger as GLogger
9
8
 
@@ -19,7 +18,6 @@ class BaseSocket:
19
18
  class TCPSocket(BaseSocket):
20
19
  FAMILY: ClassVar[Literal[socket.AddressFamily.AF_INET, socket.AddressFamily.AF_INET6]]
21
20
 
22
- @override
23
21
  def set_options(self, sock: socket.socket, bound: bool = False) -> socket.socket: ...
24
22
 
25
23
  class TCP6Socket(TCPSocket):
@@ -32,7 +30,6 @@ class UnixSocket(BaseSocket):
32
30
  FAMILY: ClassVar[Literal[0]] # Stub for windows
33
31
 
34
32
  def __init__(self, addr: str, conf: Config, log: GLogger, fd: SupportsIndex | None = None) -> None: ...
35
- @override
36
33
  def bind(self, sock: socket.socket) -> None: ...
37
34
 
38
35
  def create_sockets(conf: Config, log: GLogger, fds: Iterable[SupportsIndex] | None = None) -> list[BaseSocket]: ...
@@ -1,6 +1,6 @@
1
1
  from types import FrameType
2
2
  from typing import Any
3
- from typing_extensions import TypeAlias, override
3
+ from typing_extensions import TypeAlias
4
4
 
5
5
  from gunicorn.workers.base_async import AsyncWorker
6
6
 
@@ -15,17 +15,10 @@ def patch_sendfile() -> None: ...
15
15
 
16
16
  class EventletWorker(AsyncWorker):
17
17
  def patch(self) -> None: ...
18
- @override
19
18
  def is_already_handled(self, respiter: object) -> bool: ...
20
- @override
21
19
  def init_process(self) -> None: ...
22
- @override
23
20
  def handle_quit(self, sig: int, frame: FrameType | None) -> None: ...
24
- @override
25
21
  def handle_usr1(self, sig: int, frame: FrameType | None) -> None: ...
26
- @override
27
22
  def timeout_ctx(self) -> None: ...
28
- @override
29
23
  def handle(self, listener: GreenSocket, client: GreenSocket, addr: _AddressType) -> None: ...
30
- @override
31
24
  def run(self) -> None: ...
@@ -1,6 +1,5 @@
1
1
  from types import FrameType
2
2
  from typing import Any, ClassVar
3
- from typing_extensions import override
4
3
 
5
4
  from gevent import pywsgi
6
5
  from gevent.pywsgi import WSGIHandler
@@ -19,21 +18,13 @@ class GeventWorker(AsyncWorker):
19
18
  sockets: list[GeventSocket]
20
19
 
21
20
  def patch(self) -> None: ...
22
- @override
23
21
  def notify(self) -> None: ...
24
- @override
25
22
  def timeout_ctx(self) -> None: ...
26
- @override
27
23
  def run(self) -> None: ...
28
- @override
29
24
  def handle(self, listener: GeventSocket, client: GeventSocket, addr: _AddressType) -> None: ...
30
- @override
31
25
  def handle_request(self, listener_name: str, req: Request, sock: GeventSocket, addr: _AddressType) -> bool: ...
32
- @override
33
26
  def handle_quit(self, sig: int, frame: FrameType | None) -> None: ...
34
- @override
35
27
  def handle_usr1(self, sig: int, frame: FrameType | None) -> None: ...
36
- @override
37
28
  def init_process(self) -> None: ...
38
29
 
39
30
  class GeventResponse:
@@ -1,6 +1,6 @@
1
1
  from types import FrameType
2
2
  from typing import Any
3
- from typing_extensions import TypeAlias, override
3
+ from typing_extensions import TypeAlias
4
4
 
5
5
  from gunicorn.workers.base import Worker
6
6
 
@@ -17,12 +17,9 @@ class TornadoWorker(Worker):
17
17
 
18
18
  @classmethod
19
19
  def setup(cls) -> None: ...
20
- @override
21
20
  def handle_exit(self, sig: int, frame: FrameType | None) -> None: ...
22
21
  def handle_request(self) -> None: ...
23
22
  def watchdog(self) -> None: ...
24
23
  def heartbeat(self) -> None: ...
25
- @override
26
24
  def init_process(self) -> None: ...
27
- @override
28
25
  def run(self) -> None: ...
@@ -1,5 +1,4 @@
1
1
  import socket
2
- from typing_extensions import override
3
2
 
4
3
  from gunicorn.http import Request
5
4
  from gunicorn.workers.base import Worker
@@ -14,9 +13,7 @@ class SyncWorker(Worker):
14
13
  def is_parent_alive(self) -> bool: ...
15
14
  def run_for_one(self, timeout: int) -> None: ...
16
15
  def run_for_multiple(self, timeout: int) -> None: ...
17
- @override
18
16
  def run(self) -> None: ...
19
17
  def handle(self, listener: socket.socket, client: socket.socket, addr: _AddressType) -> None: ...
20
18
  def handle_request(self, listener: socket.socket, req: Request, client: socket.socket, addr: tuple[str, int]) -> bool: ...
21
- @override
22
19
  def handle_error(self, req: Request | None, client: socket.socket, addr: _AddressType, exc: BaseException) -> None: ...
@@ -48,16 +48,16 @@ class HTMLParser:
48
48
  def parse(self, stream: _InputStream, scripting: bool = ..., **kwargs): ...
49
49
  def parseFragment(self, stream: _InputStream, *args, **kwargs): ...
50
50
  def parseError(self, errorcode: str = "XXX-undefined-error", datavars=None) -> None: ...
51
- def adjustMathMLAttributes(self, token) -> None: ...
52
- def adjustSVGAttributes(self, token) -> None: ...
53
- def adjustForeignAttributes(self, token) -> None: ...
54
- def reparseTokenNormal(self, token) -> None: ...
51
+ def adjustMathMLAttributes(self, token: dict[str, Any]) -> None: ...
52
+ def adjustSVGAttributes(self, token: dict[str, Any]) -> None: ...
53
+ def adjustForeignAttributes(self, token: dict[str, Any]) -> None: ...
54
+ def reparseTokenNormal(self, token: dict[str, Any]) -> None: ...
55
55
  def resetInsertionMode(self) -> None: ...
56
56
  originalPhase: Incomplete
57
57
  def parseRCDataRawtext(self, token, contentType) -> None: ...
58
58
 
59
59
  def getPhases(debug): ...
60
- def adjust_attributes(token, replacements) -> None: ...
60
+ def adjust_attributes(token: dict[str, Any], replacements: dict[str, Any]) -> None: ...
61
61
  def impliedTagToken(
62
62
  name: str, type: str = "EndTag", attributes: dict[str, Any] | None = None, selfClosing: bool = False
63
63
  ) -> dict[str, Any]: ...
@@ -19,7 +19,7 @@ class _Error(Exception):
19
19
  relative_path: deque[str | int]
20
20
  schema_path: deque[str | int]
21
21
  relative_schema_path: deque[str | int]
22
- context: list[ValidationError] | None
22
+ context: list[ValidationError]
23
23
  cause: Exception | None
24
24
  validator: Validator | Unset
25
25
  validator_value: Any | Unset
@@ -6,9 +6,11 @@ from networkx.utils.backends import _dispatchable
6
6
  __all__ = ["generate_edgelist", "write_edgelist", "parse_edgelist", "read_edgelist"]
7
7
 
8
8
  @_dispatchable
9
- def write_edgelist(G, path, comments: str = "#", delimiter: str = " ", data: bool = True, encoding: str = "utf-8") -> None: ...
9
+ def write_edgelist(
10
+ G: Graph[_Node], path, comments: str = "#", delimiter: str = " ", data: bool = True, encoding: str = "utf-8"
11
+ ) -> None: ...
10
12
  @_dispatchable
11
- def generate_edgelist(G, delimiter: str = " ", data: bool = True) -> Generator[str]: ...
13
+ def generate_edgelist(G: Graph[_Node], delimiter: str = " ", data: bool = True) -> Generator[str]: ...
12
14
  @_dispatchable
13
15
  def parse_edgelist(
14
16
  lines,
@@ -1,10 +1,11 @@
1
1
  from _typeshed import Incomplete
2
2
  from collections.abc import Generator
3
3
 
4
+ from networkx.classes.graph import Graph, _Node
4
5
  from networkx.utils.backends import _dispatchable
5
6
 
6
7
  @_dispatchable
7
- def flow_matrix_row(G, weight=None, dtype=..., solver: str = "lu") -> Generator[Incomplete, None, None]: ...
8
+ def flow_matrix_row(G: Graph[_Node], weight=None, dtype=..., solver: str = "lu") -> Generator[Incomplete, None, None]: ...
8
9
 
9
10
  class InverseLaplacian:
10
11
  dtype: Incomplete
@@ -26,4 +26,4 @@ def chordal_graph_cliques(G: Graph[_Node]) -> Generator[frozenset[_Node], None,
26
26
  @_dispatchable
27
27
  def chordal_graph_treewidth(G: Graph[_Node]) -> int: ...
28
28
  @_dispatchable
29
- def complete_to_chordal_graph(G) -> tuple[Incomplete, dict[Incomplete, int]]: ...
29
+ def complete_to_chordal_graph(G: Graph[_Node]) -> tuple[Incomplete, dict[Incomplete, int]]: ...
@@ -34,9 +34,9 @@ def node_clique_number(
34
34
  ) -> dict[_Node, int]: ...
35
35
  @overload
36
36
  def node_clique_number(G: Graph[_Node], nodes=None, cliques: Iterable[Incomplete] | None = None, separate_nodes=False) -> int: ...
37
- def number_of_cliques(G, nodes=None, cliques=None) -> int | dict[Incomplete, Incomplete]: ...
37
+ def number_of_cliques(G: Graph[_Node], nodes=None, cliques=None) -> int | dict[Incomplete, Incomplete]: ...
38
38
  @_dispatchable
39
- def max_weight_clique(G, weight="weight") -> tuple[list[Incomplete], int]: ...
39
+ def max_weight_clique(G: Graph[_Node], weight="weight") -> tuple[list[Incomplete], int]: ...
40
40
 
41
41
  class MaxWeightClique:
42
42
  G: Graph[Incomplete]
@@ -1,4 +1,4 @@
1
- from _typeshed import Incomplete
1
+ from _typeshed import Incomplete, Unused
2
2
  from collections.abc import Callable, Generator
3
3
  from typing import Final
4
4
 
@@ -18,21 +18,23 @@ __all__ = [
18
18
  ]
19
19
 
20
20
  @_dispatchable
21
- def strategy_largest_first(G, colors): ...
21
+ def strategy_largest_first(G: Graph[_Node], colors: Unused): ...
22
22
  @_dispatchable
23
- def strategy_random_sequential(G, colors, seed=None): ...
23
+ def strategy_random_sequential(G: Graph[_Node], colors: Unused, seed=None): ...
24
24
  @_dispatchable
25
- def strategy_smallest_last(G, colors): ...
25
+ def strategy_smallest_last(G: Graph[_Node], colors: Unused): ...
26
26
  @_dispatchable
27
- def strategy_independent_set(G, colors) -> Generator[Incomplete, Incomplete, None]: ...
27
+ def strategy_independent_set(G: Graph[_Node], colors: Unused) -> Generator[Incomplete, Incomplete, None]: ...
28
28
  @_dispatchable
29
- def strategy_connected_sequential_bfs(G, colors): ...
29
+ def strategy_connected_sequential_bfs(G: Graph[_Node], colors): ...
30
30
  @_dispatchable
31
- def strategy_connected_sequential_dfs(G, colors): ...
31
+ def strategy_connected_sequential_dfs(G: Graph[_Node], colors): ...
32
32
  @_dispatchable
33
- def strategy_connected_sequential(G, colors, traversal: str = "bfs") -> Generator[Incomplete, None, None]: ...
33
+ def strategy_connected_sequential(
34
+ G: Graph[_Node], colors: Unused, traversal: str = "bfs"
35
+ ) -> Generator[Incomplete, None, None]: ...
34
36
  @_dispatchable
35
- def strategy_saturation_largest_first(G, colors) -> Generator[Incomplete, None, Incomplete]: ...
37
+ def strategy_saturation_largest_first(G: Graph[_Node], colors) -> Generator[Incomplete, None, Incomplete]: ...
36
38
 
37
39
  STRATEGIES: Final[dict[str, Callable[..., Incomplete]]]
38
40
 
@@ -9,7 +9,7 @@ from numpy.random import RandomState
9
9
  __all__ = ["label_propagation_communities", "asyn_lpa_communities", "fast_label_propagation_communities"]
10
10
 
11
11
  @_dispatchable
12
- def fast_label_propagation_communities(G, *, weight=None, seed=None) -> Generator[Incomplete]: ...
12
+ def fast_label_propagation_communities(G: Graph[_Node], *, weight=None, seed=None) -> Generator[Incomplete]: ...
13
13
  @_dispatchable
14
14
  def asyn_lpa_communities(
15
15
  G: Graph[_Node], weight: str | None = None, seed: int | RandomState | None = None
@@ -6,7 +6,7 @@ from networkx.utils.decorators import argmap
6
6
  __all__ = ["modularity", "partition_quality"]
7
7
 
8
8
  class NotAPartition(NetworkXError):
9
- def __init__(self, G, collection) -> None: ...
9
+ def __init__(self, G: Graph[_Node], collection) -> None: ...
10
10
 
11
11
  require_partition: argmap
12
12
 
@@ -18,7 +18,7 @@ class EdgeComponentAuxGraph:
18
18
  H: Incomplete
19
19
 
20
20
  @classmethod
21
- def construct(cls, G): ...
21
+ def construct(cls, G: Graph[_Node]): ...
22
22
  def k_edge_components(self, k: int) -> Generator[Incomplete, Incomplete, None]: ...
23
23
  def k_edge_subgraphs(self, k: int) -> Generator[Incomplete, Incomplete, None]: ...
24
24
 
@@ -1,8 +1,9 @@
1
+ from networkx.classes.graph import Graph, _Node
1
2
  from networkx.utils.backends import _dispatchable
2
3
 
3
4
  __all__ = ["build_auxiliary_node_connectivity", "build_auxiliary_edge_connectivity"]
4
5
 
5
6
  @_dispatchable
6
- def build_auxiliary_node_connectivity(G): ...
7
+ def build_auxiliary_node_connectivity(G: Graph[_Node]): ...
7
8
  @_dispatchable
8
- def build_auxiliary_edge_connectivity(G): ...
9
+ def build_auxiliary_edge_connectivity(G: Graph[_Node]): ...
@@ -9,7 +9,7 @@ __all__ = ["is_d_separator", "is_minimal_d_separator", "find_minimal_d_separator
9
9
  @_dispatchable
10
10
  def is_d_separator(G: DiGraph[_Node], x: _Node | set[_Node], y: _Node | set[_Node], z: _Node | set[_Node]) -> bool: ...
11
11
  @_dispatchable
12
- def find_minimal_d_separator(G, x, y, *, included=None, restricted=None) -> set[Incomplete] | None: ...
12
+ def find_minimal_d_separator(G: DiGraph[_Node], x, y, *, included=None, restricted=None) -> set[Incomplete] | None: ...
13
13
  @_dispatchable
14
14
  def is_minimal_d_separator(
15
15
  G: DiGraph[_Node],
@@ -60,6 +60,6 @@ def dag_longest_path(
60
60
  @_dispatchable
61
61
  def dag_longest_path_length(G: DiGraph[_Node], weight: str | None = "weight", default_weight: int | None = 1) -> int: ...
62
62
  @_dispatchable
63
- def dag_to_branching(G: Graph[_Node]) -> DiGraph[_Node]: ...
63
+ def dag_to_branching(G: DiGraph[_Node]) -> DiGraph[_Node]: ...
64
64
  @_dispatchable
65
- def compute_v_structures(G) -> Generator[tuple[Incomplete, Incomplete, Incomplete]]: ...
65
+ def compute_v_structures(G: DiGraph[_Node]) -> Generator[tuple[Incomplete, Incomplete, Incomplete]]: ...