Skip to content

Commit

Permalink
add jaxtyping to mypy
Browse files Browse the repository at this point in the history
Signed-off-by: nstarman <nstarman@users.noreply.github.com>
  • Loading branch information
nstarman committed Dec 22, 2023
1 parent e3b5ee2 commit c6c406d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ warn_return_any = false
"astropy.units.*",
"equinox.*",
"jax.*",
"jaxtyping.*",
"quax.*",
]
ignore_missing_imports = true
Expand Down
2 changes: 1 addition & 1 deletion src/jax_quantity/_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def materialise(self) -> None:
raise RuntimeError(msg)

def aval(self) -> jax.core.ShapedArray:
return jax.core.get_aval(self.value) # type: ignore[no-untyped-call]
return jax.core.get_aval(self.value)

def enable_materialise(self, _: bool = True) -> Self: # noqa: FBT001, FBT002
return type(self)(self.value, self.unit)
Expand Down
2 changes: 1 addition & 1 deletion src/jax_quantity/_register_primitives.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ def _convert_element_type_p(

@register(lax.copy_p)
def _copy_p(x: Quantity) -> Quantity:
return replace(x, value=lax.copy_p.bind(x.value)) # type: ignore[no-untyped-call]
return replace(x, value=lax.copy_p.bind(x.value))


# ==============================================================================
Expand Down

0 comments on commit c6c406d

Please sign in to comment.