Skip to content

Respect generic Protocol in ellipsis removal#9841

Merged
charliermarsh merged 1 commit intomainfrom
charlie/t
Feb 5, 2024
Merged

Respect generic Protocol in ellipsis removal#9841
charliermarsh merged 1 commit intomainfrom
charlie/t

Conversation

@charliermarsh
Copy link
Copy Markdown
Member

Closes #9840.

@charliermarsh charliermarsh added the bug Something isn't working label Feb 5, 2024
@charliermarsh charliermarsh marked this pull request as ready for review February 5, 2024 18:52
@Julian
Copy link
Copy Markdown

Julian commented Feb 5, 2024

I don't know what map_subscript does (but if you don't respond before I look :D) -- I'd double check this also works the right way with "new" generics syntax -- i.e. class Foo[T](Protocol)? Probably that worked even before, but just mentioning it.

EDIT: Yeah that looks like it works even on the current release!

Thanks again for the quick fix!

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 5, 2024

ruff-ecosystem results

Linter (stable)

ℹ️ ecosystem check encountered linter errors. (no lint changes; 1 project error)

sphinx-doc/sphinx (error)

ruff failed
  Cause: Selection of unstable rules without the `--preview` flag is not allowed. Enable preview or remove selection of:
	- FURB113
	- FURB131
	- FURB132

Linter (preview)

✅ ecosystem check detected no linter changes.

@charliermarsh
Copy link
Copy Markdown
Member Author

👍 That should already work, but I'll add a test for it too!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ruff (via PIE790) incorrectly removes ellipses from Protocols with generics

2 participants