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

webapp: Ensure None checking for all cases #1603

Merged

Conversation

arthurscchan
Copy link
Contributor

This PR fixes the None type checking for latest_introspector_datestr to ensure it has been checked for all branches. This is part of the work to fulfil the type checking when type is added in #1601.

@arthurscchan arthurscchan marked this pull request as ready for review June 17, 2024 13:28
Copy link
Contributor

@DavidKorczynski DavidKorczynski left a comment

Choose a reason for hiding this comment

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

This seems to be a false positive from MyPy? I don't see how it can be None if the first if statement is true?

@arthurscchan
Copy link
Contributor Author

Yes, I agree it is a false positive. But changing that does not harm the code at all and it could make mypy go pass. So why not?

@DavidKorczynski
Copy link
Contributor

Yes, I agree it is a false positive. But changing that does not harm the code at all and it could make mypy go pass. So why not?

Fine by me, but I was curious if this was really MyPy reporting it? I thought it was able to catch that this could not be None

@DavidKorczynski DavidKorczynski merged commit d4f271d into ossf:main Jun 17, 2024
7 checks passed
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