Add typing.overload to coverage `exclude_lines` (#1753)

This commit is contained in:
Marcelo Trylesinski 2022-07-10 15:38:32 +02:00 committed by GitHub
parent 584f22e355
commit 548200dd33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 9 deletions

View File

@ -40,3 +40,4 @@ exclude_lines =
pragma: no cover
pragma: nocover
if typing.TYPE_CHECKING:
@typing.overload

View File

@ -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__(