Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def register(self, *args): """Decorator for registering a function. Optionally call with types to return a decorator for unannotated functions. """ if len(args) == 1 and hasattr(args, '__annotations__'): return overload.register(self, *args) return lambda func: self.__setitem__(args, func) or func