-
Notifications
You must be signed in to change notification settings - Fork 235
Convert booleans arguments in build_arg_string, not in kwargs_to_strings #1125
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
Changes from 7 commits
06bee27
b7210ff
59a2b28
a9d167d
aac61c2
bf38deb
69aa4fb
2e4b60d
2193053
11be35d
8f1a53e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -177,13 +177,23 @@ def text_( | |||||||||||||||||||
| ) | ||||||||||||||||||||
| ): | ||||||||||||||||||||
| kwargs.update({"F": ""}) | ||||||||||||||||||||
| if angle is not None and isinstance(angle, (int, float, str)): | ||||||||||||||||||||
|
|
||||||||||||||||||||
| if angle is True: | ||||||||||||||||||||
| kwargs["F"] += "+a" | ||||||||||||||||||||
| elif isinstance(angle, (int, float, str)): | ||||||||||||||||||||
| kwargs["F"] += f"+a{str(angle)}" | ||||||||||||||||||||
|
Comment on lines
+180
to
184
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just thinking ahead to resolve #483 (allowing list inputs to angle/list/justify), we could simply use
Suggested change
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, as you wish then. |
||||||||||||||||||||
| if font is not None and isinstance(font, str): | ||||||||||||||||||||
|
|
||||||||||||||||||||
| if font is True: | ||||||||||||||||||||
| kwargs["F"] += "+f" | ||||||||||||||||||||
| elif isinstance(font, str): | ||||||||||||||||||||
| kwargs["F"] += f"+f{font}" | ||||||||||||||||||||
|
Comment on lines
+186
to
189
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||
| if justify is not None and isinstance(justify, str): | ||||||||||||||||||||
|
|
||||||||||||||||||||
| if justify is True: | ||||||||||||||||||||
| kwargs["F"] += "+j" | ||||||||||||||||||||
| elif isinstance(justify, str): | ||||||||||||||||||||
| kwargs["F"] += f"+j{justify}" | ||||||||||||||||||||
|
Comment on lines
+191
to
194
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||
| if position is not None and isinstance(position, str): | ||||||||||||||||||||
|
|
||||||||||||||||||||
| if isinstance(position, str): | ||||||||||||||||||||
| kwargs["F"] += f'+c{position}+t"{text}"' | ||||||||||||||||||||
|
|
||||||||||||||||||||
| extra_arrays = [] | ||||||||||||||||||||
|
|
||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.