Skip to content

Instantly share code, notes, and snippets.

@ahal
Created July 17, 2020 20:45
Show Gist options
  • Save ahal/670b149525bff0b6658c1a1a3cbb264c to your computer and use it in GitHub Desktop.
Save ahal/670b149525bff0b6658c1a1a3cbb264c to your computer and use it in GitHub Desktop.
from typing import Callable, Type
def register() -> Callable:
def wrap(cls: Type) -> Type :
return cls
return wrap
@register
class Foo():
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment