Skip to content

Instantly share code, notes, and snippets.

View Spansky's full-sized avatar
🎯
Focusing

Leon Sczepansky Spansky

🎯
Focusing
  • Stuttgart
View GitHub Profile

How to work with decorators in Python

  • One example for a decorator outside a class
  • One example for a decorator inside a class

Error Messages that lead you here

Instance methods should take a 'self' parameter [reportSelfClsParameterName]

Argument of type "Self@xxx" cannot be assigned to parameter "wrapped" of type "(**_PWrapped@wraps) -> _RWrapped@wraps" in function "wraps" Type "Self@xxx" cannot be assigned to type "(**_PWrapped@wraps) -> _RWrapped@wraps" [reportGeneralTypeIssues]