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

mypy: Fix return issues #8242

Closed
2 tasks
wochinge opened this issue Mar 18, 2021 · 7 comments · Fixed by #9109
Closed
2 tasks

mypy: Fix return issues #8242

wochinge opened this issue Mar 18, 2021 · 7 comments · Fixed by #9109
Assignees
Labels
area:rasa-oss 🎡 Anything related to the open source Rasa framework effort:atom-squad/2 Label which is used by the Rasa Atom squad to do internal estimation of task sizes. type:maintenance 🔧 Improvements to tooling, testing, deployments, infrastructure, code style.

Comments

@wochinge
Copy link
Contributor

wochinge commented Mar 18, 2021

Maxime recently enabled mypy support for the first couple of issues. In our current setup we ignore certain typing issues as there are currently too many to tackle them all at once.

We should instead tackle them step by step. Related issue. Parent issue.

Current number of issues with this type: 18

Definition of Done:

  • enable mypy checks for return
  • all existing return issues are fixed
@wochinge wochinge added type:maintenance 🔧 Improvements to tooling, testing, deployments, infrastructure, code style. area:rasa-oss 🎡 Anything related to the open source Rasa framework labels Mar 18, 2021
@TyDunn TyDunn added the effort:atom-squad/2 Label which is used by the Rasa Atom squad to do internal estimation of task sizes. label Jul 2, 2021
@joejuzl
Copy link
Contributor

joejuzl commented Jul 5, 2021

Found 98 errors in 40 files (checked 262 source files) 😱

@wochinge
Copy link
Contributor Author

wochinge commented Jul 5, 2021

Oh dear. I can help and we do divide and conquer?

@joejuzl
Copy link
Contributor

joejuzl commented Jul 5, 2021

I'll do a first pass, and see how time consuming it - then maybe we can divide some of the more complex areas.

@joejuzl
Copy link
Contributor

joejuzl commented Jul 6, 2021

I've got it down to 54 errors. These are the files that are left:

rasa/shared/nlu/training_data/message.py
rasa/utils/tensorflow/model_data_utils.py
rasa/utils/tensorflow/models.py
rasa/shared/nlu/training_data/formats/rasa_yaml.py
rasa/nlu/components.py
rasa/shared/core/training_data/structures.py
rasa/shared/importers/importer.py
rasa/shared/core/generator.py
rasa/core/nlg/callback.py
rasa/nlu/model.py
rasa/shared/core/training_data/story_reader/yaml_story_reader.py
rasa/nlu/test.py
rasa/core/featurizers/tracker_featurizers.py
rasa/shared/core/training_data/story_writer/yaml_story_writer.py
rasa/nlu/selectors/response_selector.py
rasa/nlu/featurizers/sparse_featurizer/lexical_syntactic_featurizer.py
rasa/core/test.py
rasa/core/policies/rule_policy.py
rasa/core/policies/form_policy.py
rasa/core/actions/forms.py
rasa/server.py
rasa/core/training/interactive.py
rasa/utils/tensorflow/environment.py

If you want to give me a hand, you could have a look at the first half? (i.e. to yaml_story_reader.py)
Some of them are a bit tricky btw 😄

@wochinge
Copy link
Contributor Author

wochinge commented Jul 6, 2021

Sure 👍🏻 What's your branch?
Btw, I've also fixed some other error codes in here #9043

@joejuzl
Copy link
Contributor

joejuzl commented Jul 6, 2021

branch is 8242-mypy_return_issues, but probably makes sense to do it on a different branch for now.

@wochinge
Copy link
Contributor Author

wochinge commented Jul 6, 2021

I'm doing my changes on this PR #9054 (fixed message and model_data_utils so far)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:rasa-oss 🎡 Anything related to the open source Rasa framework effort:atom-squad/2 Label which is used by the Rasa Atom squad to do internal estimation of task sizes. 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