quodlibet / mutagen

Python module for handling audio metadata

Home Page:https://mutagen.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adding type hints

k3-cat opened this issue · comments

Mutagen is a brilliant tool for view and edit media metadata, however, I've found that it is currently lacking of type hints.

Type hints can help IDEs or linters do many things such as static syntex check, autocomplete and so on. Every new version of Python are adding new function about type hints now. The best part is, Python 3.6 already support some basic hinting grammar.

If you don't mind, I can help with adding type hints for those commonly used classes.

I recently used Mutagen for the first time to add cover art to an audio file. Thanks to ChatGPT, I was able to figure things out quite easily. However, I believe this package should incorporate Python's typehints.

By including typehints in the code, this package would become more user-friendly. Developers will also receive necessary suggestions from their IDEs based on the provided typehints.

Kindly consider this improvement in development and code readability for the package.

Duplicate of #486 . Some initial work in this direction had been done in #486 already, but only to some very few places.