-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add type hints for @TypeChecked and fix some pytype errors
- Loading branch information
Showing
4 changed files
with
23 additions
and
8 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from types import ModuleType | ||
from typing import Callable, TypeVar, Union, overload | ||
|
||
T = TypeVar('T', Callable, property, type, ModuleType) | ||
@overload | ||
def typechecked(memb: str) -> Union[str, ModuleType]: ... | ||
@overload | ||
def typechecked(memb: T) -> T: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,6 @@ max-line-length = 99 | |
|
||
[wheel] | ||
universal = 1 | ||
|
||
[options.package_data] | ||
pytypes = py.typed, *.pyi |