You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As currently written, assignment of TYPES to the module variable types blocks access to the submodule named types. This effectively blocks all programmatic access to the types submodule that contains class definitions for the matchers. This makes it impossible to subclass existing Type definitions.
I would like to update the mimetype for fonts that currently use a deprecated value without redefining the header. Python complains:
class Woff(FontMixin, filetype.types.font.Woff):
^^^^^^^^^^^^^^^^^^^
AttributeError: 'list' object has no attribute 'font'
filetype.types is no longer accessible as a submodule because it has been overwritten with a list!
Is there a need for filetype.types == filetype.TYPES?
The text was updated successfully, but these errors were encountered:
https://github.com/h2non/filetype.py/blob/b5e2d926e1c2031239927659dbfbfeb7eb35596b/filetype/filetype.py#L9C1-L10C1
As currently written, assignment of
TYPES
to the module variabletypes
blocks access to the submodule namedtypes
. This effectively blocks all programmatic access to thetypes
submodule that contains class definitions for the matchers. This makes it impossible to subclass existingType
definitions.I would like to update the mimetype for fonts that currently use a deprecated value without redefining the header. Python complains:
filetype.types
is no longer accessible as a submodule because it has been overwritten with a list!Is there a need for
filetype.types == filetype.TYPES
?The text was updated successfully, but these errors were encountered: