Skip to content

Commit 7f0466c

Browse files
committed
"Update ruff pre-commit hook
"
1 parent bf6c2ad commit 7f0466c

4 files changed

Lines changed: 6 additions & 7 deletions

File tree

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ repos:
1010
- id: end-of-file-fixer
1111
- id: trailing-whitespace
1212
- repo: https://github.com/astral-sh/ruff-pre-commit
13-
rev: v0.3.4
13+
rev: v0.15.8
1414
hooks:
1515
- id: ruff-format
1616
- id: ruff

adafruit_display_shapes/polygon.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ def _line_on(
135135

136136
def pt_on(x, y, pt_size=1):
137137
if pt_size > 1:
138-
x = x + pt_size // 2
139-
y = y + pt_size // 2
138+
x += pt_size // 2
139+
y += pt_size // 2
140140
bitmaptools.fill_region(
141141
bitmap,
142142
x - (pt_size // 2),

examples/display_shapes_circle_animation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@
5454
if circle.y - circle_radius <= 0 - circle_radius:
5555
delta_y = 1
5656

57-
circle.x = circle.x + delta_x
58-
circle.y = circle.y + delta_y
57+
circle.x += delta_x
58+
circle.y += delta_y
5959

6060
time.sleep(0.02)
6161
gc.collect()

ruff.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ extend-select = [
1717
"PLC2401", # non-ascii-name
1818
"PLC2801", # unnecessary-dunder-call
1919
"PLC3002", # unnecessary-direct-lambda-call
20-
"E999", # syntax-error
21-
"PLE0101", # return-in-init
20+
"PLE0101", # return-in-init
2221
"F706", # return-outside-function
2322
"F704", # yield-outside-function
2423
"PLE0116", # continue-in-finally

0 commit comments

Comments
 (0)