Exclude some decorators

This commit is contained in:
Joe Farebrother
2025-02-12 09:40:45 +00:00
parent 61d5a692fb
commit f46a2a1773
2 changed files with 19 additions and 1 deletions

View File

@@ -120,7 +120,15 @@ class Z(zope.interface.Interface):
Z().meth(0)
def weird_decorator(f):
def g(self):
return f()
return g
class B:
@weird_decorator
def f(): # allow no-arg functions with a decorator
pass
# The `__init_subclass__` (introduced in Python 3.6)
# and `__class_getitem__` (introduced in Python 3.7) methods are methods