From adf1a5e4e39eb2c3b1875a76ce611ce2c9c83b84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Eertmans?= Date: Thu, 4 Jan 2024 11:13:15 +0100 Subject: [PATCH] chore(docs): fix typos in docstrings Hello! This is a small PR to fix typos in docstrings. Maybe, I would suggest adding an import for `dataclass` in the example (otherwise it will not run), and maybe indicate that it works with other dataclasses decorators, like the `dataclass` decorator from chex. --- jaxtyping/_decorator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jaxtyping/_decorator.py b/jaxtyping/_decorator.py index 59f03db..549d725 100644 --- a/jaxtyping/_decorator.py +++ b/jaxtyping/_decorator.py @@ -83,7 +83,7 @@ def jaxtyped(fn=_sentinel, *, typechecker=_sentinel): @dataclass class MyDataclass: x: int - y: Float[Array "b c"] + y: Float[Array, "b c"] ``` **Arguments:** @@ -476,7 +476,7 @@ class _JaxtypingContext: def _check_dataclass_annotations(self, typechecker): """Creates and calls a function that checks the attributes of `self` - `self` should be a dataclass instancae. `typechecker` should be e.g. + `self` should be a dataclass instance. `typechecker` should be e.g. `beartype.beartype` or `typeguard.typechecked`. """ parameters = [inspect.Parameter("self", inspect.Parameter.POSITIONAL_OR_KEYWORD)]