summaryrefslogtreecommitdiff
path: root/lib/lettering
diff options
context:
space:
mode:
authorcapellancitizen <thecapellancitizen@gmail.com>2025-03-09 21:21:48 -0400
committerGitHub <noreply@github.com>2025-03-09 21:21:48 -0400
commit99509df8d8abf1e7b701a4a09cf170a362f6d878 (patch)
treea461549502fa9f37dc287789b6c7db81dfcd5368 /lib/lettering
parent0d2fc24f25f87562f0755b53dad6204efad1330d (diff)
Mypy type correctness (#3199)
Diffstat (limited to 'lib/lettering')
-rw-r--r--lib/lettering/categories.py7
-rw-r--r--lib/lettering/font_info.py2
2 files changed, 4 insertions, 5 deletions
diff --git a/lib/lettering/categories.py b/lib/lettering/categories.py
index 9a63063a..e7e81b3f 100644
--- a/lib/lettering/categories.py
+++ b/lib/lettering/categories.py
@@ -7,9 +7,9 @@ from ..i18n import _
class FontCategory:
- def __init__(self, cat_id=None, name=None):
- self.id: str = cat_id
- self.name: str = name
+ def __init__(self, cat_id: str, name: str) -> None:
+ self.id = cat_id
+ self.name = name
def __repr__(self):
return "FontCategory(%s, %s)" % (self.id, self.name)
@@ -35,5 +35,4 @@ FONT_CATEGORIES = [
FontCategory('hebrew', _("Script: hebrew")),
FontCategory('japanese', _("Script: japanese")),
FontCategory('latin', _("Script: latin"))
-
]
diff --git a/lib/lettering/font_info.py b/lib/lettering/font_info.py
index 74cc0967..8bf35900 100644
--- a/lib/lettering/font_info.py
+++ b/lib/lettering/font_info.py
@@ -5,7 +5,7 @@
from collections import defaultdict
-from fontTools.agl import toUnicode
+from fontTools.agl import toUnicode # type:ignore[import-untyped]
from inkex import NSS
from lxml import etree