Skip to content

Conversation

@SigureMo
Copy link
Contributor

@SigureMo SigureMo commented Feb 18, 2023

fixes #3020

In the case of #3020, rename already contains an underscore (i.e. _i), so the error message contains two underscores (i.e. __i) and __ is lost because of rust-lang/annotate-snippets-rs#53. So the final output has no underscore (i.e. i)

The output after applying this fix is shown below:

test.py:1:5: B007 [*] Loop control variable `i` not used within loop body
  |
1 | for i in range(0, 100):
  |     ^ B007
  |
  = help: Rename unused `i` to `_i`

@charliermarsh charliermarsh merged commit 216aa92 into astral-sh:main Feb 19, 2023
@charliermarsh
Copy link
Member

Thanks!

@SigureMo SigureMo deleted the duplicate-underline branch February 19, 2023 00:48
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.

Escape underscore in help text bugbear B007. Help text poorly rendered.

2 participants