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 to AnimePlanet.py #76

Conversation

reillysiemens
Copy link
Contributor

I had a little bit of extra time this evening, so I thought I'd take a crack at addressing a trivial part of #52. This just adds type annotations for roboragi/AnimePlanet.py and puts some known mypy files into the .gitignore.

There were a few types that seemed ambiguous that I guessed at (like the animeId and mangaId arguments which come from a table in the SQLite database that I don't think has an explicit schema) and the authorName variable, which I don't think is actually used by any calling code. If I've erred in assessing those types just let me know and I can adjust.

I should also note that in contrast to #75, this only adds type annotations on function signatures. I'm not sure if you'd prefer to add them everywhere, but I'll be happy to adjust that to your preference as well, @Nihilate. Myself, I tend to only add them on the function signatures and where there's ambiguity that mypy complains about.

Running mypy against roboragi/AnimePlanet.py after these changes

[19:29:10] venv:(roboragi) tucker@khanti:~/Projects/Roboragi git:(enhancement/type-annotations) § mypy roboragi/AnimePlanet.py                   
Success: no issues found in 1 source file
[19:29:20] venv:(roboragi) tucker@khanti:~/Projects/Roboragi git:(enhancement/type-annotations) §

@reillysiemens
Copy link
Contributor Author

@Nihilate: Is this a contribution you're interested in taking?

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

Successfully merging this pull request may close these issues.

1 participant