]> git.ipfire.org Git - thirdparty/starlette.git/commitdiff
Add typing.overload to coverage `exclude_lines` (#1753)
authorMarcelo Trylesinski <marcelotryle@gmail.com>
Sun, 10 Jul 2022 13:38:32 +0000 (15:38 +0200)
committerGitHub <noreply@github.com>
Sun, 10 Jul 2022 13:38:32 +0000 (15:38 +0200)
setup.cfg
starlette/config.py

index 8dad329c746ef60d3a8808afcfe4873e389d78e3..64a4f48c8bfd6c8240972408f23a2322dfd045ce 100644 (file)
--- a/setup.cfg
+++ b/setup.cfg
@@ -40,3 +40,4 @@ exclude_lines =
     pragma: no cover
     pragma: nocover
     if typing.TYPE_CHECKING:
+    @typing.overload
index a4abf49a6537475a77967ed6b6552932d5eee879..8c58b2738deced43a800c7b874be0d3cb3d9ba80 100644 (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__(