roo-oliv / injectable

Python Dependency Injection for Humans™

Home Page:https://injectable.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Enable `@autowired` decorator to be called without parenthesis

roo-oliv opened this issue · comments

When one doesn't want to pass in any parameters into @autowired decorator they can't symple do:

@autowired
def foo(...)

Instead they are required to use empty parenthesis for it to work:

@autowired()
def foo(...)

It would be best to omit the parenthesis when no arguments will be used.

Celery's task decorator implements this feature. Investigating it's implementation may be useful.