-
Notifications
You must be signed in to change notification settings - Fork 7
Static Type Checking Intro #35
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
Conversation
|
|
||
|
|
||
| def _convert_boolean_value(enabled): | ||
| def _convert_boolean_value(enabled: Union[str, bool], feature_name: str) -> bool: |
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.
Feels weird to pass in the name here only for the error message.
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.
This is so we can match the error message as we have in the other libraries. It also feels weird to do the check outside of this.
Description
This PR starts to add static type checking to the Feature Management library.
See: mypy.ini for details on what is enabled and what isn't.
Starts work on this: #33
Note: Currently this will not be part of the build step until more is done.
Note: Due to some of the type check added to pass mypy some code changes were required.
Contribution checklist:
General Guidelines and Best Practices