reduce ruff noise with raylib

This commit is contained in:
Adeeb Shihadeh
2025-11-17 22:40:33 -08:00
parent d3cc32ddca
commit 16abf93be8
3 changed files with 4 additions and 3 deletions

View File

@@ -235,6 +235,7 @@ lint.ignore = [
"B027",
"B024",
"NPY002", # new numpy random syntax is worse
"UP045", "UP007", # these don't play nice with raylib atm
]
line-length = 160
target-version ="py311"

View File

@@ -152,7 +152,7 @@ class ShaderState:
self.initialized = False
def _configure_shader_color(state: ShaderState, color: Optional[rl.Color], # noqa: UP045
def _configure_shader_color(state: ShaderState, color: Optional[rl.Color],
gradient: Gradient | None, origin_rect: rl.Rectangle):
assert (color is not None) != (gradient is not None), "Either color or gradient must be provided"
@@ -202,7 +202,7 @@ def triangulate(pts: np.ndarray) -> list[tuple[float, float]]:
def draw_polygon(origin_rect: rl.Rectangle, points: np.ndarray,
color: Optional[rl.Color] = None, gradient: Gradient | None = None): # noqa: UP045
color: Optional[rl.Color] = None, gradient: Gradient | None = None):
"""
Draw a ribbon polygon (two chains) with a triangle strip and gradient.

View File

@@ -105,7 +105,7 @@ class Label(Widget):
text_alignment_vertical: int = rl.GuiTextAlignmentVertical.TEXT_ALIGN_MIDDLE,
text_padding: int = 0,
text_color: rl.Color = DEFAULT_TEXT_COLOR,
icon: Union[rl.Texture, None] = None, # noqa: UP007
icon: Union[rl.Texture, None] = None,
elide_right: bool = False,
):