Skip to content

Commit c917fa4

Browse files
[gunicorn] Delete Any annotations from validators
1 parent d497e64 commit c917fa4

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

stubs/gunicorn/gunicorn/config.pyi

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ _ClassValidatorType: TypeAlias = Callable[[object | str | None], type[Any] | Non
4545
_UserGroupValidatorType: TypeAlias = Callable[[str | int | None], int]
4646
_AddressValidatorType: TypeAlias = Callable[[str | None], _AddressType | None]
4747

48-
_AnyValidatorType: TypeAlias = (
48+
_ValidatorType: TypeAlias = (
4949
_BoolValidatorType
5050
| _StringValidatorType
5151
| _ListStringValidatorType
@@ -111,7 +111,7 @@ class Setting(metaclass=SettingMeta):
111111
value: _ConfigValueType
112112
section: ClassVar[str | None]
113113
cli: ClassVar[list[str] | None]
114-
validator: ClassVar[_AnyValidatorType | None]
114+
validator: ClassVar[_ValidatorType | None]
115115
type: ClassVar[argparse._ActionType | None]
116116
meta: ClassVar[str | None]
117117
action: ClassVar[str | None]
@@ -158,15 +158,15 @@ def validate_list_of_existing_files(val: None) -> list[str]: ...
158158
def validate_string_to_addr_list(val: str | None) -> list[str]: ...
159159
def validate_string_to_list(val: str | None) -> list[str]: ...
160160
@overload
161-
def validate_class(val: str) -> type[Any]: ...
161+
def validate_class(val: str) -> str: ...
162162
@overload
163163
def validate_class(val: None) -> None: ...
164164
@overload
165-
def validate_class(val: object) -> type[Any]: ...
166-
def validate_callable(arity: int) -> Callable[[str | Callable[..., Any]], Callable[..., Any]]: ...
165+
def validate_class(val: object) -> object: ...
166+
def validate_callable(arity: int) -> Callable[[str | _ValidatorType], _ValidatorType]: ...
167167
def validate_user(val: int | str | None) -> int: ...
168168
def validate_group(val: int | str | None) -> int: ...
169-
def validate_post_request(val: str | Callable[..., Any]) -> _PostRequestHookType: ...
169+
def validate_post_request(val: str | _ValidatorType) -> _PostRequestHookType: ...
170170
def validate_chdir(val: str) -> str: ...
171171
@overload
172172
def validate_statsd_address(val: str) -> _AddressType: ...

0 commit comments

Comments
 (0)