Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add type annotations #486

Open
jtpavlock opened this issue Aug 16, 2020 · 6 comments
Open

Add type annotations #486

jtpavlock opened this issue Aug 16, 2020 · 6 comments

Comments

@jtpavlock
Copy link

Any thought to adding type annotations so those using Mutagen can take advantage of mypy static type checking?

@lazka
Copy link
Member

lazka commented Aug 16, 2020

All for it. I'll look into adding mypy to CI for starters, so it's easier to review changes.

btw, I think we can start requiring 3.6 if it makes things easier, not sure if it does.

@jtpavlock
Copy link
Author

I think we can start requiring 3.6 if it makes things easier, not sure if it does.

Definitely not a deal breaker, but I think the only difference is 3.5 doesn't support variable annotations.

@lazka
Copy link
Member

lazka commented Aug 19, 2020

variable annotations would be nice.

@phw is bumping to Python 3.6 OK with you?

There are ~90 mypy errors currently. I guess we have to fix/ignore them before we can test this in CI.

@phw
Copy link
Collaborator

phw commented Aug 19, 2020

Yes, I think 3.6 would be ok from Picard side.

Ubuntu 16.04 is using Python 3.5, this is something that could be considered. But from our side this is not a concern, we have other dependency issues with that old Ubuntu LTS. And I think it is just fair to stick with current mutagen version if a project really needs backward compatibility with Python < 3.6.

lazka added a commit to lazka/mutagen that referenced this issue Aug 19, 2020
We now require 3.6+.

The main motivation for this change is improved
type annotation support, see quodlibet#486
@lazka
Copy link
Member

lazka commented Aug 19, 2020

Thanks, done in #487

lazka added a commit to lazka/mutagen that referenced this issue Aug 19, 2020
This allows us to run/enforce mypy in CI. Some errors are ignored for now
because they are not easy to fix..

See quodlibet#486
@lazka
Copy link
Member

lazka commented Aug 19, 2020

See #488 for mypy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants