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 some type hints #123

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

wannaphong
Copy link

Add some type hints for python

Add some type hints for python
@Gallaecio
Copy link
Member

This project still supports Python 2

@wannaphong
Copy link
Author

This project still supports Python 2

OK.I changed type hints to type checking. https://stackoverflow.com/a/35230792

@Gallaecio
Copy link
Member

Gallaecio commented Oct 2, 2020

Nice! I did not know about that syntax possible, and it looks like mypy supports it as well.

Do you think you could also add a Travis CI job that runs mypy to check annotations, excluding all files for now except the ones you’ve updated?

You would need to modify tox.ini and .travis.yml in the root folder. If you look for typing in the corresponding files of https://github.com/scrapy/scrapy , you’ll see how it can be done.

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.

2 participants