From ee8e2d8d294380219f8a10b632c6e535a65eb79b Mon Sep 17 00:00:00 2001 From: Namit Arjaria Date: Wed, 31 Jul 2024 18:10:54 +0530 Subject: [PATCH] chore: Linting with Ruff Signed-off-by: Namit Arjaria --- game.py | 15 --------------- main.py | 2 +- updater.py | 1 - win_celebration.py | 1 - 4 files changed, 1 insertion(+), 18 deletions(-) diff --git a/game.py b/game.py index 33621e0..5f13351 100644 --- a/game.py +++ b/game.py @@ -194,11 +194,6 @@ def zoom_out(self): self.resize_cards() self.display_cards() - def on_closing(self): - self.rules_manager.save_preferences() - self.master.destroy() - self.updater.stop_update_check_thread() - def resize_cards(self): self.card_width = int(80 * self.zoom_factor) self.card_height = int(120 * self.zoom_factor) @@ -651,16 +646,6 @@ def move_card(self, cards, from_house, to_house): if len(to_house) > len(cards): to_house[-len(cards) - 1].cards_above = [cards[0]] - def on_card_motion(self, event): - if self.drag_data["item"]: - dx = event.x - self.drag_data["x"] - dy = event.y - self.drag_data["y"] - for card in self.drag_data["cards"]: - item = self.get_card_item(card) - self.game_canvas.move(item, dx, dy) - self.drag_data["x"] = event.x - self.drag_data["y"] = event.y - def check_win(self): valid_house_count = 0 diff --git a/main.py b/main.py index db37bd6..e02c826 100644 --- a/main.py +++ b/main.py @@ -1,4 +1,4 @@ -from game import PatienceGame, CURRENT_VERSION +from game import PatienceGame import tkinter as tk if __name__ == "__main__": diff --git a/updater.py b/updater.py index 5ee2763..fcacd9a 100644 --- a/updater.py +++ b/updater.py @@ -1,5 +1,4 @@ import requests -import tkinter as tk from tkinter import messagebox import threading import time diff --git a/win_celebration.py b/win_celebration.py index cc377c4..c827451 100644 --- a/win_celebration.py +++ b/win_celebration.py @@ -1,4 +1,3 @@ -import tkinter as tk from tkinter import messagebox