Skip to content

List returned from re.Pattern.split() can contain Nones #6763

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

Merged
merged 1 commit into from
Dec 30, 2021

Conversation

Akuli
Copy link
Collaborator

@Akuli Akuli commented Dec 30, 2021

Extracted from #6762, as it is a separate fix and likely won't cause new mypy_primer errors.

Example by jpy-git:

>>> re.compile("(:)*").split(":a:b::c")
['', ':', '', None, 'a', ':', '', None, 'b', ':', '', None, 'c', None, '']

For some reason, re.split() already has the correct return type.

@Akuli Akuli changed the title List returned from re.split() can contain Nones List returned from re.Pattern.split() can contain Nones Dec 30, 2021
jpy-git added a commit to jpy-git/typeshed that referenced this pull request Dec 30, 2021
@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@hauntsaninja hauntsaninja merged commit 38a08fc into master Dec 30, 2021
@hauntsaninja hauntsaninja deleted the Akuli-patch-1 branch December 30, 2021 19:27
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