Skip to content

Commit 16abf93

Browse files
committed
reduce ruff noise with raylib
1 parent d3cc32d commit 16abf93

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ lint.ignore = [
235235
"B027",
236236
"B024",
237237
"NPY002", # new numpy random syntax is worse
238+
"UP045", "UP007", # these don't play nice with raylib atm
238239
]
239240
line-length = 160
240241
target-version ="py311"

system/ui/lib/shader_polygon.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ def cleanup(self):
152152
self.initialized = False
153153

154154

155-
def _configure_shader_color(state: ShaderState, color: Optional[rl.Color], # noqa: UP045
155+
def _configure_shader_color(state: ShaderState, color: Optional[rl.Color],
156156
gradient: Gradient | None, origin_rect: rl.Rectangle):
157157
assert (color is not None) != (gradient is not None), "Either color or gradient must be provided"
158158

@@ -202,7 +202,7 @@ def triangulate(pts: np.ndarray) -> list[tuple[float, float]]:
202202

203203

204204
def draw_polygon(origin_rect: rl.Rectangle, points: np.ndarray,
205-
color: Optional[rl.Color] = None, gradient: Gradient | None = None): # noqa: UP045
205+
color: Optional[rl.Color] = None, gradient: Gradient | None = None):
206206

207207
"""
208208
Draw a ribbon polygon (two chains) with a triangle strip and gradient.

system/ui/widgets/label.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def __init__(self,
105105
text_alignment_vertical: int = rl.GuiTextAlignmentVertical.TEXT_ALIGN_MIDDLE,
106106
text_padding: int = 0,
107107
text_color: rl.Color = DEFAULT_TEXT_COLOR,
108-
icon: Union[rl.Texture, None] = None, # noqa: UP007
108+
icon: Union[rl.Texture, None] = None,
109109
elide_right: bool = False,
110110
):
111111

0 commit comments

Comments
 (0)