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

typing: add no_implicit_optional lint lint #3173

Merged
merged 1 commit into from
Jun 18, 2024

Conversation

aciba90
Copy link
Collaborator

@aciba90 aciba90 commented Jun 18, 2024

Why is this needed?

This PR solves all of our problems because it enforces a newer and better default for a lint check.

Test Steps


  • (un)check this to re-run the checklist action

Explicit optional types are preferred and the default in mypy >= 0.980[1].

Add the config to check for this and fix any instance of the lint error.

References:
[1] https://mypy.readthedocs.io/en/stable/config_file.html#confval-implicit_optional
@renanrodrigo renanrodrigo changed the base branch from main to next-v34 June 18, 2024 11:46
@renanrodrigo renanrodrigo changed the base branch from next-v34 to main June 18, 2024 11:46
Copy link
Member

@renanrodrigo renanrodrigo left a comment

Choose a reason for hiding this comment

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

@aciba90 thanks! LGTM

I would suggest changing the base branch to next-v34 as main is currently frozen for release, but I think this is simple enough to make it to main.

@renanrodrigo renanrodrigo merged commit f516c73 into canonical:main Jun 18, 2024
8 of 10 checks passed
@aciba90 aciba90 deleted the no-implicit-optional branch June 18, 2024 13:54
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