Skip to content

Commit

Permalink
Use T consistently as instance of a config class
Browse files Browse the repository at this point in the history
  • Loading branch information
hynek committed Apr 17, 2023
1 parent 4ed3ad3 commit 97192ad
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/environ/_environ_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ def config(
from_environ: str = "from_environ",
generate_help: str = "generate_help",
frozen: bool = False,
) -> Callable[[T], T]:
) -> Callable[[type[T]], type[T]]:
...


@overload
def config(maybe_cls: type[T]) -> T:
def config(maybe_cls: type[T]) -> type[T]:
...


Expand All @@ -83,7 +83,7 @@ def config(
from_environ: str = "from_environ",
generate_help: str = "generate_help",
frozen: bool = False,
) -> T | Callable[[T], T]:
) -> type[T] | Callable[[type[T]], type[T]]:
"""
Make a class a configuration class.
Expand Down

0 comments on commit 97192ad

Please sign in to comment.