Skip to content

Commit

Permalink
Revert "Deprecate usage of default values"
Browse files Browse the repository at this point in the history
This reverts commit 49e7f30.
  • Loading branch information
maldoinc committed May 7, 2024
1 parent c650388 commit 7837d02
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions wireup/ioc/util.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from __future__ import annotations

import typing
import warnings
from inspect import Parameter
from typing import Any

Expand Down Expand Up @@ -34,11 +33,6 @@ def _get_metadata_from_annotated_type(parameter: Parameter) -> AnnotatedParamete


def _get_metadata_from_default_value(parameter: Parameter) -> AnnotatedParameter | None:
warnings.warn(
"Using default values to annotate parameters for injection is deprecated. "
"Use annotated types. E.g.: Annotated[str, Wire(...)]",
stacklevel=2,
)
klass = None if parameter.annotation is Parameter.empty else parameter.annotation
annotation = None if parameter.default is Parameter.empty else _get_injectable_type(parameter.default)

Expand Down

0 comments on commit 7837d02

Please sign in to comment.