Skip to content

Commit

Permalink
Return klass in register function
Browse files Browse the repository at this point in the history
So it can be used as a decorator

@register
class MyAutoComplete:
    pass
  • Loading branch information
yohanboniface committed Aug 20, 2024
1 parent cbc4194 commit 82cc74e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions agnocomplete/register.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ def register(klass):
"Register a class into the agnocomplete registry."
logger.info("registering {}".format(klass.__name__))
AGNOCOMPLETE_REGISTRY[klass.slug] = klass
return klass


def get_agnocomplete_registry():
Expand Down

0 comments on commit 82cc74e

Please sign in to comment.