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

Switch to mypy #245

Closed
3 tasks
wochinge opened this issue Aug 17, 2020 · 2 comments · Fixed by #247
Closed
3 tasks

Switch to mypy #245

wochinge opened this issue Aug 17, 2020 · 2 comments · Fixed by #247
Labels
area:rasa-sdk 🧑‍💻 Everything that touches our python Rasa SDK priority:normal Impacts some users. Prevents using a secondary feature normally. type:maintenance 🔧 Improvements to tooling, testing, deployments, infrastructure, code style.

Comments

@wochinge
Copy link
Contributor

wochinge commented Aug 17, 2020

Problem:
We repeatedly had code issues which could have code by type checks. We currently use pytype and it didn't find very simple things like the one which @m-vdb shared here and could have prevented this issue.

Proposed Solution
mypy seems better suited and would have caught these issues. To gain more experience with it, we should start switching our smallest project, rasa-sdk to mypy. Depending on the results we can decide whether it's worth switching rasa or rasa-x, too.

Steps

  • Switch rasa-sdk to mypy
  • Make notes of all points of frictions / cool things during the process
  • Compare the speed of the type checks (how much faster / slower is it than pytype
@wochinge wochinge added type:maintenance 🔧 Improvements to tooling, testing, deployments, infrastructure, code style. area:rasa-sdk 🧑‍💻 Everything that touches our python Rasa SDK priority:normal Impacts some users. Prevents using a secondary feature normally. labels Aug 17, 2020
@m-vdb m-vdb changed the title Switch to mytype Switch to mypy Aug 17, 2020
@m-vdb m-vdb mentioned this issue Aug 21, 2020
5 tasks
@nathan-chappell
Copy link

glad to hear you guys are switching to mypy. I've been using it for awhile, and am looking forward to using it with rasa.

@m-vdb
Copy link
Collaborator

m-vdb commented Oct 20, 2020

@nathan-chappell thanks for your feedback 🎉 mypy is now in use in rasa's master (as of RasaHQ/rasa#6470). Enjoy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:rasa-sdk 🧑‍💻 Everything that touches our python Rasa SDK priority:normal Impacts some users. Prevents using a secondary feature normally. type:maintenance 🔧 Improvements to tooling, testing, deployments, infrastructure, code style.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants