Skip to content

Commit

Permalink
Make target file path a required keyword-only argument
Browse files Browse the repository at this point in the history
  • Loading branch information
mportesdev committed Mar 2, 2021
1 parent c1048e5 commit 78d25d6
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions pictureshow/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,11 @@ def _areas(layout, page_size, margin):
yield DrawingArea(area_x, area_y, area_width, area_height)


def pictures_to_pdf(*pic_files, pdf_file=None, page_size='A4',
landscape=False, margin=72, layout=(1, 1),
stretch_small=False, force_overwrite=False):
if pdf_file is None:
*pic_files, pdf_file = pic_files

def pictures_to_pdf(*pic_files, pdf_file, page_size='A4', landscape=False,
margin=72, layout=(1, 1), stretch_small=False,
force_overwrite=False):
pic_show = PictureShow(*pic_files)

return pic_show.save_pdf(
pdf_file, page_size, landscape, margin, layout, stretch_small,
force_overwrite
Expand Down

0 comments on commit 78d25d6

Please sign in to comment.