-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use type hinting generics [1] everywhere
And use postponed evaluation of annotations [2] to avoid syntax errors on Python 3.7 and 3.8. See [3] for why it works. [1] https://peps.python.org/pep-0585/ [2] https://peps.python.org/pep-0563/ [3] netromdk/vermin#66 (comment)
- Loading branch information
Chih-Hsuan Yen
committed
Sep 2, 2022
1 parent
5c27908
commit 1726f6d
Showing
3 changed files
with
10 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
from __future__ import annotations | ||
|
||
import logging | ||
import math | ||
from typing import Any | ||
|
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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
from __future__ import annotations | ||
|
||
import dataclasses | ||
import logging | ||
import math | ||
|
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