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

Define a stricter return type for _parse_message #1176

Merged
merged 1 commit into from
May 5, 2023

Conversation

progval
Copy link
Contributor

@progval progval commented May 5, 2023

If the first item of the tuple is not None, then the second item is guaranteed not to be None either.

This is motivated by Software Heritage calling this function and getting the value for three (non-None) keys:

so mypy complained. Not a big deal though; I can work around it with assertions: https://gitlab.softwareheritage.org/swh/devel/swh-loader-git/-/merge_requests/153/diffs

If the first item of the tuple is not None, then the second item is
guaranteed not to be None either.
@progval progval requested a review from jelmer as a code owner May 5, 2023 10:36
@jelmer jelmer enabled auto-merge May 5, 2023 11:36
@jelmer jelmer merged commit 24a5b3a into jelmer:master May 5, 2023
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