Skip to content

Commit

Permalink
Merge pull request bytedance#538 from bytedance/fix-python-staticmethod
Browse files Browse the repository at this point in the history
fix python staticmethod
  • Loading branch information
yoloyyh authored Sep 21, 2023
2 parents 40328ef + 54e75e5 commit 24e93a5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion rasp/python/python-probe/rasp/smith.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,10 @@ def smith_wrapper(*args, **kwargs):

return func(*args, **kwargs)

return staticmethod(smith_wrapper) if static else smith_wrapper
class StaticMethod(object):
_func = staticmethod(smith_wrapper)

def __call__(self, *args, **kwargs):
return self._func(*args, **kwargs)

return StaticMethod() if static else smith_wrapper

0 comments on commit 24e93a5

Please sign in to comment.