Skip to content

Commit a8d57ef

Browse files
committed
Fix style errors reported by linters
1 parent 6d4da70 commit a8d57ef

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

pdfly/booklet.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import sys
2121
import traceback
2222
from pathlib import Path
23-
from typing import Generator, Tuple
23+
from typing import Generator, Optional, Tuple
2424

2525
from pypdf import (
2626
PageObject,
@@ -33,8 +33,8 @@
3333
def main(
3434
filename: Path,
3535
output: Path,
36-
inside_cover_file: Path,
37-
centerfold_file: Path,
36+
inside_cover_file: Optional[Path],
37+
centerfold_file: Optional[Path],
3838
) -> None:
3939
try:
4040
# Set up the streams

pdfly/cli.py

+8-5
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ def cat(
9898
) -> None:
9999
pdfly.cat.main(filename, fn_pgrgs, output, verbose)
100100

101+
101102
@entry_point.command(name="booklet", help=pdfly.booklet.__doc__) # type: ignore[misc]
102103
def booklet(
103104
filename: Annotated[
@@ -114,27 +115,29 @@ def booklet(
114115
dir_okay=False,
115116
exists=False,
116117
resolve_path=False,
117-
)
118+
),
118119
],
119120
blank_page: Annotated[
120121
Optional[Path],
121122
typer.Option(
122-
"-b", "--blank-page-file",
123+
"-b",
124+
"--blank-page-file",
123125
help="page added if input is odd number of pages",
124126
dir_okay=False,
125127
exists=True,
126128
resolve_path=True,
127129
),
128130
] = None,
129131
centerfold: Annotated[
130-
Path,
132+
Optional[Path],
131133
typer.Option(
132-
"-c", "--centerfold-file",
134+
"-c",
135+
"--centerfold-file",
133136
help="double-page added if input is missing >= 2 pages",
134137
dir_okay=False,
135138
exists=True,
136139
resolve_path=True,
137-
)
140+
),
138141
] = None,
139142
) -> None:
140143
pdfly.booklet.main(filename, output, blank_page, centerfold)

0 commit comments

Comments
 (0)