Skip to content

Commit

Permalink
Now hiding type(Module).__call__
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-kidger committed Jun 9, 2024
1 parent 262f347 commit ad99aff
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions equinox/_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,7 @@ def __signature__(cls):

# This method is called whenever you initialise a module: `MyModule(...)`
def __call__(cls, *args, **kwargs):
__tracebackhide__ = True
if _is_force_abstract[cls]:
# Any other is-abstract checks will be handled in super().__call__.
raise TypeError("Cannot instantiate abstract `equinox.Module`.")
Expand Down

0 comments on commit ad99aff

Please sign in to comment.