From 08dc8367c568cb70d9a01347eb92e54fbcb7ab80 Mon Sep 17 00:00:00 2001 From: Melissa LeBlanc-Williams Date: Thu, 29 May 2025 14:43:32 -0700 Subject: [PATCH] Fix pylint issues --- Metro/Metro_RP2350_Matching_Game/code.py | 9 ++++++++- Metro/Metro_RP2350_Matching_Game/gamelogic.py | 6 ++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Metro/Metro_RP2350_Matching_Game/code.py b/Metro/Metro_RP2350_Matching_Game/code.py index c8a0b613e..79aad98f3 100755 --- a/Metro/Metro_RP2350_Matching_Game/code.py +++ b/Metro/Metro_RP2350_Matching_Game/code.py @@ -142,7 +142,14 @@ ui_group = Group() main_group.append(ui_group) # Create the game logic object -game_logic = GameLogic(display, game_grid, swap_piece, selected_piece_group, GAME_PIECES) # pylint: disable=no-value-for-parameter +# pylint: disable=no-value-for-parameter, too-many-function-args +game_logic = GameLogic( + display, + game_grid, + swap_piece, + selected_piece_group, + GAME_PIECES +) # Create the mouse graphics and add to the main group mouse = find_and_init_boot_mouse("/bitmaps/mouse_cursor.bmp") diff --git a/Metro/Metro_RP2350_Matching_Game/gamelogic.py b/Metro/Metro_RP2350_Matching_Game/gamelogic.py index 916163069..c0ec7da33 100755 --- a/Metro/Metro_RP2350_Matching_Game/gamelogic.py +++ b/Metro/Metro_RP2350_Matching_Game/gamelogic.py @@ -386,7 +386,8 @@ class GameLogic: return True, len(all_matches) > 0 - def check_horizontal_match(self, grid, row, column, piece): + @staticmethod + def check_horizontal_match(grid, row, column, piece): """Check for horizontal 3-in-a-row matches centered around or including the given position.""" matches = [] @@ -404,7 +405,8 @@ class GameLogic: return matches - def check_vertical_match(self, grid, row, column, piece): + @staticmethod + def check_vertical_match(grid, row, column, piece): """Check for vertical 3-in-a-row matches centered around or including the given position.""" matches = [] rows = len(grid)