Skip to content

Commit

Permalink
Fixed issue with getattr
Browse files Browse the repository at this point in the history
  • Loading branch information
AryazE committed Aug 1, 2024
1 parent d8fdb37 commit 0bc0fb7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/dynapyt/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,11 @@ def filtered(self, func, f, args):
patterns = fltr.split(" -> ")[1].split(SEPERATOR)
try:
if fltr.startswith("only ->") and any(
# [getattr(arg, "__name__", None) in patterns for arg in sub_args]
[arg.__name__ in patterns for arg in sub_args]
[arg.__dict__.get("__name__", None) in patterns for arg in sub_args]
):
return False
elif fltr.startswith("ignore ->") and any(
[arg.__name__ in patterns for arg in sub_args]
[arg.__dict__.get("__name__", None) in patterns for arg in sub_args]
):
return True
except AttributeError:
Expand Down

0 comments on commit 0bc0fb7

Please sign in to comment.