reduce ruff noise with raylib
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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,
|
||||
):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user