Skip to content

Commit

Permalink
Run ./make.py format
Browse files Browse the repository at this point in the history
  • Loading branch information
pushfoo committed Sep 29, 2024
1 parent e837c76 commit 210837c
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 10 deletions.
1 change: 0 additions & 1 deletion arcade/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from typing import Any, Iterable, Sequence

import pyglet

from PIL import Image
from pyglet import gl
from pyglet.graphics.shader import UniformBufferObject
Expand Down
6 changes: 2 additions & 4 deletions arcade/hitbox/pymunk.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
simplify_curves,
)

from arcade.types import Point2, Point2List, RGBA255
from arcade.types import RGBA255, Point2, Point2List

from .base import HitBoxAlgorithm

Expand Down Expand Up @@ -121,9 +121,7 @@ def trace_image(self, image: Image) -> PolylineSet:
of :py:class:`~pymunk.autogeometry.PolylineSet` of line sets.
"""
if image.mode != "RGBA":
raise ValueError(
"Image's mode!='RGBA'! Try using image.convert(\"RGBA\")."
)
raise ValueError("Image's mode!='RGBA'! Try using image.convert(\"RGBA\").")

def sample_func(sample_point: Point2) -> int:
"""Function used to sample image."""
Expand Down
5 changes: 2 additions & 3 deletions arcade/sprite/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,8 @@ def load_animated_gif(resource_name: str | Path) -> TextureAnimationSprite:

# Pillow doc recommends testing for the is_animated attribute as of 10.0.0
# https://pillow.readthedocs.io/en/stable/deprecations.html#categories
if (
not getattr(image_object, "is_animated", False)
or not (n_frames := getattr(image_object, "n_frames", 0))
if not getattr(image_object, "is_animated", False) or not (
n_frames := getattr(image_object, "n_frames", 0)
):
raise TypeError(f"The file {resource_name} is not an animated gif.")

Expand Down
2 changes: 1 addition & 1 deletion arcade/texture_atlas/atlas_default.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
from weakref import WeakSet, WeakValueDictionary, finalize

import PIL.Image
from PIL.Image import Resampling
from PIL import Image, ImageDraw
from PIL.Image import Resampling
from pyglet.image.atlas import (
Allocator,
AllocatorException,
Expand Down
3 changes: 2 additions & 1 deletion arcade/tilemap/tilemap.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
get_window,
)
from arcade.hitbox import HitBoxAlgorithm, RotatableHitBox
from arcade.types import Color as ArcadeColor, RGBA255
from arcade.types import RGBA255
from arcade.types import Color as ArcadeColor

if TYPE_CHECKING:
from arcade import DefaultTextureAtlas, Texture
Expand Down

0 comments on commit 210837c

Please sign in to comment.