10000 rename 'configs' > 'config_params' · ag-python/pydantic@0451b33 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0451b33

Browse files
committed
rename 'configs' > 'config_params'
1 parent 7b05740 commit 0451b33

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pydantic/decorator.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
Callable = TypeVar('Callable', bound=AnyCallable)
1515

1616

17-
def validate_arguments(func: 'Callable' = None, **configs: Any) -> 'Callable':
17+
def validate_arguments(func: 'Callable' = None, **config_params: Any) -> 'Callable':
1818
"""
1919
Decorator to validate the arguments passed to a function.
2020
"""
2121

2222
def validate(_func: 'Callable') -> 'Callable':
23-
vd = ValidatedFunction(_func, **configs)
23+
vd = ValidatedFunction(_func, **config_params)
2424

2525
@wraps(_func)
2626
def wrapper_function(*args: Any, **kwargs: Any) -> Any:
@@ -43,7 +43,7 @@ def wrapper_function(*args: Any, **kwargs: Any) -> Any:
4343

4444

4545
class ValidatedFunction:
46-
def __init__(self, function: 'Callable', **configs: Any):
46+
def __init__(self, function: 'Callable', **config_params: Any):
4747
from inspect import signature, Parameter
4848

4949
parameters: Mapping[str, Parameter] = signature(function).parameters
@@ -107,7 +107,7 @@ def __init__(self, function: 'Callable', **configs: Any):
107107
# same with kwargs
108108
fields[self.v_kwargs_name] = Dict[Any, Any], None
109109

110-
self.create_model(fields, takes_args, takes_kwargs, **configs)
110+
self.create_model(fields, takes_args, takes_kwargs, **config_params)
111111

112112
def call(self, *args: Any, **kwargs: Any) -> Any:
113113
values = self.build_values(args, kwargs)

0 commit comments

Comments
 (0)
0