Clarify FPDF.add_font()
's style
parameter accepted values
#1263
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.
Changes:
In
FPDF.add_font()
, a line of documentation about the accepted values of thestyle
parameter is being clarified to explicitly mention the empty string case and infer that "BI" is an accepted value.Motives:
I suspect this is the cause for a misimplementation in typeshed's typing stubs, which I have opened a PR there to fix.
Sorry for this small PR, but I felt like it was appropriate. I'm looking forward to doing more (and bigger) docs clarifications if they're welcomed.
Thank you for working on this amazing project, maintainers!
Checklist:
This PR is ready to be merged
The GitHub pipeline is OK (green),
meaning that both
pylint
(static code analyzer) andblack
(code formatter) are happy with the changes of this PR.[N/A] A unit test is covering the code added / modified by this PR
[N/A] In case of a new feature, docstrings have been added, with also some documentation in the
docs/
folderA mention of the change is present in
CHANGELOG.md
License consent:
By submitting this pull request, I confirm that my contribution is made under the terms of the GNU LGPL 3.0 license.