From 794663f74ea3d5113c2229b5cbd07e301f7248e4 Mon Sep 17 00:00:00 2001 From: MeGaGiGaGon <107241144+MeGaGiGaGon@users.noreply.github.com> Date: Thu, 10 Apr 2025 17:59:45 -0700 Subject: fix whitespace and file end lints --- bot/exts/utils/utils.py | 4 ++-- tests/bot/exts/utils/test_utils.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bot/exts/utils/utils.py b/bot/exts/utils/utils.py index 9bd4b1757..d83dbc2ce 100644 --- a/bot/exts/utils/utils.py +++ b/bot/exts/utils/utils.py @@ -125,10 +125,10 @@ class Utils(Cog): start_index = int(match.group("start")) if match.group("start") else None end_index = int(match.group("end")) if match.group("end") else None step_size = int(match.group("step")) if match.group("step") else 1 - + if step_size == 0: raise BadArgument(f"Step size must not be 0.") - + lines = zen_lines[start_index:end_index:step_size] if not lines: raise BadArgument(f"Slice returned 0 lines.") diff --git a/tests/bot/exts/utils/test_utils.py b/tests/bot/exts/utils/test_utils.py index 17cfe05b8..9b8ea4ade 100644 --- a/tests/bot/exts/utils/test_utils.py +++ b/tests/bot/exts/utils/test_utils.py @@ -91,4 +91,4 @@ class ZenTests(unittest.IsolatedAsyncioTestCase): for input_slice in slices: with self.subTest(input_slice = input_slice), self.assertRaises(BadArgument): - await self.cog.zen.callback(self.cog, self.ctx, search_value=input_slice) \ No newline at end of file + await self.cog.zen.callback(self.cog, self.ctx, search_value=input_slice) -- cgit v1.2.3