fotolab 0.31.14__tar.gz → 0.31.15__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {fotolab-0.31.14 → fotolab-0.31.15}/PKG-INFO +1 -1
- {fotolab-0.31.14 → fotolab-0.31.15}/fotolab/subcommands/animate.py +4 -9
- {fotolab-0.31.14 → fotolab-0.31.15}/pyproject.toml +5 -1
- {fotolab-0.31.14 → fotolab-0.31.15}/LICENSE.md +0 -0
- {fotolab-0.31.14 → fotolab-0.31.15}/README.md +0 -0
- {fotolab-0.31.14 → fotolab-0.31.15}/fotolab/__init__.py +0 -0
- {fotolab-0.31.14 → fotolab-0.31.15}/fotolab/__main__.py +0 -0
- {fotolab-0.31.14 → fotolab-0.31.15}/fotolab/cli.py +0 -0
- {fotolab-0.31.14 → fotolab-0.31.15}/fotolab/subcommands/__init__.py +0 -0
- {fotolab-0.31.14 → fotolab-0.31.15}/fotolab/subcommands/auto.py +0 -0
- {fotolab-0.31.14 → fotolab-0.31.15}/fotolab/subcommands/border.py +0 -0
- {fotolab-0.31.14 → fotolab-0.31.15}/fotolab/subcommands/contrast.py +0 -0
- {fotolab-0.31.14 → fotolab-0.31.15}/fotolab/subcommands/env.py +0 -0
- {fotolab-0.31.14 → fotolab-0.31.15}/fotolab/subcommands/halftone.py +0 -0
- {fotolab-0.31.14 → fotolab-0.31.15}/fotolab/subcommands/info.py +0 -0
- {fotolab-0.31.14 → fotolab-0.31.15}/fotolab/subcommands/montage.py +0 -0
- {fotolab-0.31.14 → fotolab-0.31.15}/fotolab/subcommands/resize.py +0 -0
- {fotolab-0.31.14 → fotolab-0.31.15}/fotolab/subcommands/rotate.py +0 -0
- {fotolab-0.31.14 → fotolab-0.31.15}/fotolab/subcommands/sharpen.py +0 -0
- {fotolab-0.31.14 → fotolab-0.31.15}/fotolab/subcommands/watermark.py +0 -0
@@ -18,6 +18,7 @@
|
|
18
18
|
import argparse
|
19
19
|
import logging
|
20
20
|
from pathlib import Path
|
21
|
+
from contextlib import ExitStack
|
21
22
|
|
22
23
|
from PIL import Image
|
23
24
|
|
@@ -150,14 +151,13 @@ def run(args: argparse.Namespace) -> None:
|
|
150
151
|
log.debug(args)
|
151
152
|
|
152
153
|
first_image_filepath = args.image_filenames[0]
|
153
|
-
main_frame = None
|
154
154
|
other_frames = []
|
155
155
|
|
156
|
-
|
157
|
-
main_frame = Image.open(first_image_filepath)
|
156
|
+
with ExitStack() as stack:
|
157
|
+
main_frame = stack.enter_context(Image.open(first_image_filepath))
|
158
158
|
|
159
159
|
for image_filename in args.image_filenames[1:]:
|
160
|
-
img = Image.open(image_filename)
|
160
|
+
img = stack.enter_context(Image.open(image_filename))
|
161
161
|
other_frames.append(img)
|
162
162
|
|
163
163
|
image_file = Path(first_image_filepath)
|
@@ -188,11 +188,6 @@ def run(args: argparse.Namespace) -> None:
|
|
188
188
|
save_kwargs["method"] = args.webp_method
|
189
189
|
|
190
190
|
main_frame.save(new_filename, **save_kwargs)
|
191
|
-
finally:
|
192
|
-
if main_frame:
|
193
|
-
main_frame.close()
|
194
|
-
for frame in other_frames:
|
195
|
-
frame.close()
|
196
191
|
|
197
192
|
if args.open:
|
198
193
|
_open_image(new_filename)
|
@@ -20,7 +20,7 @@ classifiers = [
|
|
20
20
|
"Programming Language :: Python :: 3.13",
|
21
21
|
"Programming Language :: Python",
|
22
22
|
]
|
23
|
-
version = "0.31.
|
23
|
+
version = "0.31.15"
|
24
24
|
dynamic = ["description"]
|
25
25
|
keywords = ["photography", "photo"]
|
26
26
|
dependencies = [
|
@@ -54,3 +54,7 @@ dev = [
|
|
54
54
|
"sphinx-copybutton",
|
55
55
|
"tomli",
|
56
56
|
]
|
57
|
+
|
58
|
+
# verify through: uv run ruff check --show-settings
|
59
|
+
[tool.ruff]
|
60
|
+
line-length = 79
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|