Skip to content

Commit

Permalink
STY: Use list comprehension
Browse files Browse the repository at this point in the history
  • Loading branch information
j-t-1 authored Jan 27, 2025
1 parent 52f974a commit 2bc2a5e
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions pypdf/_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -1007,19 +1007,11 @@ def _add_transformation_matrix(
ctm: CompressedTransformationMatrix,
) -> ContentStream:
"""Add transformation matrix at the beginning of the given contents stream."""
a, b, c, d, e, f = ctm
contents = ContentStream(contents, pdf)
contents.operations.insert(
0,
[
[
FloatObject(a),
FloatObject(b),
FloatObject(c),
FloatObject(d),
FloatObject(e),
FloatObject(f),
],
[FloatObject(x) for x in ctm],
b"cm",
],
)
Expand Down

0 comments on commit 2bc2a5e

Please sign in to comment.