From 03cbe8553517ec80e5763097a16aac40a696effc Mon Sep 17 00:00:00 2001 From: David Sangrey Date: Tue, 11 Nov 2025 23:17:02 -0500 Subject: [PATCH] [2116] A Few More Hand-Overs --- EDMarketConnector.py | 2 +- plugins/edsm.py | 10 +++++----- plugins/inara.py | 4 ++-- plugins/spansh_core.py | 5 +++-- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/EDMarketConnector.py b/EDMarketConnector.py index 0bdfb8c9..a59bbebc 100755 --- a/EDMarketConnector.py +++ b/EDMarketConnector.py @@ -2052,7 +2052,7 @@ def show_killswitch_poppup(root=None): idx += 1 idx += 1 - ok_button = tk.Button(frame, text="Ok", command=tl.destroy) + ok_button = ttk.Button(frame, text="Ok", command=tl.destroy) ok_button.grid(columnspan=2, sticky=tk.EW) diff --git a/plugins/edsm.py b/plugins/edsm.py index a2e5004f..e1e6b168 100644 --- a/plugins/edsm.py +++ b/plugins/edsm.py @@ -90,11 +90,11 @@ class This: self.newgame: bool = False # starting up - batch initial burst of events self.newgame_docked: bool = False # starting up while docked self.navbeaconscan: int = 0 # batch up burst of Scan events after NavBeaconScan - self.system_link: tk.Widget | None = None + self.system_link: ttk.Widget | None = None self.system_name: tk.Tk | None = None self.system_address: int | None = None # Frontier SystemAddress self.system_population: int | None = None - self.station_link: tk.Widget | None = None + self.station_link: ttk.Widget | None = None self.station_name: str | None = None self.station_marketid: int | None = None # Frontier MarketID self.on_foot = False @@ -109,7 +109,7 @@ class This: self.log: tk.IntVar | None = None self.log_button: ttk.Checkbutton | None = None - self.label: tk.Widget | None = None + self.label: ttk.Widget | None = None self.cmdr_label: nb.Label | None = None self.cmdr_text: nb.Label | None = None @@ -729,8 +729,8 @@ def send_to_edsm( # noqa: CCR001 # Respect rate limits if they exist if remaining == 0: # Calculate sleep time until the rate limit reset time - reset_time = datetime.utcfromtimestamp(reset) - current_time = datetime.utcnow() + reset_time = datetime.fromtimestamp(reset, tz=timezone.utc) + current_time = datetime.now(timezone.utc) sleep_time = (reset_time - current_time).total_seconds() diff --git a/plugins/inara.py b/plugins/inara.py index e398a3f3..d2fd1efc 100644 --- a/plugins/inara.py +++ b/plugins/inara.py @@ -113,11 +113,11 @@ class This: self.timer_run = True # Main window clicks - self.system_link: tk.Widget = None # type: ignore + self.system_link: ttk.Widget = None # type: ignore self.system_name: str | None = None # type: ignore self.system_address: str | None = None # type: ignore self.system_population: int | None = None - self.station_link: tk.Widget = None # type: ignore + self.station_link: ttk.Widget = None # type: ignore self.station_name = None self.station_marketid = None diff --git a/plugins/spansh_core.py b/plugins/spansh_core.py index 1b7536c5..5a3e541d 100644 --- a/plugins/spansh_core.py +++ b/plugins/spansh_core.py @@ -22,6 +22,7 @@ referenced in this file (or only in any other core plugin), and if so... from __future__ import annotations import tkinter as tk +from tkinter import ttk from typing import Any import requests from companion import CAPIData @@ -39,11 +40,11 @@ class This: def __init__(self): self.parent: tk.Tk self.shutting_down = False # Plugin is shutting down. - self.system_link: tk.Widget = None # type: ignore + self.system_link: ttk.Widget = None # type: ignore self.system_name: str | None = None self.system_address: str | None = None self.system_population: int | None = None - self.station_link: tk.Widget = None # type: ignore + self.station_link: ttk.Widget = None # type: ignore self.station_name = None self.station_marketid = None self.on_foot = False