From e1f7f4b59c0b78f103d9479657150187bade7283 Mon Sep 17 00:00:00 2001 From: Fini Jastrow Date: Wed, 3 Apr 2024 10:40:10 +0200 Subject: [PATCH] name-parser: Prevent wrong modifier detection [why] Modifier on their own are not allowed (except "Demi"). The previous commit where we changed the CodeClimate fix from ' ' to '' allowed any modifier to be a stand alone detected word. This resulted in this font name: RecMonoCasual Nerd Font Propo Semi [how] Remove the cumbesome CodeClimate kludge completely, it just makes the code more complex without any real benefit. Codeclimate just complains because our tables look so "similar" :rolleyes: That's data dude! Signed-off-by: Fini Jastrow --- bin/scripts/name_parser/FontnameTools.py | 1 - 1 file changed, 1 deletion(-) diff --git a/bin/scripts/name_parser/FontnameTools.py b/bin/scripts/name_parser/FontnameTools.py index d79ab567c..bbb5b142e 100644 --- a/bin/scripts/name_parser/FontnameTools.py +++ b/bin/scripts/name_parser/FontnameTools.py @@ -252,7 +252,6 @@ class FontnameTools: 'Thin': ('Th', 'Thin'), 'Thick': ('Tk', 'Thck'), 'Light': ('Lt', 'Light'), - '': (), # Just for CodeClimate :-/ } known_styles = [ # Keywords that end up as style (i.e. a RIBBI set) 'Bold', 'Italic', 'Regular', 'Normal'