-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Change manual kwargs popping to kwonly arguments. #10545
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 all commits
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 |
---|---|---|
|
@@ -802,8 +802,9 @@ class FigureCanvasPgf(FigureCanvasBase): | |
def get_default_filetype(self): | ||
return 'pdf' | ||
|
||
def _print_pgf_to_fh(self, fh, *args, **kwargs): | ||
if kwargs.get("dryrun", False): | ||
def _print_pgf_to_fh(self, fh, *args, | ||
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. *args is unused -> * only 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. see above re: keeping the same signature for all print_foo's. In any case this would mean fixing the call sites as well, so it'll be separate work. 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. |
||
dryrun=False, bbox_inches_restore=None, **kwargs): | ||
if dryrun: | ||
renderer = RendererPgf(self.figure, None, dummy=True) | ||
self.figure.draw(renderer) | ||
return | ||
|
@@ -849,10 +850,9 @@ def _print_pgf_to_fh(self, fh, *args, **kwargs): | |
r"\pgfpathrectangle{\pgfpointorigin}{\pgfqpoint{%fin}{%fin}}" | ||
% (w, h)) | ||
writeln(fh, r"\pgfusepath{use as bounding box, clip}") | ||
_bbox_inches_restore = kwargs.pop("bbox_inches_restore", None) | ||
renderer = MixedModeRenderer(self.figure, w, h, dpi, | ||
RendererPgf(self.figure, fh), | ||
bbox_inches_restore=_bbox_inches_restore) | ||
bbox_inches_restore=bbox_inches_restore) | ||
self.figure.draw(renderer) | ||
|
||
# end the pgfpicture environment | ||
|
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.
Maybe deprecate dpi and replace by image_dpi? During the deprecation dpi could be catched via kwargs.
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.
nah, let's try to keep all the print_foo's with as much the same signature as possible
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.
ok.