-
-
Notifications
You must be signed in to change notification settings - Fork 405
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
plugin: type-hint
example
class + fix minor typing issue
mypy needs to know the type of `example.result`, and it wouldn't have made much sense to add only that without also telling mypy what the function argument being assigned to the instance attribute was... and it wouldn't make sense to type-hint only one argument to the constructor method. So here we are, with type-hints for ALL the constructor parameters, and improved logic for dealing with `result` & `ignore` (both of which take string OR an iterable OF strings). Wanted to type-hint `example.__call__()` too, but that'll require some help from custom types defined elsewhere (that don't yet exist).
- Loading branch information
Showing
1 changed file
with
54 additions
and
37 deletions.
There are no files selected for viewing
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