Skip to content

Commit

Permalink
STY: Run black
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinThoma committed Dec 2, 2023
1 parent a3742ae commit 40e25ec
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
8 changes: 7 additions & 1 deletion pypdf/_cmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@
from ._codecs import adobe_glyphs, charset_encoding
from ._utils import b_, logger_warning
from .errors import PdfReadWarning
from .generic import DecodedStreamObject, DictionaryObject, IndirectObject, NullObject, StreamObject
from .generic import (
DecodedStreamObject,
DictionaryObject,
IndirectObject,
NullObject,
StreamObject,
)


# code freely inspired from @twiggy ; see #711
Expand Down
9 changes: 7 additions & 2 deletions pypdf/_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2240,7 +2240,10 @@ def clean_forms(
# to prevent infinite looping
return [], [] # pragma: no cover
try:
d = cast(Dict[Any, Any], cast(DictionaryObject, elt["/Resources"])["/XObject"])
d = cast(
Dict[Any, Any],
cast(DictionaryObject, elt["/Resources"])["/XObject"],
)
except KeyError:
d = {}
images = []
Expand Down Expand Up @@ -3188,7 +3191,9 @@ def _add_articles_thread(

def add_filtered_articles(
self,
fltr: Union[Pattern[Any], str], # thread entry from the reader's array of threads
fltr: Union[
Pattern[Any], str
], # thread entry from the reader's array of threads
pages: Dict[int, PageObject],
reader: PdfReader,
) -> None:
Expand Down
6 changes: 4 additions & 2 deletions tests/test_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,11 @@ def test_page_operations(pdf_path, password):
(175, 680, 844),
(45, 994, 994),
(-80, 888, 742),
]
],
)
def test_mediabox_expansion_after_rotation(angle: float, expected_width: int, expected_height: int):
def test_mediabox_expansion_after_rotation(
angle: float, expected_width: int, expected_height: int
):
"""
Mediabox dimensions after rotation at a non-right angle with expension are correct.
Expand Down

0 comments on commit 40e25ec

Please sign in to comment.