Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Merged
hauntsaninja merged 1 commit into
masterpython/typeshed:masterfrom
Akuli-patch-1python/typeshed:Akuli-patch-1Copy head branch name to clipboard
Dec 30, 2021
Merged

List returned from re.Pattern.split() can contain Nones#6763
hauntsaninja merged 1 commit into
masterpython/typeshed:masterfrom
Akuli-patch-1python/typeshed:Akuli-patch-1Copy head branch name to clipboard

Conversation

@Akuli

@Akuli Akuli commented Dec 30, 2021

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.