-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: Improved use of type annotations, replace typing
by t
#986
refactor: Improved use of type annotations, replace typing
by t
#986
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @ArneGudermann,
thanks for facing this big issue.
Since Python 3.9 and PEP-585, type annotations do not rely on the typing
-module. Therefore, I would like to use this newer syntax consequently.
I would like to generally suggest the following changes:
t.Dict
replace bydict
t.List
replace bylist
t.Union
replace by|
This also makes the import of typing
pointless in most situations.
What does @sveneberth think about this suggestion?
Yes is good. Use everything that works as a generic, including tuple. In addition, it is then clear that it is We can thing also if we prefer |
Err... should we now use my suggestion, or is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @ArneGudermann, thanks for the update.
I really want to merge this quickly.
Can you please check in your code to use set[x]
instead of t.Set[x]
and to not import t
in case it is not used?
Afterwards, we can merge this, to avoid huger merge conflicts in future, as this changes a lot of code.
@ArneGudermann please resolve current conflicts. |
Co-authored-by: Jan Max Meyer <[email protected]>
Co-authored-by: Sven Eberth <[email protected]>
typing
with t
typing
by t
typing
by t
typing
by t
Mostly replaced `typing` by `t` Resolve the typing part of #958 --------- Co-authored-by: Jan Max Meyer <[email protected]> Co-authored-by: Sven Eberth <[email protected]>
Mostly replaced `typing` by `t` Resolve the typing part of #958 --------- Co-authored-by: Jan Max Meyer <[email protected]> Co-authored-by: Sven Eberth <[email protected]>
Resolve the typing part of #958