From 34e73dcfb2a2526d770de62542f52efef0c7f33b Mon Sep 17 00:00:00 2001 From: David Sangrey Date: Thu, 16 Oct 2025 16:34:16 -0400 Subject: [PATCH] Updated Linter Suppression for Existing --- EDMarketConnector.py | 2 +- companion.py | 2 +- dashboard.py | 4 ++-- prefs.py | 2 +- scripts/find_localised_strings.py | 2 +- theme.py | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/EDMarketConnector.py b/EDMarketConnector.py index 1b45225a..92f34a48 100755 --- a/EDMarketConnector.py +++ b/EDMarketConnector.py @@ -2248,7 +2248,7 @@ sys.path: {sys.path}''' msg = tk.messagebox.askyesno( title=title, message=message, detail=detail, icon=tkinter.messagebox.ERROR, type=tkinter.messagebox.YESNO, parent=root - ) + ) # type: ignore if msg: webbrowser.open( "https://github.com/EDCD/EDMarketConnector/issues/new?" diff --git a/companion.py b/companion.py index 0f16e237..384dcdd5 100644 --- a/companion.py +++ b/companion.py @@ -705,7 +705,7 @@ class Session: self.credentials = credentials self.state = Session.STATE_INIT - self.auth = Auth(self.credentials['cmdr']) + self.auth = Auth(self.credentials['cmdr']) # type: ignore access_token = self.auth.refresh() if access_token: diff --git a/dashboard.py b/dashboard.py index cae2cc96..60d5316f 100644 --- a/dashboard.py +++ b/dashboard.py @@ -123,12 +123,12 @@ class Dashboard(FileSystemEventHandler): if self.observer: logger.debug('Calling self.observer.stop()') - self.observer.stop() + self.observer.stop() # type: ignore logger.debug('Done') if self.observer: logger.debug('Joining self.observer...') - self.observer.join() + self.observer.join() # type: ignore logger.debug('Done') self.observer = None # type: ignore diff --git a/prefs.py b/prefs.py index 51525bd4..762d9a27 100644 --- a/prefs.py +++ b/prefs.py @@ -209,7 +209,7 @@ if sys.platform == 'win32': config_home: The home directory path Returns: Localized path as string - """ + """ # noqa: D205, D407 if not path: return path diff --git a/scripts/find_localised_strings.py b/scripts/find_localised_strings.py index 362d54bc..19a5efb6 100644 --- a/scripts/find_localised_strings.py +++ b/scripts/find_localised_strings.py @@ -28,7 +28,7 @@ def get_arg(call: ast.Call) -> str: arg = call.args[0] if isinstance(arg, ast.Constant): - return arg.value + return str(arg.value) if isinstance(arg, ast.Name): return f"VARIABLE! CHECK CODE! {arg.id}" return f"Unknown! {type(arg)=} {ast.dump(arg)} ||| {ast.unparse(arg)}" diff --git a/theme.py b/theme.py index 2f00731e..99ccb158 100644 --- a/theme.py +++ b/theme.py @@ -222,7 +222,7 @@ class _Theme: widget = event.widget if widget and widget['state'] != tk.DISABLED: try: - widget.configure(state=tk.ACTIVE) + widget.configure(state=tk.ACTIVE) # type: ignore except Exception: logger.exception(f'Failure setting widget active: {widget=}') @@ -239,7 +239,7 @@ class _Theme: widget = event.widget if widget and widget['state'] != tk.DISABLED: try: - widget.configure(state=tk.NORMAL) + widget.configure(state=tk.NORMAL) # type: ignore except Exception: logger.exception(f'Failure setting widget normal: {widget=}')