Skip to content

Redundant File ..., line N block in SyntaxError output #14994

Description

@SemTiOne

What's the problem this feature will solve?

Since #14899 the crash line already carries file:line:col, making the E-block's File/source/caret lines redundant:

E     File "package/lib.py", line 1
E       def broken(:
E                  ^
E   SyntaxError: invalid syntax
package/lib.py:1:12: SyntaxError: invalid syntax

Describe the solution you'd like

Omit the File block when the crash line carries the error's own file+line, keep it on the fallback path so no info is ever lost.

Alternative Solutions

Leave as is (stdlib default).

Additional context

Deferred from #14899. Related: #2388.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions