Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Fix Path/str-discrepancy in FontManager.addpath and improve documentation#22591
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
f56ea70
toe22b3a6
Compare9939784
to22e3daf
CompareUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
6d5edf6
to63eba3b
CompareThere 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.
This is good, only some stylistic comments.
Uh oh!
There was an error while loading.Please reload this page.
- style: Either 'normal' (default), 'italic' or 'oblique'. | ||
- style: Either 'normal', 'italic' or 'oblique'. |
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.
Optional: Highlight the properties using italics (or alternatively literal format)
-style:Either'normal','italic'or'oblique'. | |
-*style*:Either'normal','italic'or'oblique'. |
This is also quite redundant with the setters. This is almost completely a data class. IMHO it would be reasonable to add properties and move all the documentation there, i.e. delete this list and the setter docstrings (setters may link to the property docs. But that's for a later time.
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.
That would make sense, but I think it is better to try to get the information from the setmethods at a later stage.
Uh oh!
There was an error while loading.Please reload this page.
63eba3b
to9e67574
Compareoscargus commentedMar 14, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I changed based on the comments. However, there is still the same issue as in#22556 (comment) Edit: I screwed up when editing and did just amend to the last commit rather than updating the correct one, so one may want to squash. |
9e67574
to249f360
Compare249f360
to0525305
Compare@@ -1,7 +1,7 @@ | |||
""" | |||
A module for finding, managing, and using fonts across platforms. | |||
This module provides a single `FontManager` instance that can | |||
This module provides a single `FontManager` instance, ``fontManager``, that can |
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.
I did not manage to link tofontManager
when the definition is infont_manager_api.rst
.
Uh oh!
There was an error while loading.Please reload this page.
0525305
to7f21bca
Comparetwm commentedMar 22, 2022
Thank you all very much for the quick resolution! |
Uh oh!
There was an error while loading.Please reload this page.
PR Summary
Closes#22582
Closes#22586
Always convert input to
str
first.Also update the documentation a bit.
Cannot really see how this can be tested as I do not know of any ttf-font locations on the CI... Edit: I found a ttf-font in the test data, so at least it should be possible to test passing a Path without errors. Edit 2: Test added.
Also added a validation function for
font.stretch
, so now rcParam-values can also be ints.Kept it as four separate commits, but can of course merge to a single.
PR Checklist
Tests and Styling
pytest
passes).flake8-docstrings
and runflake8 --docstring-convention=all
).Documentation
doc/users/next_whats_new/
(follow instructions in README.rst there).doc/api/next_api_changes/
(follow instructions in README.rst there).