Skip to content

Commit

Permalink
slightly better compatibility again
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-kidger committed Jun 25, 2024
1 parent 4716fc1 commit 099b189
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions jaxtyping/_decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,12 +390,10 @@ def wrapped_fn(*args, **kwargs): # pyright: ignore
parameters=new_params, return_annotation=return_annotation
)

param_signature = full_signature.replace(
return_annotation=inspect.Signature.empty
)
param_signature = full_signature.replace(return_annotation=Any)
name = getattr(fn, "__name__", "<no name found>")
qualname = getattr(fn, "__qualname__", "<no qualname found>")
module = getattr(fn, "__module__", "generated")
module = getattr(fn, "__module__", "<generated_by_jaxtyping>")

# Use the same name so that typeguard warnings look correct.
full_fn, output_name = _make_fn_with_signature(
Expand Down

0 comments on commit 099b189

Please sign in to comment.