Skip to content

Commit c4704e9

Browse files
committed
"Update ruff pre-commit hook
"
1 parent 4c5320b commit c4704e9

3 files changed

Lines changed: 4 additions & 3 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_turtle.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,8 @@ def __init__(self, display: Optional[busdisplay.BusDisplay] = None, scale: float
264264
self._bg_addon_group = displayio.Group()
265265
self._splash.append(self._bg_addon_group)
266266
self._fg_scale: int = int(scale)
267-
self._w = self._w // self._fg_scale
268-
self._h = self._h // self._fg_scale
267+
self._w //= self._fg_scale
268+
self._h //= self._fg_scale
269269
self._fg_bitmap = displayio.Bitmap(self._w, self._h, len(Color.colors))
270270

271271
self._fg_palette = displayio.Palette(len(Color.colors))

ruff.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ ignore = [
103103
"PLC2701", # private import
104104
"UP007", # x | y typing
105105
"UP006", # builtin instead of typing import
106+
"UP045", # use X | None for optional type annotations
106107
"PLR0914", # too many locals
107108
]
108109

0 commit comments

Comments
 (0)