-
-
Notifications
You must be signed in to change notification settings - Fork 245
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
type hints: mypy 1.8.0 clean #375
Conversation
4c3d34f
to
c9fa058
Compare
Co-authored-by: Francis Charette Migneault <francis.charette.migneault@gmail.com>
The tests pass on my fork now :-) https://github.com/mr-c/mistune/actions/runs/7466055877/job/20316571986 @lepture Shall I add Python 3.12 to the test matrix and the package metadata, or would you rather that be in a different PR? |
👍🏻 |
from .core import BlockState, InlineState, BaseRenderer | ||
from typing import Any, Callable, Dict, Iterable, List, Optional, Tuple, Union | ||
|
||
from typing_extensions import Literal |
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.
Why not use typing.Literal
?
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.
Python 3.7 doesn't have typing.Literal
, that got introduced in Python 3.8
Thank you @lepture ! Can we get a new release of mistune so we can use these type hints and fixes in common-workflow-language/schema_salad#787 ? |
Co-authored-by: Francis Charette Migneault @fmigneault
Closes: #329