Skip to content

Commit

Permalink
ccitt nit -- avoid casting needlessly
Browse files Browse the repository at this point in the history
  • Loading branch information
0xabu committed Sep 6, 2021
1 parent 15983d8 commit 3fe2b69
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pdfminer/ccitt.py
Original file line number Diff line number Diff line change
Expand Up @@ -562,10 +562,10 @@ def output_line(self, y: int, bits: Sequence[int]) -> None:

def ccittfaxdecode(data: bytes, params: Dict[str, object]) -> bytes:
K = params.get('K')
cols = cast(int, params.get('Columns'))
bytealign = cast(bool, params.get('EncodedByteAlign'))
reversed = cast(bool, params.get('BlackIs1'))
if K == -1:
cols = cast(int, params.get('Columns'))
bytealign = cast(bool, params.get('EncodedByteAlign'))
reversed = cast(bool, params.get('BlackIs1'))
parser = CCITTFaxDecoder(cols, bytealign=bytealign, reversed=reversed)
else:
raise ValueError(K)
Expand Down

0 comments on commit 3fe2b69

Please sign in to comment.