Skip to content

Commit

Permalink
Remove some historical artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
jstasiak committed Apr 28, 2019
1 parent 0a685fa commit 1c13136
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions injector/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,7 @@ def provider(function):
return function


def inject(function=None, **bindings):
def inject(function):
"""Decorator declaring parameters to be injected.
eg.
Expand Down Expand Up @@ -934,18 +934,6 @@ def inject(function=None, **bindings):
Third party libraries may, however, provide support for injecting dependencies
into non-constructor methods or free functions in one form or another.
"""
if bindings:
raise AssertionError(
'Passing keyword arguments to inject is no longer supported. '
'Use inject in combination with parameter annotations to declare dependencies. '
'See documentation for details'
)

if not function:
raise AssertionError(
'No function being decorated, make sure you decorate your function with ' '@inject, not @inject()'
)

try:
bindings = _infer_injected_bindings(function)
except _BindingNotYetAvailable:
Expand Down

0 comments on commit 1c13136

Please sign in to comment.