Open bannsec opened 7 years ago
I'm attempting to use enforce over a class. However, one of the methods in this class is static, and marked so by:
enforce
@staticmethod
When attempting to run, i get the following:
In [7]: Keyboard._parse_modifier(2) --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-7-2977a0e8d3a6> in <module>() ----> 1 Keyboard._parse_modifier(2) ~/.virtualenvs/usb_pcap/lib/python3.5/site-packages/enforce/decorators.py in universal(wrapped, instance, args, kwargs) 83 """ 84 with RunLock: ---> 85 enforcer = wrapped.__enforcer__ 86 skip = False 87 AttributeError: 'functools.partial' object has no attribute '__enforcer__'
Same error occurs if i remove my type hints.
@RussBaz, please publish new version on pypi.
I'm attempting to use
enforce
over a class. However, one of the methods in this class is static, and marked so by:When attempting to run, i get the following:
Same error occurs if i remove my type hints.