From 99509df8d8abf1e7b701a4a09cf170a362f6d878 Mon Sep 17 00:00:00 2001 From: capellancitizen Date: Sun, 9 Mar 2025 21:21:48 -0400 Subject: Mypy type correctness (#3199) --- lib/debug/debugger.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'lib/debug/debugger.py') diff --git a/lib/debug/debugger.py b/lib/debug/debugger.py index 11293c8a..c58ddb3e 100644 --- a/lib/debug/debugger.py +++ b/lib/debug/debugger.py @@ -125,6 +125,10 @@ # to see flask server url routes: # - comment out the line self.disable_logging() in run() of lib/api/server.py +# We have some ignores so you don't see errors if you don't have one or more of the debugger libraries installed. +# But in turn those ignores will cause unused-ignore errors if those libraries aren't installed... +# mypy: disable-error-code="unused-ignore" + import os import sys @@ -148,11 +152,11 @@ def init_debugger(debug_type:str, ini: dict): try: if debugger == 'vscode': - import debugpy + import debugpy # type: ignore[import-untyped, import-not-found] elif debugger == 'pycharm': - import pydevd_pycharm + import pydevd_pycharm # type: ignore[import-untyped, import-not-found] elif debugger == 'pydev': - import pydevd + import pydevd # type: ignore[import-untyped, import-not-found] elif debugger == 'file': pass else: -- cgit v1.2.3