Conversation
|
|
||
|
|
||
| def parse(text, parser_cls: Type[MdParser] = MdParser): | ||
| def parse(text, parser_cls: type[MdParser] = MdParser): |
Contributor
There was a problem hiding this comment.
recommended to use type over Type?
Contributor
Author
There was a problem hiding this comment.
this is how pyupgrade --py36-plus works by default: tries to use typing.type which fails
Additionally typing.Type usage seems to be deprecated according to: https://docs.python.org/3.11/library/typing.html#typing
so at this point using type[My_Class] should be way to go
| @@ -14,7 +14,8 @@ def read(f): | |||
| ] | |||
Contributor
There was a problem hiding this comment.
Any need to upgrade this library? mistune
Contributor
Author
There was a problem hiding this comment.
we are using v1 of this library: https://github.com/lepture/mistune/tree/v1 0.8.4 is last version of v1 then there is v2 and v3 which may break compatibility - I've have not checked but:
- v1 docs says it's python 3.5+ compatible
- we have tests covering usage of mistune starting from
ParserTestCaseand it seems coverage is pretty good.
47af01a to
bf33ced
Compare
bf33ced to
2c329d8
Compare
65824ba to
67489eb
Compare
snejku
reviewed
Oct 9, 2024
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #9