-
Notifications
You must be signed in to change notification settings - Fork 148
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
Documentation improvements #254
Conversation
8b945b3
to
097f2b8
Compare
Codecov Report
@@ Coverage Diff @@
## master #254 +/- ##
=======================================
Coverage 99.68% 99.68%
=======================================
Files 9 9
Lines 635 635
=======================================
Hits 633 633
Misses 2 2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
Thank you very much for this, nice improvements!
- Don't allow to select
>>>
text nodes inside codeblocks. Forpycon
code blocks uses the recipe suggested by mkdocstrings and forpython
codeblocks a Javascript function with a CSS class.
I'm not sure if this is working?
For example, at /number/#humanize.number.clamp
, when I click the "Copy to clipboard icon", it copies this:
>>> clamp(123.456)
'123.456'
>>> clamp(0.0001, floor=0.01)
'<0.01'
>>> clamp(0.99, format="{:.0%}", ceil=0.99)
'99%'
>>> clamp(0.999, format="{:.0%}", ceil=0.99)
'>99%'
>>> clamp(1, format=intword, floor=1e6, floor_token="under ")
'under 1.0 million'
>>> clamp(None) is None
True
Should it instead copy something like this?
clamp(123.456)
clamp(0.0001, floor=0.01)
clamp(0.99, format="{:.0%}", ceil=0.99)
clamp(0.999, format="{:.0%}", ceil=0.99)
clamp(1, format=intword, floor=1e6, floor_token="under ")
clamp(None) is None
We should probably use |
Opened an issue in mkdocs-material#3647 and seems that the unique solution would be to hide the "Copy to clipboard" buttons. I've pinned |
I didn't know about that pygment option, I'm not sure how to include these CSS rules by default in the new Python handler now 😕 Maybe we shouldn't include them by default, as pointed out in the issue you opened. |
I agree, what do you think @hugovk? |
Sure, fine to disable it. The Sphinx version of the copy button can strip out Thanks! |
Thanks! |
Changelog: ========== Added ------ Support Python 3.11 (openembedded#13) Add Arabic language (jmoiron/humanize#256) Docs: add dark mode toggle and default to system preference (jmoiron/humanize#255) Documentation improvements (jmoiron/humanize#254) Changed ------- Update repo links (openembedded#2) Fixed ------- Removed VERSION from __all__ (openembedded#11) Signed-off-by: Zheng Ruoqin <[email protected]> Signed-off-by: Khem Raj <[email protected]>
Changelog: ========== Added ------ Support Python 3.11 (openembedded#13) Add Arabic language (jmoiron/humanize#256) Docs: add dark mode toggle and default to system preference (jmoiron/humanize#255) Documentation improvements (jmoiron/humanize#254) Changed ------- Update repo links (openembedded#2) Fixed ------- Removed VERSION from __all__ (openembedded#11) Signed-off-by: Zheng Ruoqin <[email protected]> Signed-off-by: Khem Raj <[email protected]>
Changelog: ========== Added ------ Support Python 3.11 (openembedded#13) Add Arabic language (jmoiron/humanize#256) Docs: add dark mode toggle and default to system preference (jmoiron/humanize#255) Documentation improvements (jmoiron/humanize#254) Changed ------- Update repo links (openembedded#2) Fixed ------- Removed VERSION from __all__ (openembedded#11) Signed-off-by: Zheng Ruoqin <[email protected]> Signed-off-by: Khem Raj <[email protected]>
Changelog: ========== Added ------ Support Python 3.11 (openembedded#13) Add Arabic language (jmoiron/humanize#256) Docs: add dark mode toggle and default to system preference (jmoiron/humanize#255) Documentation improvements (jmoiron/humanize#254) Changed ------- Update repo links (openembedded#2) Fixed ------- Removed VERSION from __all__ (openembedded#11) Signed-off-by: Zheng Ruoqin <[email protected]> Signed-off-by: Khem Raj <[email protected]>
Changelog: ========== Added ------ Support Python 3.11 (openembedded#13) Add Arabic language (jmoiron/humanize#256) Docs: add dark mode toggle and default to system preference (jmoiron/humanize#255) Documentation improvements (jmoiron/humanize#254) Changed ------- Update repo links (openembedded#2) Fixed ------- Removed VERSION from __all__ (openembedded#11) Signed-off-by: Zheng Ruoqin <[email protected]> Signed-off-by: Khem Raj <[email protected]>
Changelog: ========== Added ------ Support Python 3.11 (openembedded#13) Add Arabic language (jmoiron/humanize#256) Docs: add dark mode toggle and default to system preference (jmoiron/humanize#255) Documentation improvements (jmoiron/humanize#254) Changed ------- Update repo links (openembedded#2) Fixed ------- Removed VERSION from __all__ (openembedded#11) Signed-off-by: Zheng Ruoqin <[email protected]> Signed-off-by: Khem Raj <[email protected]>
Changelog: ========== Added ------ Support Python 3.11 (openembedded#13) Add Arabic language (jmoiron/humanize#256) Docs: add dark mode toggle and default to system preference (jmoiron/humanize#255) Documentation improvements (jmoiron/humanize#254) Changed ------- Update repo links (openembedded#2) Fixed ------- Removed VERSION from __all__ (openembedded#11) Signed-off-by: Zheng Ruoqin <[email protected]> Signed-off-by: Khem Raj <[email protected]>
Changelog: ========== Added ------ Support Python 3.11 (openembedded#13) Add Arabic language (jmoiron/humanize#256) Docs: add dark mode toggle and default to system preference (jmoiron/humanize#255) Documentation improvements (jmoiron/humanize#254) Changed ------- Update repo links (openembedded#2) Fixed ------- Removed VERSION from __all__ (openembedded#11) Signed-off-by: Zheng Ruoqin <[email protected]> Signed-off-by: Khem Raj <[email protected]>
Changelog: ========== Added ------ Support Python 3.11 (#13) Add Arabic language (jmoiron/humanize#256) Docs: add dark mode toggle and default to system preference (jmoiron/humanize#255) Documentation improvements (jmoiron/humanize#254) Changed ------- Update repo links (#2) Fixed ------- Removed VERSION from __all__ (#11) Signed-off-by: Zheng Ruoqin <[email protected]> Signed-off-by: Khem Raj <[email protected]>
Changelog: ========== Added ------ Support Python 3.11 (#13) Add Arabic language (jmoiron/humanize#256) Docs: add dark mode toggle and default to system preference (jmoiron/humanize#255) Documentation improvements (jmoiron/humanize#254) Changed ------- Update repo links (#2) Fixed ------- Removed VERSION from __all__ (#11) Signed-off-by: Zheng Ruoqin <[email protected]> Signed-off-by: Khem Raj <[email protected]>
Changes proposed in this pull request:
clamp()
arguments not being correctly rendered withmkdocstrings
.include-markdown
plugin to include "Usage" section of README inside Home.>>>
text nodes inside codeblocks. Forpycon
code blocks use the recipe suggested by mkdocstringsand for.python
codeblocks a Javascript function with a CSS classmkdocstrings[python-legacy]>=0.18
). See About the Python handlers in mkdocstrings documentation.