Skip to content

Commit 59b9e5f

Browse files
authored
Merge pull request #186 from alexwlchan/dependabot/pip/ruff-0.9.4
Bump ruff from 0.9.3 to 0.9.4
2 parents 0101703 + 792f304 commit 59b9e5f

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

images/squarify.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,25 @@
99
from PIL import Image
1010

1111

12-
if __name__ == '__main__':
12+
if __name__ == "__main__":
1313
try:
1414
path = Path(sys.argv[1])
1515
except IndexError:
1616
sys.exit(f"Usage: {__file__} IMAGE_PATH")
17-
17+
1818
im = Image.open(path)
19-
19+
2020
out_path = path.with_suffix(".square" + path.suffix)
2121
assert out_path != path
22-
22+
2323
if im.width == im.height:
2424
print(path)
2525
elif im.width > im.height:
2626
left = (im.width - im.height) / 2
2727
upper = 0
2828
right = im.width - (im.width - im.height) / 2
2929
lower = im.height
30-
30+
3131
crop_im = im.crop((left, upper, right, lower))
3232
crop_im.save(out_path)
3333
print(out_path)
@@ -36,10 +36,9 @@
3636
upper = (im.height - im.width) / 2
3737
right = im.width
3838
lower = im.height - (im.height - im.width) / 2
39-
39+
4040
crop_im = im.crop((left, upper, right, lower))
4141
crop_im.save(out_path)
4242
print(out_path)
43-
44-
45-
# main()
43+
44+
# main()

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ python-multipart==0.0.6
145145
# via asgi-csrf
146146
pyyaml==6.0.1
147147
# via datasette
148-
ruff==0.9.3
148+
ruff==0.9.4
149149
# via -r requirements.in
150150
s3transfer==0.10.2
151151
# via boto3

0 commit comments

Comments
 (0)