Skip to content

Commit

Permalink
chore: Linting with Ruff
Browse files Browse the repository at this point in the history
Signed-off-by: Namit Arjaria <[email protected]>
  • Loading branch information
depleur committed Jul 31, 2024
1 parent f6932e2 commit ee8e2d8
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 18 deletions.
15 changes: 0 additions & 15 deletions game.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from game import PatienceGame, CURRENT_VERSION
from game import PatienceGame
import tkinter as tk

if __name__ == "__main__":
Expand Down
1 change: 0 additions & 1 deletion updater.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import requests
import tkinter as tk
from tkinter import messagebox
import threading
import time
Expand Down
1 change: 0 additions & 1 deletion win_celebration.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import tkinter as tk
from tkinter import messagebox


Expand Down

0 comments on commit ee8e2d8

Please sign in to comment.