Skip to content
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

Easier plugin debugging by noting source filename of internal exceptions #1958

Closed
wants to merge 1 commit into from

Conversation

Zac-HD
Copy link
Member

@Zac-HD Zac-HD commented Nov 18, 2024

I patched this in while trying to track down where in a rather large codebase python-trio/flake8-async#322 was triggered, and then thought that it was useful enough and had so little downside that I should open this PR 🙂

@asottile
Copy link
Member

for debugging I'd recommend setting a breakpoint instead!

@asottile asottile closed this Nov 18, 2024
@Zac-HD
Copy link
Member Author

Zac-HD commented Nov 18, 2024

What's the downside of this?

Of course I can pull out a debugger out if I need to, and get the raw invocation instead of going via whatever tooling, but adding a note means I don't even need to because the file responsible is printed right there when I first discover something is wrong.

@asottile
Copy link
Member

What's the downside of this?

  • version specific code
  • untested
  • maybe (?) breaks the stacktrace due to the AttributeError (idk I'd have to check)
  • the exception output is potentially confusion with the existing messages

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