Skip to content
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

Merged
merged 1 commit into from Jan 17, 2024
Merged

type hints: mypy 1.8.0 clean #375

merged 1 commit into from Jan 17, 2024

Conversation

mr-c
Copy link
Contributor

@mr-c mr-c commented Jan 9, 2024

Co-authored-by: Francis Charette Migneault @fmigneault

Closes: #329

@mr-c mr-c force-pushed the type_hints branch 4 times, most recently from 4c3d34f to c9fa058 Compare January 9, 2024 19:38
Co-authored-by: Francis Charette Migneault <francis.charette.migneault@gmail.com>
@mr-c
Copy link
Contributor Author

mr-c commented Jan 9, 2024

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?

fmigneault added a commit to fmigneault/schema_salad that referenced this pull request Jan 9, 2024
@lepture lepture merged commit 29d3120 into lepture:master Jan 17, 2024
15 checks passed
@lepture
Copy link
Owner

lepture commented Jan 17, 2024

👍🏻

from .core import BlockState, InlineState, BaseRenderer
from typing import Any, Callable, Dict, Iterable, List, Optional, Tuple, Union

from typing_extensions import Literal
Copy link
Owner

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?

Copy link
Contributor Author

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

https://typing-extensions.readthedocs.io/en/latest/#Literal

@mr-c mr-c deleted the type_hints branch January 17, 2024 08:41
@mr-c
Copy link
Contributor Author

mr-c commented Jan 18, 2024

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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

type hints
2 participants