mirror of https://github.com/encode/starlette.git
Add typing.overload to coverage `exclude_lines` (#1753)
This commit is contained in:
parent
584f22e355
commit
548200dd33
|
@ -40,3 +40,4 @@ exclude_lines =
|
|||
pragma: no cover
|
||||
pragma: nocover
|
||||
if typing.TYPE_CHECKING:
|
||||
@typing.overload
|
||||
|
|
|
@ -61,21 +61,17 @@ class Config:
|
|||
self.file_values = self._read_file(env_file)
|
||||
|
||||
@typing.overload
|
||||
def __call__(
|
||||
self, key: str, *, default: None
|
||||
) -> typing.Optional[str]: # pragma: no cover
|
||||
def __call__(self, key: str, *, default: None) -> typing.Optional[str]:
|
||||
...
|
||||
|
||||
@typing.overload
|
||||
def __call__(
|
||||
self, key: str, cast: typing.Type[T], default: T = ...
|
||||
) -> T: # pragma: no cover
|
||||
def __call__(self, key: str, cast: typing.Type[T], default: T = ...) -> T:
|
||||
...
|
||||
|
||||
@typing.overload
|
||||
def __call__(
|
||||
self, key: str, cast: typing.Type[str] = ..., default: str = ...
|
||||
) -> str: # pragma: no cover
|
||||
) -> str:
|
||||
...
|
||||
|
||||
@typing.overload
|
||||
|
@ -84,13 +80,13 @@ class Config:
|
|||
key: str,
|
||||
cast: typing.Callable[[typing.Any], T] = ...,
|
||||
default: typing.Any = ...,
|
||||
) -> T: # pragma: no cover
|
||||
) -> T:
|
||||
...
|
||||
|
||||
@typing.overload
|
||||
def __call__(
|
||||
self, key: str, cast: typing.Type[str] = ..., default: T = ...
|
||||
) -> typing.Union[T, str]: # pragma: no cover
|
||||
) -> typing.Union[T, str]:
|
||||
...
|
||||
|
||||
def __call__(
|
||||
|
|
Loading…
Reference in New Issue