DottedCircleFilter module misnamed?
madig opened this issue · 3 comments
madig commented
Doing
ufo2ft/Lib/ufo2ft/filters/dottedCircleFilter.py
Lines 24 to 32 in 5a5f6df
ERROR:ufo2ft.filters:Failed to load filter: {'name': 'DottedCircleFilter', 'pre': True}
Traceback (most recent call last):
File "/home/nikolaus/googlesans-flex/venv/lib/python3.11/site-packages/ufo2ft/filters/__init__.py", line 64, in loadFilters
filterClass = getFilterClass(filterDict["name"], namespace)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/nikolaus/googlesans-flex/venv/lib/python3.11/site-packages/ufo2ft/filters/__init__.py", line 52, in getFilterClass
return getattr(module, className)
^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'ufo2ft.filters.dottedCircleFilter' has no attribute 'DottedCircleFilterFilter'
I suppose the module is misnamed and should lose the Filter
part?
anthrotype commented
you mean the class name is misnamed
ufo2ft/Lib/ufo2ft/filters/__init__.py
Lines 46 to 51 in 5a5f6df
the name in the lib's filter should be "DottedCircle" (or even "Dotted Circle" or "dottedCircle" would work).
We can fix that function to not append "Filter" suffix if it's already there if you like
anthrotype commented
this naming convention was to be able to map from Glyphs.app's sort of filters ("Remove Overlaps", "Transformations", etc.)
madig commented
Hm yes, at least avoiding stuff like FooFilterFilter would make sense.