-
Notifications
You must be signed in to change notification settings - Fork 74
👌 IMPROVE: Add RendererProtocol
typing
#126
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
👌 IMPROVE: Add RendererProtocol
typing
#126
Conversation
Codecov Report
@@ Coverage Diff @@
## master #126 +/- ##
==========================================
- Coverage 96.10% 96.08% -0.03%
==========================================
Files 60 60
Lines 3234 3242 +8
==========================================
+ Hits 3108 3115 +7
- Misses 126 127 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
markdown_it/renderer.py
Outdated
if sys.version_info < (3, 8): | ||
from typing_extensions import Protocol | ||
else: | ||
from typing import Protocol |
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.
if sys.version_info < (3, 8): | |
from typing_extensions import Protocol | |
else: | |
from typing import Protocol | |
try: | |
from typing import Protocol | |
except ImportError: | |
from typing_extensions import Protocol |
I've literally just has an issue where sys.version_info
was not reliable
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.
Changed. Please let me know what the issue was. I'm very interested.
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.
It actually turned out to be an issue with importing of importlib_metadata
instead of importlib-metadata
in a Conda environment 😒 (see python/importlib_metadata#308 and executablebooks/MyST-NB#321), which actually illustrates my "worry" in #154 (comment)
But anyhow, I think this approach is still slightly "safer"
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.
Ah, so conda not doing the name normalization if I understand correctly? Good to know, thanks! I don't use Conda so no need to change any of my personal projects 👍
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.
yeh seems to be the case 😬
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.
despite that it is generally very good; particularly in resolving/enforcing dependency versions and/or if you are using non-python dependencies
Co-authored-by: Chris Sewell <[email protected]>
Co-authored-by: Chris Sewell <[email protected]>
RendererProtocol
typing
ok thats it; v1 is getting released (after doing another beta test). You can propose other changes, but I will probably ignore you 😜 |
The only thing I think would still be great is the These are breaking changes so will not be fun doing after v1. Although breaking, these aren't that major changes so feel free to ignore 😄 |
Well I've already been enforcing deprecation path ways for breaking changes since 0.6 (like plugin removal), so I'd still have looked to do that even if it was not v1. and yeh its just such a minimally used thing to let it hold up the release |
Closes #121