From f2862d4475b0b903e0a9e3e8e9a3047018860694 Mon Sep 17 00:00:00 2001 From: Fini Jastrow Date: Sun, 31 Mar 2024 01:34:29 +0100 Subject: [PATCH] Fix CodeClimate Fix [why] When we add a dummy we need to remove that later on. Originally that has been introduces to avoid a wrong code duplication warning. See how the blank leaks into the name: ERROR: ====-< Family (ID 1) too long (38 > 31): ZedMono Nerd Font Extended ExtraBold DEBUG: =====> SubFamily (ID 2) ok ( 6 <=31): Italic DEBUG: =====> Fullname (ID 4) ok (45 <=63): ZedMono Nerd Font Extended ExtraBold Italic DEBUG: =====> PSN (ID 6) ok (33 <=63): ZedMonoNF-ExtendedExtraBoldItalic DEBUG: =====> PrefFamily (ID 16) ok (17 <=31): ZedMono Nerd Font DEBUG: =====> PrefStyles (ID 17) ok (27 <=31): Extended ExtraBold Italic DEBUG: =====> PrefStyles (ID 17) ok (27 <=31): Extended ExtraBold Italic DEBUG: =====> Filename 'ZedMonoNerdFont-ExtendedExtraBoldItalic.ttf' (Note trailing blanks even in ID 1.) Signed-off-by: Fini Jastrow --- bin/scripts/name_parser/FontnameTools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/scripts/name_parser/FontnameTools.py b/bin/scripts/name_parser/FontnameTools.py index 39eb4c48d..e8544b4cf 100644 --- a/bin/scripts/name_parser/FontnameTools.py +++ b/bin/scripts/name_parser/FontnameTools.py @@ -251,7 +251,7 @@ class FontnameTools: 'Heavy': ('Hv', 'Heavy'), 'Thin': ('Th', 'Thin'), 'Light': ('Lt', 'Light'), - ' ': (), # Just for CodeClimate :-/ + '': (), # Just for CodeClimate :-/ } known_styles = [ # Keywords that end up as style (i.e. a RIBBI set) 'Bold', 'Italic', 'Regular', 'Normal'