From 55493cbdeca12b9721f13bbd64060d57147c0166 Mon Sep 17 00:00:00 2001 From: CapellanCitizen <> Date: Sun, 9 Mar 2025 14:46:49 -0400 Subject: [PATCH] Minor changes --- CODING_STYLE.md | 3 +++ lib/debug/utils.py | 6 +++--- lib/threads/color.py | 2 -- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CODING_STYLE.md b/CODING_STYLE.md index 0b8dee885..39fa5244a 100644 --- a/CODING_STYLE.md +++ b/CODING_STYLE.md @@ -31,6 +31,9 @@ if [ "$?" != "0" ]; then fi ``` +Type Annotations +================ + We encourage the use of type annotations in Python code. Type annotations make the code easier to read and understand, for example by making it clear what kinds of data functions accept as arguments and return. Editors and IDEs can also read this type information to power features like autocomplete. diff --git a/lib/debug/utils.py b/lib/debug/utils.py index d7d87e529..a758ab3b8 100644 --- a/lib/debug/utils.py +++ b/lib/debug/utils.py @@ -291,7 +291,7 @@ def with_monkeytype(extension, remaining_args, profile_file_path: Path) -> None: See https://monkeytype.readthedocs.io/en/stable/generation.html for usage instructions. ''' - import monkeytype # type: ignore[import-untyped,import-not-found] + import monkeytype # type: ignore[import-not-found] # Monkeytype will use these environment variables for the db path and to filter the modules respectively. # This is easier than using monkeytype's actual config API, anyway. @@ -302,5 +302,5 @@ def with_monkeytype(extension, remaining_args, profile_file_path: Path) -> None: with monkeytype.trace(): extension.run(args=remaining_args) - print(f"Profiler: monkeytype, db written to '{dbpath}'.\n\ - Run 'MT_DB_PATH={dbpath} monkeytype ...' from the inkstitch repo directory.", file=sys.stderr) + print(f"Profiler: monkeytype, db written to '{dbpath}'.\n\n" + + f"Run 'MT_DB_PATH={dbpath} monkeytype ...' from the inkstitch repo directory.", file=sys.stderr) diff --git a/lib/threads/color.py b/lib/threads/color.py index 07476ac46..e71ebb066 100644 --- a/lib/threads/color.py +++ b/lib/threads/color.py @@ -11,8 +11,6 @@ from pyembroidery.EmbThread import EmbThread class ThreadColor(object): - hex_str_re = re.compile('#([0-9a-z]{3}|[0-9a-z]{6})', re.I) - def __init__(self, color, name=None, number=None, manufacturer=None, description=None, chart=None): ''' avoid error messages: