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.
This commit is contained in:
Jérome Eertmans
2024-01-05 04:36:08 -08:00
committed by Patrick Kidger
parent 272be74e01
commit adf1a5e4e3
+2 -2
View File
@@ -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)]