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.
- package/dist/pyright-langserver.js +1 -1
- package/dist/pyright-langserver.js.map +1 -1
- package/dist/pyright.js +1 -1
- package/dist/pyright.js.map +1 -1
- package/dist/typeshed-fallback/commit.txt +1 -1
- package/dist/typeshed-fallback/stdlib/_csv.pyi +4 -3
- package/dist/typeshed-fallback/stdlib/_frozen_importlib.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/_frozen_importlib_external.pyi +5 -5
- package/dist/typeshed-fallback/stdlib/_typeshed/__init__.pyi +3 -0
- package/dist/typeshed-fallback/stdlib/ast.pyi +29 -10
- package/dist/typeshed-fallback/stdlib/builtins.pyi +79 -62
- package/dist/typeshed-fallback/stdlib/cmath.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/copy.pyi +6 -6
- package/dist/typeshed-fallback/stdlib/ctypes/__init__.pyi +2 -2
- package/dist/typeshed-fallback/stdlib/email/headerregistry.pyi +1 -1
- package/dist/typeshed-fallback/stdlib/html/parser.pyi +4 -9
- package/dist/typeshed-fallback/stdlib/importlib/abc.pyi +3 -3
- package/dist/typeshed-fallback/stdlib/importlib/resources/__init__.pyi +6 -2
- package/dist/typeshed-fallback/stdlib/importlib/resources/_functional.pyi +2 -1
- package/dist/typeshed-fallback/stdlib/operator.pyi +4 -2
- package/dist/typeshed-fallback/stdlib/pdb.pyi +5 -0
- package/dist/typeshed-fallback/stdlib/tkinter/__init__.pyi +160 -69
- package/dist/typeshed-fallback/stdlib/turtle.pyi +18 -14
- package/dist/typeshed-fallback/stdlib/types.pyi +21 -16
- package/dist/typeshed-fallback/stdlib/typing.pyi +12 -2
- package/dist/typeshed-fallback/stdlib/typing_extensions.pyi +2 -1
- package/dist/typeshed-fallback/stdlib/xml/etree/ElementTree.pyi +15 -15
- package/dist/typeshed-fallback/stdlib/xxlimited.pyi +16 -3
- package/dist/typeshed-fallback/stubs/Authlib/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7515/jws.pyi +3 -2
- package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7516/models.pyi +2 -2
- package/dist/typeshed-fallback/stubs/Authlib/authlib/jose/rfc7518/jwe_zips.pyi +7 -2
- package/dist/typeshed-fallback/stubs/Authlib/authlib/oauth2/rfc7591/endpoint.pyi +6 -4
- package/dist/typeshed-fallback/stubs/Jetson.GPIO/Jetson/GPIO/constants.pyi +22 -0
- package/dist/typeshed-fallback/stubs/Jetson.GPIO/Jetson/GPIO/gpio.pyi +2 -21
- package/dist/typeshed-fallback/stubs/Jetson.GPIO/Jetson/GPIO/gpio_cdev.pyi +11 -0
- package/dist/typeshed-fallback/stubs/Jetson.GPIO/Jetson/GPIO/gpio_pin_data.pyi +22 -3
- package/dist/typeshed-fallback/stubs/Jetson.GPIO/Jetson/GPIO/gpio_pinmux_lookup.pyi +6 -0
- package/dist/typeshed-fallback/stubs/Jetson.GPIO/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/PySocks/sockshandler.pyi +0 -5
- package/dist/typeshed-fallback/stubs/aiofiles/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/aiofiles/aiofiles/base.pyi +2 -0
- package/dist/typeshed-fallback/stubs/aiofiles/aiofiles/os.pyi +1 -1
- package/dist/typeshed-fallback/stubs/aiofiles/aiofiles/ospath.pyi +15 -4
- package/dist/typeshed-fallback/stubs/braintree/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/braintree/braintree/__init__.pyi +11 -0
- package/dist/typeshed-fallback/stubs/braintree/braintree/bank_account_instant_verification_gateway.pyi +13 -0
- package/dist/typeshed-fallback/stubs/braintree/braintree/bank_account_instant_verification_jwt.pyi +8 -0
- package/dist/typeshed-fallback/stubs/braintree/braintree/bank_account_instant_verification_jwt_request.pyi +18 -0
- package/dist/typeshed-fallback/stubs/braintree/braintree/braintree_gateway.pyi +4 -3
- package/dist/typeshed-fallback/stubs/braintree/braintree/error_codes.pyi +2 -0
- package/dist/typeshed-fallback/stubs/braintree/braintree/receiver.pyi +6 -0
- package/dist/typeshed-fallback/stubs/braintree/braintree/sender.pyi +6 -0
- package/dist/typeshed-fallback/stubs/braintree/braintree/transaction_us_bank_account_request.pyi +17 -0
- package/dist/typeshed-fallback/stubs/braintree/braintree/transfer.pyi +4 -0
- package/dist/typeshed-fallback/stubs/braintree/braintree/us_bank_account_verification.pyi +1 -0
- package/dist/typeshed-fallback/stubs/cachetools/cachetools/__init__.pyi +36 -5
- package/dist/typeshed-fallback/stubs/cachetools/cachetools/func.pyi +45 -10
- package/dist/typeshed-fallback/stubs/cachetools/cachetools/keys.pyi +2 -2
- package/dist/typeshed-fallback/stubs/django-filter/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/django-filter/django_filters/filters.pyi +1 -1
- package/dist/typeshed-fallback/stubs/docker/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/docker/docker/api/image.pyi +2 -2
- package/dist/typeshed-fallback/stubs/docker/docker/api/swarm.pyi +12 -9
- package/dist/typeshed-fallback/stubs/docker/docker/credentials/store.pyi +3 -3
- package/dist/typeshed-fallback/stubs/docker/docker/errors.pyi +9 -7
- package/dist/typeshed-fallback/stubs/docker/docker/models/services.pyi +4 -6
- package/dist/typeshed-fallback/stubs/docker/docker/transport/npipeconn.pyi +16 -16
- package/dist/typeshed-fallback/stubs/docker/docker/transport/npipesocket.pyi +40 -32
- package/dist/typeshed-fallback/stubs/docker/docker/transport/sshconn.pyi +30 -24
- package/dist/typeshed-fallback/stubs/docker/docker/transport/unixconn.pyi +22 -19
- package/dist/typeshed-fallback/stubs/docker/docker/types/networks.pyi +1 -1
- package/dist/typeshed-fallback/stubs/docker/docker/types/services.pyi +16 -10
- package/dist/typeshed-fallback/stubs/docker/docker/types/swarm.pyi +2 -7
- package/dist/typeshed-fallback/stubs/docker/docker/utils/decorators.pyi +8 -4
- package/dist/typeshed-fallback/stubs/docker/docker/utils/utils.pyi +4 -4
- package/dist/typeshed-fallback/stubs/docutils/docutils/nodes.pyi +2 -2
- package/dist/typeshed-fallback/stubs/flake8-rst-docstrings/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/flake8-typing-imports/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/grpcio/grpc/__init__.pyi +32 -34
- package/dist/typeshed-fallback/stubs/grpcio/grpc/aio/__init__.pyi +40 -21
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/app/base.pyi +0 -3
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/app/wsgiapp.pyi +0 -4
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/config.pyi +1 -2
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/glogging.pyi +1 -2
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/http/message.pyi +0 -3
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/http/unreader.pyi +0 -3
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/http/wsgi.pyi +0 -2
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/instrument/statsd.pyi +0 -9
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/reloader.pyi +1 -3
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/sock.pyi +0 -3
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/workers/geventlet.pyi +1 -8
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/workers/ggevent.pyi +0 -9
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/workers/gtornado.pyi +1 -4
- package/dist/typeshed-fallback/stubs/gunicorn/gunicorn/workers/sync.pyi +0 -3
- package/dist/typeshed-fallback/stubs/html5lib/html5lib/html5parser.pyi +5 -5
- package/dist/typeshed-fallback/stubs/jsonschema/jsonschema/exceptions.pyi +1 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/bipartite/edgelist.pyi +4 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/centrality/flow_matrix.pyi +2 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/chordal.pyi +1 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/clique.pyi +2 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/coloring/greedy_coloring.pyi +11 -9
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/community/label_propagation.pyi +1 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/community/quality.pyi +1 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/edge_kcomponents.pyi +1 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/connectivity/utils.pyi +3 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/d_separation.pyi +1 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/dag.pyi +2 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/efficiency_measures.pyi +4 -4
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/networksimplex.pyi +3 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/flow/utils.pyi +10 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/hierarchy.pyi +3 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/operators/binary.pyi +1 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/operators/product.pyi +1 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/planarity.pyi +1 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/branchings.pyi +2 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/decomposition.pyi +2 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/tree/mst.pyi +3 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/algorithms/wiener.pyi +2 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/classes/function.pyi +26 -19
- package/dist/typeshed-fallback/stubs/networkx/networkx/convert_matrix.pyi +1 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/generators/ego.pyi +2 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/generators/geometric.pyi +2 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/generators/line.pyi +3 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/generators/mycielski.pyi +2 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/generators/spectral_graph_forge.pyi +2 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/generators/stochastic.pyi +3 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/adjlist.pyi +3 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/edgelist.pyi +8 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/gexf.pyi +9 -8
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/gml.pyi +3 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/graph6.pyi +2 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/graphml.pyi +10 -9
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/json_graph/adjacency.pyi +2 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/json_graph/cytoscape.pyi +2 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/json_graph/node_link.pyi +22 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/json_graph/tree.pyi +3 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/multiline_adjlist.pyi +3 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/p2g.pyi +3 -3
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/pajek.pyi +3 -2
- package/dist/typeshed-fallback/stubs/networkx/networkx/readwrite/sparse6.pyi +3 -4
- package/dist/typeshed-fallback/stubs/networkx/networkx/utils/backends.pyi +1 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/utils/misc.pyi +2 -1
- package/dist/typeshed-fallback/stubs/networkx/networkx/utils/rcm.pyi +2 -2
- package/dist/typeshed-fallback/stubs/psutil/psutil/__init__.pyi +11 -4
- package/dist/typeshed-fallback/stubs/psycopg2/METADATA.toml +1 -1
- package/dist/typeshed-fallback/stubs/psycopg2/psycopg2/errorcodes.pyi +3 -0
- package/dist/typeshed-fallback/stubs/pyserial/serial/rfc2217.pyi +2 -2
- package/dist/typeshed-fallback/stubs/pyserial/serial/serialutil.pyi +1 -1
- package/dist/typeshed-fallback/stubs/pyserial/serial/tools/list_ports.pyi +3 -1
- package/dist/typeshed-fallback/stubs/pyserial/serial/tools/list_ports_windows.pyi +1 -1
- package/dist/typeshed-fallback/stubs/pyserial/serial/urlhandler/protocol_spy.pyi +2 -2
- package/dist/typeshed-fallback/stubs/python-dateutil/dateutil/rrule.pyi +30 -1
- package/dist/typeshed-fallback/stubs/pywin32/win32/win32pipe.pyi +1 -1
- package/dist/typeshed-fallback/stubs/six/six/__init__.pyi +1 -1
- package/dist/typeshed-fallback/stubs/www-authenticate/METADATA.toml +2 -0
- package/dist/typeshed-fallback/stubs/www-authenticate/www_authenticate.pyi +34 -0
- package/dist/typeshed-fallback/stubs/xlrd/xlrd/sheet.pyi +5 -5
- package/dist/typeshed-fallback/stubs/xmldiff/METADATA.toml +2 -0
- package/dist/typeshed-fallback/stubs/xmldiff/xmldiff/__init__.pyi +0 -0
- package/dist/typeshed-fallback/stubs/xmldiff/xmldiff/actions.pyi +58 -0
- package/dist/typeshed-fallback/stubs/xmldiff/xmldiff/diff.pyi +36 -0
- package/dist/typeshed-fallback/stubs/xmldiff/xmldiff/diff_match_patch.pyi +58 -0
- package/dist/typeshed-fallback/stubs/xmldiff/xmldiff/formatting.pyi +80 -0
- package/dist/typeshed-fallback/stubs/xmldiff/xmldiff/main.pyi +70 -0
- package/dist/typeshed-fallback/stubs/xmldiff/xmldiff/patch.pyi +12 -0
- package/dist/typeshed-fallback/stubs/xmldiff/xmldiff/utils.pyi +16 -0
- package/dist/typeshed-fallback/stubs/yt-dlp/yt_dlp/extractor/common.pyi +48 -32
- package/dist/typeshed-fallback/stubs/yt-dlp/yt_dlp/extractor/commonmistakes.pyi +5 -3
- package/dist/typeshed-fallback/stubs/yt-dlp/yt_dlp/extractor/commonprotocols.pyi +5 -3
- package/package.json +1 -1
|
@@ -221,16 +221,20 @@ class Terminator(Exception): ...
|
|
|
221
221
|
class TurtleGraphicsError(Exception): ...
|
|
222
222
|
|
|
223
223
|
class Shape:
|
|
224
|
-
def __init__(
|
|
224
|
+
def __init__(
|
|
225
|
+
self, type_: Literal["polygon", "image", "compound"], data: _PolygonCoords | PhotoImage | None = None
|
|
226
|
+
) -> None: ...
|
|
225
227
|
def addcomponent(self, poly: _PolygonCoords, fill: _Color, outline: _Color | None = None) -> None: ...
|
|
226
228
|
|
|
227
229
|
class TurtleScreen(TurtleScreenBase):
|
|
228
|
-
def __init__(
|
|
230
|
+
def __init__(
|
|
231
|
+
self, cv: Canvas, mode: Literal["standard", "logo", "world"] = "standard", colormode: float = 1.0, delay: int = 10
|
|
232
|
+
) -> None: ...
|
|
229
233
|
def clear(self) -> None: ...
|
|
230
234
|
@overload
|
|
231
235
|
def mode(self, mode: None = None) -> str: ...
|
|
232
236
|
@overload
|
|
233
|
-
def mode(self, mode:
|
|
237
|
+
def mode(self, mode: Literal["standard", "logo", "world"]) -> None: ...
|
|
234
238
|
def setworldcoordinates(self, llx: float, lly: float, urx: float, ury: float) -> None: ...
|
|
235
239
|
def register_shape(self, name: str, shape: _PolygonCoords | Shape | None = None) -> None: ...
|
|
236
240
|
@overload
|
|
@@ -262,7 +266,7 @@ class TurtleScreen(TurtleScreenBase):
|
|
|
262
266
|
def window_height(self) -> int: ...
|
|
263
267
|
def getcanvas(self) -> Canvas: ...
|
|
264
268
|
def getshapes(self) -> list[str]: ...
|
|
265
|
-
def onclick(self, fun: Callable[[float, float], object], btn: int = 1, add:
|
|
269
|
+
def onclick(self, fun: Callable[[float, float], object], btn: int = 1, add: bool | None = None) -> None: ...
|
|
266
270
|
def onkey(self, fun: Callable[[], object], key: str) -> None: ...
|
|
267
271
|
def listen(self, xdummy: float | None = None, ydummy: float | None = None) -> None: ...
|
|
268
272
|
def ontimer(self, fun: Callable[[], object], t: int = 0) -> None: ...
|
|
@@ -289,7 +293,7 @@ class TNavigator:
|
|
|
289
293
|
DEFAULT_MODE: str
|
|
290
294
|
DEFAULT_ANGLEOFFSET: int
|
|
291
295
|
DEFAULT_ANGLEORIENT: int
|
|
292
|
-
def __init__(self, mode:
|
|
296
|
+
def __init__(self, mode: Literal["standard", "logo", "world"] = "standard") -> None: ...
|
|
293
297
|
def reset(self) -> None: ...
|
|
294
298
|
def degrees(self, fullcircle: float = 360.0) -> None: ...
|
|
295
299
|
def radians(self) -> None: ...
|
|
@@ -333,11 +337,11 @@ class TNavigator:
|
|
|
333
337
|
seth = setheading
|
|
334
338
|
|
|
335
339
|
class TPen:
|
|
336
|
-
def __init__(self, resizemode:
|
|
340
|
+
def __init__(self, resizemode: Literal["auto", "user", "noresize"] = "noresize") -> None: ...
|
|
337
341
|
@overload
|
|
338
342
|
def resizemode(self, rmode: None = None) -> str: ...
|
|
339
343
|
@overload
|
|
340
|
-
def resizemode(self, rmode:
|
|
344
|
+
def resizemode(self, rmode: Literal["auto", "user", "noresize"]) -> None: ...
|
|
341
345
|
@overload
|
|
342
346
|
def pensize(self, width: None = None) -> int: ...
|
|
343
347
|
@overload
|
|
@@ -389,7 +393,7 @@ class TPen:
|
|
|
389
393
|
fillcolor: _Color = ...,
|
|
390
394
|
pensize: int = ...,
|
|
391
395
|
speed: int = ...,
|
|
392
|
-
resizemode:
|
|
396
|
+
resizemode: Literal["auto", "user", "noresize"] = ...,
|
|
393
397
|
stretchfactor: tuple[float, float] = ...,
|
|
394
398
|
outline: int = ...,
|
|
395
399
|
tilt: float = ...,
|
|
@@ -524,7 +528,7 @@ def clear() -> None: ...
|
|
|
524
528
|
@overload
|
|
525
529
|
def mode(mode: None = None) -> str: ...
|
|
526
530
|
@overload
|
|
527
|
-
def mode(mode:
|
|
531
|
+
def mode(mode: Literal["standard", "logo", "world"]) -> None: ...
|
|
528
532
|
def setworldcoordinates(llx: float, lly: float, urx: float, ury: float) -> None: ...
|
|
529
533
|
def register_shape(name: str, shape: _PolygonCoords | Shape | None = None) -> None: ...
|
|
530
534
|
@overload
|
|
@@ -557,7 +561,7 @@ def window_width() -> int: ...
|
|
|
557
561
|
def window_height() -> int: ...
|
|
558
562
|
def getcanvas() -> Canvas: ...
|
|
559
563
|
def getshapes() -> list[str]: ...
|
|
560
|
-
def onclick(fun: Callable[[float, float], object], btn: int = 1, add:
|
|
564
|
+
def onclick(fun: Callable[[float, float], object], btn: int = 1, add: bool | None = None) -> None: ...
|
|
561
565
|
def onkey(fun: Callable[[], object], key: str) -> None: ...
|
|
562
566
|
def listen(xdummy: float | None = None, ydummy: float | None = None) -> None: ...
|
|
563
567
|
def ontimer(fun: Callable[[], object], t: int = 0) -> None: ...
|
|
@@ -634,7 +638,7 @@ seth = setheading
|
|
|
634
638
|
@overload
|
|
635
639
|
def resizemode(rmode: None = None) -> str: ...
|
|
636
640
|
@overload
|
|
637
|
-
def resizemode(rmode:
|
|
641
|
+
def resizemode(rmode: Literal["auto", "user", "noresize"]) -> None: ...
|
|
638
642
|
@overload
|
|
639
643
|
def pensize(width: None = None) -> int: ...
|
|
640
644
|
@overload
|
|
@@ -683,7 +687,7 @@ def pen(
|
|
|
683
687
|
fillcolor: _Color = ...,
|
|
684
688
|
pensize: int = ...,
|
|
685
689
|
speed: int = ...,
|
|
686
|
-
resizemode:
|
|
690
|
+
resizemode: Literal["auto", "user", "noresize"] = ...,
|
|
687
691
|
stretchfactor: tuple[float, float] = ...,
|
|
688
692
|
outline: int = ...,
|
|
689
693
|
tilt: float = ...,
|
|
@@ -772,8 +776,8 @@ def getturtle() -> Turtle: ...
|
|
|
772
776
|
|
|
773
777
|
getpen = getturtle
|
|
774
778
|
|
|
775
|
-
def onrelease(fun: Callable[[float, float], object], btn: int = 1, add:
|
|
776
|
-
def ondrag(fun: Callable[[float, float], object], btn: int = 1, add:
|
|
779
|
+
def onrelease(fun: Callable[[float, float], object], btn: int = 1, add: bool | None = None) -> None: ...
|
|
780
|
+
def ondrag(fun: Callable[[float, float], object], btn: int = 1, add: bool | None = None) -> None: ...
|
|
777
781
|
def undo() -> None: ...
|
|
778
782
|
|
|
779
783
|
turtlesize = shapesize
|
|
@@ -65,7 +65,7 @@ if sys.version_info >= (3, 13):
|
|
|
65
65
|
|
|
66
66
|
_T1 = TypeVar("_T1")
|
|
67
67
|
_T2 = TypeVar("_T2")
|
|
68
|
-
|
|
68
|
+
_KT_co = TypeVar("_KT_co", covariant=True)
|
|
69
69
|
_VT_co = TypeVar("_VT_co", covariant=True)
|
|
70
70
|
|
|
71
71
|
# Make sure this class definition stays roughly in line with `builtins.function`
|
|
@@ -338,14 +338,14 @@ class CodeType:
|
|
|
338
338
|
__replace__ = replace
|
|
339
339
|
|
|
340
340
|
@final
|
|
341
|
-
class MappingProxyType(Mapping[
|
|
341
|
+
class MappingProxyType(Mapping[_KT_co, _VT_co]): # type: ignore[type-var] # pyright: ignore[reportInvalidTypeArguments]
|
|
342
342
|
"""Read-only proxy of a mapping."""
|
|
343
343
|
__hash__: ClassVar[None] # type: ignore[assignment]
|
|
344
|
-
def __new__(cls, mapping: SupportsKeysAndGetItem[
|
|
345
|
-
def __getitem__(self, key:
|
|
344
|
+
def __new__(cls, mapping: SupportsKeysAndGetItem[_KT_co, _VT_co]) -> Self: ...
|
|
345
|
+
def __getitem__(self, key: _KT_co, /) -> _VT_co:
|
|
346
346
|
"""Return self[key]."""
|
|
347
347
|
...
|
|
348
|
-
def __iter__(self) -> Iterator[
|
|
348
|
+
def __iter__(self) -> Iterator[_KT_co]:
|
|
349
349
|
"""Implement iter(self)."""
|
|
350
350
|
...
|
|
351
351
|
def __len__(self) -> int:
|
|
@@ -354,40 +354,40 @@ class MappingProxyType(Mapping[_KT, _VT_co]):
|
|
|
354
354
|
def __eq__(self, value: object, /) -> bool:
|
|
355
355
|
"""Return self==value."""
|
|
356
356
|
...
|
|
357
|
-
def copy(self) -> dict[
|
|
357
|
+
def copy(self) -> dict[_KT_co, _VT_co]:
|
|
358
358
|
"""D.copy() -> a shallow copy of D"""
|
|
359
359
|
...
|
|
360
|
-
def keys(self) -> KeysView[
|
|
360
|
+
def keys(self) -> KeysView[_KT_co]:
|
|
361
361
|
"""D.keys() -> a set-like object providing a view on D's keys"""
|
|
362
362
|
...
|
|
363
363
|
def values(self) -> ValuesView[_VT_co]:
|
|
364
364
|
"""D.values() -> an object providing a view on D's values"""
|
|
365
365
|
...
|
|
366
|
-
def items(self) -> ItemsView[
|
|
366
|
+
def items(self) -> ItemsView[_KT_co, _VT_co]:
|
|
367
367
|
"""D.items() -> a set-like object providing a view on D's items"""
|
|
368
368
|
...
|
|
369
369
|
@overload
|
|
370
|
-
def get(self, key:
|
|
370
|
+
def get(self, key: _KT_co, /) -> _VT_co | None:
|
|
371
371
|
"""Return the value for key if key is in the mapping, else default."""
|
|
372
372
|
...
|
|
373
373
|
@overload
|
|
374
|
-
def get(self, key:
|
|
374
|
+
def get(self, key: _KT_co, default: _VT_co, /) -> _VT_co:
|
|
375
375
|
"""Return the value for key if key is in the mapping, else default."""
|
|
376
376
|
...
|
|
377
377
|
@overload
|
|
378
|
-
def get(self, key:
|
|
378
|
+
def get(self, key: _KT_co, default: _T2, /) -> _VT_co | _T2:
|
|
379
379
|
"""Return the value for key if key is in the mapping, else default."""
|
|
380
380
|
...
|
|
381
381
|
def __class_getitem__(cls, item: Any, /) -> GenericAlias:
|
|
382
382
|
"""See PEP 585"""
|
|
383
383
|
...
|
|
384
|
-
def __reversed__(self) -> Iterator[
|
|
384
|
+
def __reversed__(self) -> Iterator[_KT_co]:
|
|
385
385
|
"""D.__reversed__() -> reverse iterator"""
|
|
386
386
|
...
|
|
387
|
-
def __or__(self, value: Mapping[_T1, _T2], /) -> dict[
|
|
387
|
+
def __or__(self, value: Mapping[_T1, _T2], /) -> dict[_KT_co | _T1, _VT_co | _T2]:
|
|
388
388
|
"""Return self|value."""
|
|
389
389
|
...
|
|
390
|
-
def __ror__(self, value: Mapping[_T1, _T2], /) -> dict[
|
|
390
|
+
def __ror__(self, value: Mapping[_T1, _T2], /) -> dict[_KT_co | _T1, _VT_co | _T2]:
|
|
391
391
|
"""Return value|self."""
|
|
392
392
|
...
|
|
393
393
|
|
|
@@ -611,8 +611,13 @@ class CoroutineType(Coroutine[_YieldT_co, _SendT_nd_contra, _ReturnT_nd_co]):
|
|
|
611
611
|
...
|
|
612
612
|
@property
|
|
613
613
|
def cr_code(self) -> CodeType: ...
|
|
614
|
-
|
|
615
|
-
|
|
614
|
+
if sys.version_info >= (3, 12):
|
|
615
|
+
@property
|
|
616
|
+
def cr_frame(self) -> FrameType | None: ...
|
|
617
|
+
else:
|
|
618
|
+
@property
|
|
619
|
+
def cr_frame(self) -> FrameType: ...
|
|
620
|
+
|
|
616
621
|
@property
|
|
617
622
|
def cr_running(self) -> bool: ...
|
|
618
623
|
@property
|
|
@@ -1046,6 +1046,7 @@ if sys.version_info >= (3, 11):
|
|
|
1046
1046
|
kw_only_default: bool = False,
|
|
1047
1047
|
frozen_default: bool = False, # on 3.11, runtime accepts it as part of kwargs
|
|
1048
1048
|
field_specifiers: tuple[type[Any] | Callable[..., Any], ...] = (),
|
|
1049
|
+
skip_replace: bool = False,
|
|
1049
1050
|
**kwargs: Any,
|
|
1050
1051
|
) -> IdentityFunction: ...
|
|
1051
1052
|
|
|
@@ -1204,14 +1205,23 @@ if sys.version_info >= (3, 10):
|
|
|
1204
1205
|
def _type_repr(obj: object) -> str: ...
|
|
1205
1206
|
|
|
1206
1207
|
if sys.version_info >= (3, 12):
|
|
1208
|
+
_TypeParameter: typing_extensions.TypeAlias = (
|
|
1209
|
+
TypeVar
|
|
1210
|
+
| typing_extensions.TypeVar
|
|
1211
|
+
| ParamSpec
|
|
1212
|
+
| typing_extensions.ParamSpec
|
|
1213
|
+
| TypeVarTuple
|
|
1214
|
+
| typing_extensions.TypeVarTuple
|
|
1215
|
+
)
|
|
1216
|
+
|
|
1207
1217
|
def override(method: _F, /) -> _F: ...
|
|
1208
1218
|
@final
|
|
1209
1219
|
class TypeAliasType:
|
|
1210
|
-
def __new__(cls, name: str, value: Any, *, type_params: tuple[
|
|
1220
|
+
def __new__(cls, name: str, value: Any, *, type_params: tuple[_TypeParameter, ...] = ()) -> Self: ...
|
|
1211
1221
|
@property
|
|
1212
1222
|
def __value__(self) -> Any: ... # AnnotationForm
|
|
1213
1223
|
@property
|
|
1214
|
-
def __type_params__(self) -> tuple[
|
|
1224
|
+
def __type_params__(self) -> tuple[_TypeParameter, ...]: ...
|
|
1215
1225
|
@property
|
|
1216
1226
|
def __parameters__(self) -> tuple[Any, ...]: ... # AnnotationForm
|
|
1217
1227
|
@property
|
|
@@ -239,7 +239,7 @@ class _TypedDict(Mapping[str, object], metaclass=abc.ABCMeta):
|
|
|
239
239
|
__readonly_keys__: ClassVar[frozenset[str]]
|
|
240
240
|
__mutable_keys__: ClassVar[frozenset[str]]
|
|
241
241
|
# PEP 728
|
|
242
|
-
__closed__: ClassVar[bool]
|
|
242
|
+
__closed__: ClassVar[bool | None]
|
|
243
243
|
__extra_items__: ClassVar[AnnotationForm]
|
|
244
244
|
def copy(self) -> Self: ...
|
|
245
245
|
# Using Never so that only calls using mypy plugin hook that specialize the signature
|
|
@@ -356,6 +356,7 @@ else:
|
|
|
356
356
|
kw_only_default: bool = False,
|
|
357
357
|
frozen_default: bool = False,
|
|
358
358
|
field_specifiers: tuple[type[Any] | Callable[..., Any], ...] = (),
|
|
359
|
+
skip_replace: bool = False,
|
|
359
360
|
**kwargs: object,
|
|
360
361
|
) -> IdentityFunction: ...
|
|
361
362
|
|
|
@@ -93,7 +93,7 @@ class Element(Generic[_Tag]):
|
|
|
93
93
|
def __init__(self, tag: _Tag, attrib: dict[str, str] = {}, **extra: str) -> None: ...
|
|
94
94
|
def append(self, subelement: Element[Any], /) -> None: ...
|
|
95
95
|
def clear(self) -> None: ...
|
|
96
|
-
def extend(self, elements: Iterable[Element], /) -> None: ...
|
|
96
|
+
def extend(self, elements: Iterable[Element[Any]], /) -> None: ...
|
|
97
97
|
def find(self, path: str, namespaces: dict[str, str] | None = None) -> Element | None: ...
|
|
98
98
|
def findall(self, path: str, namespaces: dict[str, str] | None = None) -> list[Element]: ...
|
|
99
99
|
@overload
|
|
@@ -104,7 +104,7 @@ class Element(Generic[_Tag]):
|
|
|
104
104
|
def get(self, key: str, default: None = None) -> str | None: ...
|
|
105
105
|
@overload
|
|
106
106
|
def get(self, key: str, default: _T) -> str | _T: ...
|
|
107
|
-
def insert(self, index: int, subelement: Element, /) -> None: ...
|
|
107
|
+
def insert(self, index: int, subelement: Element[Any], /) -> None: ...
|
|
108
108
|
def items(self) -> ItemsView[str, str]: ...
|
|
109
109
|
def iter(self, tag: str | None = None) -> Generator[Element, None, None]: ...
|
|
110
110
|
@overload
|
|
@@ -115,7 +115,7 @@ class Element(Generic[_Tag]):
|
|
|
115
115
|
def keys(self) -> dict_keys[str, str]: ...
|
|
116
116
|
# makeelement returns the type of self in Python impl, but not in C impl
|
|
117
117
|
def makeelement(self, tag: _OtherTag, attrib: dict[str, str], /) -> Element[_OtherTag]: ...
|
|
118
|
-
def remove(self, subelement: Element, /) -> None: ...
|
|
118
|
+
def remove(self, subelement: Element[Any], /) -> None: ...
|
|
119
119
|
def set(self, key: str, value: str, /) -> None: ...
|
|
120
120
|
def __copy__(self) -> Element[_Tag]: ... # returns the type of self in Python impl, but not in C impl
|
|
121
121
|
def __deepcopy__(self, memo: Any, /) -> Element: ... # Only exists in C impl
|
|
@@ -136,11 +136,11 @@ class Element(Generic[_Tag]):
|
|
|
136
136
|
# Doesn't actually exist at runtime, but instance of the class are indeed iterable due to __getitem__.
|
|
137
137
|
def __iter__(self) -> Iterator[Element]: ...
|
|
138
138
|
@overload
|
|
139
|
-
def __setitem__(self, key: SupportsIndex, value: Element, /) -> None:
|
|
139
|
+
def __setitem__(self, key: SupportsIndex, value: Element[Any], /) -> None:
|
|
140
140
|
"""Set self[key] to value."""
|
|
141
141
|
...
|
|
142
142
|
@overload
|
|
143
|
-
def __setitem__(self, key: slice, value: Iterable[Element], /) -> None:
|
|
143
|
+
def __setitem__(self, key: slice, value: Iterable[Element[Any]], /) -> None:
|
|
144
144
|
"""Set self[key] to value."""
|
|
145
145
|
...
|
|
146
146
|
|
|
@@ -150,7 +150,7 @@ class Element(Generic[_Tag]):
|
|
|
150
150
|
"""True if self else False"""
|
|
151
151
|
...
|
|
152
152
|
|
|
153
|
-
def SubElement(parent: Element, tag: str, attrib: dict[str, str] = ..., **extra: str) -> Element: ...
|
|
153
|
+
def SubElement(parent: Element[Any], tag: str, attrib: dict[str, str] = ..., **extra: str) -> Element: ...
|
|
154
154
|
def Comment(text: str | None = None) -> Element[_ElementCallable]: ...
|
|
155
155
|
def ProcessingInstruction(target: str, text: str | None = None) -> Element[_ElementCallable]: ...
|
|
156
156
|
|
|
@@ -169,7 +169,7 @@ class QName:
|
|
|
169
169
|
_Root = TypeVar("_Root", Element, Element | None, default=Element | None)
|
|
170
170
|
|
|
171
171
|
class ElementTree(Generic[_Root]):
|
|
172
|
-
def __init__(self, element: Element | None = None, file: _FileRead | None = None) -> None: ...
|
|
172
|
+
def __init__(self, element: Element[Any] | None = None, file: _FileRead | None = None) -> None: ...
|
|
173
173
|
def getroot(self) -> _Root: ...
|
|
174
174
|
def parse(self, source: _FileRead, parser: XMLParser | None = None) -> Element: ...
|
|
175
175
|
def iter(self, tag: str | None = None) -> Generator[Element, None, None]: ...
|
|
@@ -200,7 +200,7 @@ HTML_EMPTY: Final[set[str]]
|
|
|
200
200
|
def register_namespace(prefix: str, uri: str) -> None: ...
|
|
201
201
|
@overload
|
|
202
202
|
def tostring(
|
|
203
|
-
element: Element,
|
|
203
|
+
element: Element[Any],
|
|
204
204
|
encoding: None = None,
|
|
205
205
|
method: Literal["xml", "html", "text", "c14n"] | None = None,
|
|
206
206
|
*,
|
|
@@ -210,7 +210,7 @@ def tostring(
|
|
|
210
210
|
) -> bytes: ...
|
|
211
211
|
@overload
|
|
212
212
|
def tostring(
|
|
213
|
-
element: Element,
|
|
213
|
+
element: Element[Any],
|
|
214
214
|
encoding: Literal["unicode"],
|
|
215
215
|
method: Literal["xml", "html", "text", "c14n"] | None = None,
|
|
216
216
|
*,
|
|
@@ -220,7 +220,7 @@ def tostring(
|
|
|
220
220
|
) -> str: ...
|
|
221
221
|
@overload
|
|
222
222
|
def tostring(
|
|
223
|
-
element: Element,
|
|
223
|
+
element: Element[Any],
|
|
224
224
|
encoding: str,
|
|
225
225
|
method: Literal["xml", "html", "text", "c14n"] | None = None,
|
|
226
226
|
*,
|
|
@@ -230,7 +230,7 @@ def tostring(
|
|
|
230
230
|
) -> Any: ...
|
|
231
231
|
@overload
|
|
232
232
|
def tostringlist(
|
|
233
|
-
element: Element,
|
|
233
|
+
element: Element[Any],
|
|
234
234
|
encoding: None = None,
|
|
235
235
|
method: Literal["xml", "html", "text", "c14n"] | None = None,
|
|
236
236
|
*,
|
|
@@ -240,7 +240,7 @@ def tostringlist(
|
|
|
240
240
|
) -> list[bytes]: ...
|
|
241
241
|
@overload
|
|
242
242
|
def tostringlist(
|
|
243
|
-
element: Element,
|
|
243
|
+
element: Element[Any],
|
|
244
244
|
encoding: Literal["unicode"],
|
|
245
245
|
method: Literal["xml", "html", "text", "c14n"] | None = None,
|
|
246
246
|
*,
|
|
@@ -250,7 +250,7 @@ def tostringlist(
|
|
|
250
250
|
) -> list[str]: ...
|
|
251
251
|
@overload
|
|
252
252
|
def tostringlist(
|
|
253
|
-
element: Element,
|
|
253
|
+
element: Element[Any],
|
|
254
254
|
encoding: str,
|
|
255
255
|
method: Literal["xml", "html", "text", "c14n"] | None = None,
|
|
256
256
|
*,
|
|
@@ -258,8 +258,8 @@ def tostringlist(
|
|
|
258
258
|
default_namespace: str | None = None,
|
|
259
259
|
short_empty_elements: bool = True,
|
|
260
260
|
) -> list[Any]: ...
|
|
261
|
-
def dump(elem: Element | ElementTree[Any]) -> None: ...
|
|
262
|
-
def indent(tree: Element | ElementTree[Any], space: str = " ", level: int = 0) -> None: ...
|
|
261
|
+
def dump(elem: Element[Any] | ElementTree[Any]) -> None: ...
|
|
262
|
+
def indent(tree: Element[Any] | ElementTree[Any], space: str = " ", level: int = 0) -> None: ...
|
|
263
263
|
def parse(source: _FileRead, parser: XMLParser[Any] | None = None) -> ElementTree[Element]: ...
|
|
264
264
|
|
|
265
265
|
# This class is defined inside the body of iterparse
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
"""This is a template module just for instruction."""
|
|
2
|
+
|
|
1
3
|
import sys
|
|
2
4
|
from typing import Any, ClassVar, final
|
|
3
5
|
|
|
@@ -5,12 +7,23 @@ class Str(str): ...
|
|
|
5
7
|
|
|
6
8
|
@final
|
|
7
9
|
class Xxo:
|
|
8
|
-
|
|
10
|
+
"""A class that explicitly stores attributes in an internal dict"""
|
|
11
|
+
def demo(self) -> None:
|
|
12
|
+
"""demo(o) -> o"""
|
|
13
|
+
...
|
|
9
14
|
if sys.version_info >= (3, 11) and sys.platform != "win32":
|
|
10
15
|
x_exports: int
|
|
11
16
|
|
|
12
|
-
def foo(i: int, j: int, /) -> Any:
|
|
13
|
-
|
|
17
|
+
def foo(i: int, j: int, /) -> Any:
|
|
18
|
+
"""
|
|
19
|
+
foo(i,j)
|
|
20
|
+
|
|
21
|
+
Return the sum of i and j.
|
|
22
|
+
"""
|
|
23
|
+
...
|
|
24
|
+
def new() -> Xxo:
|
|
25
|
+
"""new() -> new Xx object"""
|
|
26
|
+
...
|
|
14
27
|
|
|
15
28
|
if sys.version_info >= (3, 10):
|
|
16
29
|
class Error(Exception): ...
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
from _typeshed import Incomplete
|
|
2
2
|
|
|
3
3
|
class JsonWebSignature:
|
|
4
|
-
REGISTERED_HEADER_PARAMETER_NAMES:
|
|
5
|
-
|
|
4
|
+
REGISTERED_HEADER_PARAMETER_NAMES: frozenset[str]
|
|
5
|
+
MAX_CONTENT_LENGTH: int
|
|
6
|
+
ALGORITHMS_REGISTRY: dict[str, Incomplete]
|
|
6
7
|
def __init__(self, algorithms=None, private_headers=None) -> None: ...
|
|
7
8
|
@classmethod
|
|
8
9
|
def register_algorithm(cls, algorithm) -> None: ...
|
|
@@ -40,8 +40,8 @@ class JWEZipAlgorithm:
|
|
|
40
40
|
description: Incomplete
|
|
41
41
|
algorithm_type: str
|
|
42
42
|
algorithm_location: str
|
|
43
|
-
def compress(self, s) -> None: ...
|
|
44
|
-
def decompress(self, s) -> None: ...
|
|
43
|
+
def compress(self, s: bytes) -> bytes | None: ...
|
|
44
|
+
def decompress(self, s: bytes) -> bytes | None: ...
|
|
45
45
|
|
|
46
46
|
class JWESharedHeader(dict[str, object]):
|
|
47
47
|
protected: Incomplete
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
+
from typing import Final
|
|
2
|
+
|
|
1
3
|
from authlib.jose.rfc7516 import JWEZipAlgorithm
|
|
2
4
|
|
|
5
|
+
GZIP_HEAD: Final[bytes]
|
|
6
|
+
MAX_SIZE: Final = 256000
|
|
7
|
+
|
|
3
8
|
class DeflateZipAlgorithm(JWEZipAlgorithm):
|
|
4
9
|
name: str
|
|
5
10
|
description: str
|
|
6
|
-
def compress(self, s): ...
|
|
7
|
-
def decompress(self, s): ...
|
|
11
|
+
def compress(self, s: bytes) -> bytes: ...
|
|
12
|
+
def decompress(self, s: bytes) -> bytes: ...
|
|
8
13
|
|
|
9
14
|
def register_jwe_rfc7518() -> None: ...
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
from _typeshed import Incomplete
|
|
2
2
|
from typing import Final
|
|
3
3
|
|
|
4
|
+
from authlib.jose import JWTClaims
|
|
5
|
+
|
|
4
6
|
class ClientRegistrationEndpoint:
|
|
5
7
|
ENDPOINT_NAME: Final = "client_registration"
|
|
6
8
|
software_statement_alg_values_supported: Incomplete
|
|
@@ -10,12 +12,12 @@ class ClientRegistrationEndpoint:
|
|
|
10
12
|
def __call__(self, request) -> dict[Incomplete, Incomplete]: ...
|
|
11
13
|
def create_registration_response(self, request): ...
|
|
12
14
|
def extract_client_metadata(self, request): ...
|
|
13
|
-
def extract_software_statement(self, software_statement, request): ...
|
|
14
|
-
def generate_client_info(self): ...
|
|
15
|
+
def extract_software_statement(self, software_statement, request) -> JWTClaims: ...
|
|
16
|
+
def generate_client_info(self, request) -> dict[str, Incomplete]: ...
|
|
15
17
|
def generate_client_registration_info(self, client, request) -> None: ...
|
|
16
18
|
def create_endpoint_request(self, request): ...
|
|
17
|
-
def generate_client_id(self): ...
|
|
18
|
-
def generate_client_secret(self): ...
|
|
19
|
+
def generate_client_id(self, request) -> str: ...
|
|
20
|
+
def generate_client_secret(self, request) -> str: ...
|
|
19
21
|
def get_server_metadata(self) -> None: ...
|
|
20
22
|
def authenticate_token(self, request) -> None: ...
|
|
21
23
|
def resolve_public_key(self, request) -> None: ...
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
from typing import Final
|
|
2
|
+
|
|
3
|
+
BOARD: Final = 10
|
|
4
|
+
BCM: Final = 11
|
|
5
|
+
TEGRA_SOC: Final = 1000
|
|
6
|
+
CVM: Final = 1001
|
|
7
|
+
|
|
8
|
+
PUD_OFF: Final = 20
|
|
9
|
+
PUD_DOWN: Final = 21
|
|
10
|
+
PUD_UP: Final = 22
|
|
11
|
+
|
|
12
|
+
HIGH: Final = 1
|
|
13
|
+
LOW: Final = 0
|
|
14
|
+
|
|
15
|
+
RISING: Final = 31
|
|
16
|
+
FALLING: Final = 32
|
|
17
|
+
BOTH: Final = 33
|
|
18
|
+
|
|
19
|
+
UNKNOWN: Final = -1
|
|
20
|
+
OUT: Final = 0
|
|
21
|
+
IN: Final = 1
|
|
22
|
+
HARD_PWM: Final = 43
|
|
@@ -1,26 +1,7 @@
|
|
|
1
1
|
from collections.abc import Callable, Sequence
|
|
2
|
-
from typing import
|
|
2
|
+
from typing import Literal
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
BCM: Final = 11
|
|
6
|
-
TEGRA_SOC: Final = 1000
|
|
7
|
-
CVM: Final = 1001
|
|
8
|
-
|
|
9
|
-
PUD_OFF: Final = 20
|
|
10
|
-
PUD_DOWN: Final = 21
|
|
11
|
-
PUD_UP: Final = 22
|
|
12
|
-
|
|
13
|
-
HIGH: Final = 1
|
|
14
|
-
LOW: Final = 0
|
|
15
|
-
|
|
16
|
-
RISING: Final = 31
|
|
17
|
-
FALLING: Final = 32
|
|
18
|
-
BOTH: Final = 33
|
|
19
|
-
|
|
20
|
-
UNKNOWN: Final = -1
|
|
21
|
-
OUT: Final = 0
|
|
22
|
-
IN: Final = 1
|
|
23
|
-
HARD_PWM: Final = 43
|
|
4
|
+
from .constants import *
|
|
24
5
|
|
|
25
6
|
model = ...
|
|
26
7
|
JETSON_INFO = ...
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import ctypes
|
|
2
|
+
from dataclasses import dataclass
|
|
2
3
|
from typing import Final, Literal
|
|
3
4
|
|
|
4
5
|
from .gpio_pin_data import ChannelInfo
|
|
@@ -70,3 +71,13 @@ def request_handle(line_offset: int, direction: Literal[0, 1], initial: Literal[
|
|
|
70
71
|
def request_event(line_offset: int, edge: int, consumer: str) -> gpioevent_request: ...
|
|
71
72
|
def get_value(line_handle: int) -> int: ...
|
|
72
73
|
def set_value(line_handle: int, value: int) -> None: ...
|
|
74
|
+
@dataclass
|
|
75
|
+
class PadCtlRegister:
|
|
76
|
+
is_gpio: bool
|
|
77
|
+
is_input: bool
|
|
78
|
+
is_tristate: bool
|
|
79
|
+
def __init__(self, value: int) -> None: ...
|
|
80
|
+
@property
|
|
81
|
+
def is_bidi(self) -> bool: ...
|
|
82
|
+
|
|
83
|
+
def check_pinmux(ch_info: ChannelInfo, direction: int) -> None: ...
|
|
@@ -15,11 +15,11 @@ JETSON_THOR_REFERENCE: Final = "JETSON_THOR_REFERENCE"
|
|
|
15
15
|
|
|
16
16
|
JETSON_MODELS: list[str]
|
|
17
17
|
|
|
18
|
-
JETSON_ORIN_NX_PIN_DEFS: list[tuple[int, str, str, int, int, str, str, str | None, int | None]]
|
|
18
|
+
JETSON_ORIN_NX_PIN_DEFS: list[tuple[int, str, str, int, int, str, str, str | None, int | None, int]]
|
|
19
19
|
compats_jetson_orins_nx: Sequence[str]
|
|
20
20
|
compats_jetson_orins_nano: Sequence[str]
|
|
21
21
|
|
|
22
|
-
JETSON_ORIN_PIN_DEFS: list[tuple[int, str, str, int, int, str, str, str | None, int | None]]
|
|
22
|
+
JETSON_ORIN_PIN_DEFS: list[tuple[int, str, str, int, int, str, str, str | None, int | None, int]]
|
|
23
23
|
compats_jetson_orins: Sequence[str]
|
|
24
24
|
|
|
25
25
|
CLARA_AGX_XAVIER_PIN_DEFS: list[tuple[int, str, str, int, int, str, str, str | None, int | None]]
|
|
@@ -49,8 +49,27 @@ compats_jetson_thor_reference: Sequence[str]
|
|
|
49
49
|
jetson_gpio_data: dict[str, tuple[list[tuple[int, str, str, int, int, str, str, str | None, int | None]], dict[str, Any]]]
|
|
50
50
|
|
|
51
51
|
class ChannelInfo:
|
|
52
|
+
channel: int
|
|
53
|
+
chip_fd: int | None
|
|
54
|
+
line_handle: int | None
|
|
55
|
+
line_offset: int
|
|
56
|
+
direction: int | None
|
|
57
|
+
edge: int | None
|
|
58
|
+
consumer: str
|
|
59
|
+
gpio_name: str
|
|
60
|
+
gpio_chip: str
|
|
61
|
+
pwm_chip_dir: str
|
|
62
|
+
pwm_id: int
|
|
63
|
+
reg_addr: int | None
|
|
52
64
|
def __init__(
|
|
53
|
-
self,
|
|
65
|
+
self,
|
|
66
|
+
channel: int,
|
|
67
|
+
line_offset: int,
|
|
68
|
+
gpio_name: str,
|
|
69
|
+
gpio_chip: str,
|
|
70
|
+
pwm_chip_dir: str,
|
|
71
|
+
pwm_id: int,
|
|
72
|
+
reg_addr: int | None = None,
|
|
54
73
|
) -> None: ...
|
|
55
74
|
|
|
56
75
|
ids_warned: bool
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
version = "
|
|
1
|
+
version = "2.1.12"
|
|
2
2
|
upstream_repository = "https://github.com/NVIDIA/jetson-gpio"
|
|
@@ -4,7 +4,6 @@ import sys
|
|
|
4
4
|
import urllib.request
|
|
5
5
|
from _typeshed import Incomplete, SupportsKeysAndGetItem
|
|
6
6
|
from typing import Any, TypeVar
|
|
7
|
-
from typing_extensions import override
|
|
8
7
|
|
|
9
8
|
import socks
|
|
10
9
|
|
|
@@ -33,7 +32,6 @@ class SocksiPyConnection(http.client.HTTPConnection): # undocumented
|
|
|
33
32
|
source_address: tuple[str, int] | None = None,
|
|
34
33
|
blocksize: int = 8192,
|
|
35
34
|
) -> None: ...
|
|
36
|
-
@override
|
|
37
35
|
def connect(self) -> None: ...
|
|
38
36
|
|
|
39
37
|
class SocksiPyConnectionS(http.client.HTTPSConnection): # undocumented
|
|
@@ -77,7 +75,6 @@ class SocksiPyConnectionS(http.client.HTTPSConnection): # undocumented
|
|
|
77
75
|
blocksize: int = 8192,
|
|
78
76
|
) -> None: ...
|
|
79
77
|
|
|
80
|
-
@override
|
|
81
78
|
def connect(self) -> None: ...
|
|
82
79
|
|
|
83
80
|
class SocksiPyHandler(urllib.request.HTTPHandler, urllib.request.HTTPSHandler):
|
|
@@ -96,7 +93,5 @@ class SocksiPyHandler(urllib.request.HTTPHandler, urllib.request.HTTPSHandler):
|
|
|
96
93
|
blocksize: int = 8192,
|
|
97
94
|
**kwargs: Any, # any additional arguments to `SocksiPyConnection` or `SocksiPyConnectionS`
|
|
98
95
|
) -> None: ...
|
|
99
|
-
@override
|
|
100
96
|
def http_open(self, req: urllib.request.Request) -> http.client.HTTPResponse: ... # undocumented
|
|
101
|
-
@override
|
|
102
97
|
def https_open(self, req: urllib.request.Request) -> http.client.HTTPResponse: ... # undocumented
|
|
@@ -9,6 +9,8 @@ from typing_extensions import Self
|
|
|
9
9
|
_T = TypeVar("_T")
|
|
10
10
|
_V_co = TypeVar("_V_co", covariant=True)
|
|
11
11
|
|
|
12
|
+
def wrap(func: Callable[..., _T]) -> Callable[..., Awaitable[_T]]: ...
|
|
13
|
+
|
|
12
14
|
class AsyncBase(Generic[_T]):
|
|
13
15
|
def __init__(self, file: TextIO | BinaryIO | None, loop: AbstractEventLoop | None, executor: Executor | None) -> None: ...
|
|
14
16
|
def __aiter__(self) -> Self: ...
|