Skip to content

Commit

Permalink
[skip ci]: black/isort
Browse files Browse the repository at this point in the history
  • Loading branch information
black-isort-bot committed Feb 3, 2024
1 parent 5ce65d4 commit cd6ed46
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
10 changes: 4 additions & 6 deletions PyPDFForm/middleware/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,10 @@ def widget_rect_watermarks(pdf: bytes) -> List[bytes]:
width = abs(rect[0] - rect[2])
height = abs(rect[1] - rect[3])

to_draw.append(
[x, y, width, height]
)
watermarks.append(create_watermarks_and_draw(
pdf, page, "rect", to_draw
)[page - 1])
to_draw.append([x, y, width, height])
watermarks.append(
create_watermarks_and_draw(pdf, page, "rect", to_draw)[page - 1]
)

return watermarks

Expand Down
12 changes: 7 additions & 5 deletions PyPDFForm/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
VERSION_IDENTIFIERS)
from .middleware.dropdown import Dropdown
from .middleware.template import (build_widgets, dropdown_to_text,
set_character_x_paddings, widget_rect_watermarks)
set_character_x_paddings,
widget_rect_watermarks)
from .middleware.text import Text
from .widgets.checkbox import CheckBoxWidget
from .widgets.text import TextWidget
Expand Down Expand Up @@ -129,7 +130,8 @@ def preview(self) -> bytes:
key: preview_widget_to_draw(value)
for key, value in self.widgets.items()
},
), widget_rect_watermarks(self.read())
),
widget_rect_watermarks(self.read()),
)
)

Expand All @@ -140,9 +142,9 @@ def generate_coordinate_grid(

self.stream = generate_coordinate_grid(
merge_watermarks_with_pdf(
remove_all_widgets(self.read()),
widget_rect_watermarks(self.read())
), color
remove_all_widgets(self.read()), widget_rect_watermarks(self.read())
),
color,
)

return self
Expand Down

0 comments on commit cd6ed46

Please sign in to comment.