-
Notifications
You must be signed in to change notification settings - Fork 835
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
health: move to mypy #1620
base: main
Are you sure you want to change the base?
health: move to mypy #1620
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1620 +/- ##
==========================================
+ Coverage 85.03% 85.06% +0.03%
==========================================
Files 113 113
Lines 12661 12658 -3
==========================================
+ Hits 10766 10768 +2
+ Misses 1895 1890 -5 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM; let one minor comment
placeholder=placeholder, | ||
) | ||
self.min_query_length = min_query_length | ||
|
||
|
||
class DialogBuilder(JsonObject): | ||
attributes = {} # no attributes because to_dict has unique implementation | ||
attributes = set() # no attributes because to_dict has unique implementation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems this property is unused, so changing the type should not affect the behavior. That said, changing from dict to set object may not make sense. This legacy component won't be enhanced anymore but using a set object might be a cause of future bugs?
Summary
This PR aims to follow the Bolt Pythons #1130
MyPy was found to execute much fast the PyType in this project, these changes adapt the project to use MyPy instead of PyType
From my short experience with mypy:
Note: removing all the type: ignore comments from the project may cause breaking changes or have a ripple effect through the entire project
Testing
Category
/docs
(Documents)/tutorial
(PythOnBoardingBot tutorial)tests
/integration_tests
(Automated tests for this library)Requirements
python3 -m venv .venv && source .venv/bin/activate && ./scripts/run_validation.sh
after making the changes.