Closed tristanlatr closed 9 months ago
Attention: 23 lines
in your changes are missing coverage. Please review.
Comparison is base (
1a7d052
) 91.98% compared to head (0281ba0
) 91.78%.:exclamation: Current head 0281ba0 differs from pull request most recent head 77734ab. Consider uploading reports for the commit 77734ab to get more accurate results
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@buhtz, I would you like to review this PR please ? :)
I don't know if I have enough expertise here.
I don't understand why you use types from the ast
module instead of typing
module which is IMHO recommended.
I don't understand why you use types from the ast module instead of typing module which is IMHO recommended.
Indeed you don’t quite understood. The typing annotations are provided for generics and protocols. But ast classes are not generics, there is only these classes available to annotate these instances.
I don't understand why you use types from the ast module instead of typing module which is IMHO recommended.
Indeed you don’t quite understood. The typing annotations are provided for generics and protocols. But ast classes are not generics, there is only these classes available to annotate these instances.
Is this a limitation of older Python versions? I do use annotations, too. But I don't have to use ast package or __futer__
magic.
Is this a limitation of older Python versions?
No.
ast
classes are just like other classes.
The __future__
import is not a hack. It enables this compiler feature: https://peps.python.org/pep-0563/. This helps with import cycle within TYPE_CHECKING
blocks and enables us to use forward references in annotations.
Fixes #733
Fixes #732
And add python 3.12rc3 in the CI