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

Adding MyPy to CI #90

Merged
merged 8 commits into from
Jul 12, 2021
Merged

Adding MyPy to CI #90

merged 8 commits into from
Jul 12, 2021

Conversation

smcmurtry
Copy link
Contributor

Summary | Résumé

This PR adds the MyPy static type checker to notification-utils, similar to what we have done for notification-admin (cds-snc/notification-admin#1055) and notification-api (cds-snc/notification-api#1320).

],
[],
)
invalid_local_phone_numbers = [
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I executed this statement and found that it was just a really over-complicated way of building a list like this:

[("1234", "Not a valid local number"), ("2345", "Not a valid local number"), ...]

So I replaced it, verified that the new statement == the old, and the type error went away.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for coming back on this; the code is much clearer to me with this new version.

Copy link
Member

@jimleroyer jimleroyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@smcmurtry smcmurtry merged commit befc52c into master Jul 12, 2021
@smcmurtry smcmurtry deleted the feature/mypy branch July 12, 2021 14:05
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