I'm trying to write decorator that takes additionalparameter like this
def dec(arg):
def modifier(cls) -> cls:
# modify cls
return cls;
pass
return modifier
pass
@dec(63)
class X:
a: int = 47;
pass
This is, of course, error, since cls is not defined.
I've tried dec(arg: int) -> Callable[[type], type] and modifier(cls: type) -> type
but that messes up IntelliSense (vscode) (writing X. no longer offers a)