Skip to content

Commit 6d0626a

Browse files
committed
format code
1 parent 6d09e2e commit 6d0626a

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ci:
66
autoupdate_commit_msg: "chore: auto update by pre-commit hooks"
77
repos:
88
- repo: https://github.com/astral-sh/ruff-pre-commit
9-
rev: v0.7.2
9+
rev: v0.11.7
1010
hooks:
1111
- id: ruff
1212
args: [--fix, --exit-non-zero-on-fix]

meme_generator/memes/spider/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import random
12
from datetime import datetime
23
from pathlib import Path
3-
import random
44

55
from PIL.Image import Image as IMG
66
from pil_utils import BuildImage
@@ -12,7 +12,7 @@
1212

1313

1414
def spider(images: list[BuildImage], texts, args):
15-
head = images[0].convert("RGBA").circle().resize((80,80))
15+
head = images[0].convert("RGBA").circle().resize((80, 80))
1616
# fmt: off
1717
Xs = [
1818
174, 174, 174, 169,
@@ -32,7 +32,7 @@ def spider(images: list[BuildImage], texts, args):
3232
# fmt: on
3333
frames: list[IMG] = []
3434
for i in range(52):
35-
pos = (Xs[i],24+random.randint(-1,1))
35+
pos = (Xs[i], 24 + random.randint(-1, 1))
3636
frame = BuildImage.open(img_dir / f"{i}.png")
3737
frame.paste(head, pos, alpha=True)
3838
frames.append(frame.image)
@@ -45,6 +45,6 @@ def spider(images: list[BuildImage], texts, args):
4545
min_images=1,
4646
max_images=1,
4747
keywords=["蜘蛛", "蜘蛛爬"],
48-
date_created=datetime(2025,4,27),
49-
date_modified=datetime(2025,4,27),
48+
date_created=datetime(2025, 4, 27),
49+
date_modified=datetime(2025, 4, 27),
5050
)

0 commit comments

Comments
 (0)