Skip to content

Conversation

A5rocks
Copy link
Collaborator

@A5rocks A5rocks commented Oct 13, 2025

We can just print the first line for things where there's multiple lines being the issue. Ideally, we would print the first line, last line, and explicitly elide the lines in between. That's for a future change! (maybe)

Fixes #18522.

NOTE: this is an aesthetic thing, there's no right formatting. So I would be fine if this is closed because others think it looks worse.

We can just print the first line. Ideally, we would print the first line, last
line, and explicitly elide the lines in between. That's for a future change!
Copy link
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

Copy link
Member

@ilevkivskyi ilevkivskyi left a comment

Choose a reason for hiding this comment

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

SG

@ilevkivskyi ilevkivskyi merged commit 2c6c395 into python:master Oct 14, 2025
20 checks passed
@A5rocks A5rocks deleted the unreachable-statement-prettier branch October 15, 2025 00:08
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.

incorrect end column for unreachable if statements

2 participants