From d58a2bd7c29e457c0002ba552b93f732798927cd Mon Sep 17 00:00:00 2001 From: pushfoo <36696816+pushfoo@users.noreply.github.com> Date: Thu, 18 Jul 2024 20:40:07 -0400 Subject: [PATCH] Replace variable re-assignment with local variable typed purely to Vec2 --- arcade/sprite/base.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arcade/sprite/base.py b/arcade/sprite/base.py index b3caace2e2..bae523e594 100644 --- a/arcade/sprite/base.py +++ b/arcade/sprite/base.py @@ -374,10 +374,10 @@ def scale(self, new_scale: Point2 | AsFloat): if scale_x == old_scale[0] and scale_y == old_scale[1]: return - new_scale = Vec2(scale_x, scale_y) - self._hit_box.scale = new_scale - self._scale = new_scale - self._size = new_scale * self._texture.size + processed_scale: Vec2 = Vec2(scale_x, scale_y) + self._hit_box.scale = processed_scale + self._scale = processed_scale + self._size = processed_scale * self._texture.size self.update_spatial_hash() for sprite_list in self.sprite_lists: