-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Render tabs as 4 spaces in diagnostics #4132
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Current dependencies on/for this PR:
This comment was auto-generated by Graphite. |
MichaReiser
commented
Apr 27, 2023
@@ -5,8 +5,8 @@ E101.py:11:1: E101 Indentation contains mixed spaces and tabs | |||
| | |||
11 | def func_mixed_start_with_tab(): | |||
12 | # E101 | |||
13 | print("mixed starts with tab") | |||
| ^^ E101 | |||
13 | print("mixed starts with tab") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously, tabs were counted as two characters but rendered as multiple ones. That's why the caret was off.
PR Check ResultsEcosystem✅ ecosystem check detected no changes. BenchmarkLinux
Windows
|
charliermarsh
approved these changes
Apr 27, 2023
554869d
to
2bdd7b8
Compare
renovate bot
referenced
this pull request
in ixm-one/pytest-cmake-presets
May 5, 2023
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [ruff](https://github.com/charliermarsh/ruff) | `^0.0.264` -> `^0.0.265` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>charliermarsh/ruff</summary> ### [`v0.0.265`](https://github.com/charliermarsh/ruff/releases/tag/v0.0.265) [Compare Source](https://github.com/charliermarsh/ruff/compare/v0.0.264...v0.0.265) <!-- Release notes generated using configuration in .github/release.yml at main --> #### What's Changed ##### Breaking Changes - Change `--fix-only` exit semantics to mirror `--fix` by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/4146](https://github.com/charliermarsh/ruff/pull/4146) ##### Rules - \[flake8-pyi] PYI020 by [@​arya-k](https://github.com/arya-k) in [https://github.com/charliermarsh/ruff/pull/4211](https://github.com/charliermarsh/ruff/pull/4211) - Update B027 to support autofixing by [@​aacunningham](https://github.com/aacunningham) in [https://github.com/charliermarsh/ruff/pull/4178](https://github.com/charliermarsh/ruff/pull/4178) - \[`flake8-pyi`] Implement `PYI042` and `PYI043` by [@​arya-k](https://github.com/arya-k) in [https://github.com/charliermarsh/ruff/pull/4214](https://github.com/charliermarsh/ruff/pull/4214) - \[`pylint`] Implement import-self (`W0406`) by [@​chanman3388](https://github.com/chanman3388) in [https://github.com/charliermarsh/ruff/pull/4154](https://github.com/charliermarsh/ruff/pull/4154) - Warn on PEP 604 syntax not in an annotation, but don't autofix by [@​wookie184](https://github.com/wookie184) in [https://github.com/charliermarsh/ruff/pull/4170](https://github.com/charliermarsh/ruff/pull/4170) ##### Bug Fixes - Fix panic in pydocstyle D214 when docstring indentation is empty by [@​madkinsz](https://github.com/madkinsz) in [https://github.com/charliermarsh/ruff/pull/4216](https://github.com/charliermarsh/ruff/pull/4216) - Render tabs as 4 spaces in diagnostics by [@​MichaReiser](https://github.com/MichaReiser) in [https://github.com/charliermarsh/ruff/pull/4132](https://github.com/charliermarsh/ruff/pull/4132) - Fix era panic caused by out of bound edition by [@​leiserfg](https://github.com/leiserfg) in [https://github.com/charliermarsh/ruff/pull/4206](https://github.com/charliermarsh/ruff/pull/4206) - End of statement insertion should occur after newline by [@​dhruvmanila](https://github.com/dhruvmanila) in [https://github.com/charliermarsh/ruff/pull/4215](https://github.com/charliermarsh/ruff/pull/4215) - Ignore **debuggerskip** in unused variable checks by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/4229](https://github.com/charliermarsh/ruff/pull/4229) ##### CLI - Show settings path in `--show-settings` output by [@​dhruvmanila](https://github.com/dhruvmanila) in [https://github.com/charliermarsh/ruff/pull/4199](https://github.com/charliermarsh/ruff/pull/4199) ##### Documentation - Allow linking to individual rules by [@​calumy](https://github.com/calumy) in [https://github.com/charliermarsh/ruff/pull/4158](https://github.com/charliermarsh/ruff/pull/4158) #### New Contributors - [@​wookie184](https://github.com/wookie184) made their first contribution in [https://github.com/charliermarsh/ruff/pull/4170](https://github.com/charliermarsh/ruff/pull/4170) - [@​arya-k](https://github.com/arya-k) made their first contribution in [https://github.com/charliermarsh/ruff/pull/4211](https://github.com/charliermarsh/ruff/pull/4211) **Full Changelog**: astral-sh/ruff@v0.0.264...v0.0.265 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/ixm-one/pytest-cmake-presets). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS43MS40IiwidXBkYXRlZEluVmVyIjoiMzUuNzEuNCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Signed-off-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
renovate bot
referenced
this pull request
in allenporter/flux-local
May 7, 2023
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [ruff](https://github.com/charliermarsh/ruff) | `==0.0.264` -> `==0.0.265` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>charliermarsh/ruff</summary> ### [`v0.0.265`](https://github.com/charliermarsh/ruff/releases/tag/v0.0.265) [Compare Source](https://github.com/charliermarsh/ruff/compare/v0.0.264...v0.0.265) <!-- Release notes generated using configuration in .github/release.yml at main --> #### What's Changed ##### Breaking Changes - Change `--fix-only` exit semantics to mirror `--fix` by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/4146](https://github.com/charliermarsh/ruff/pull/4146) ##### Rules - \[flake8-pyi] PYI020 by [@​arya-k](https://github.com/arya-k) in [https://github.com/charliermarsh/ruff/pull/4211](https://github.com/charliermarsh/ruff/pull/4211) - Update B027 to support autofixing by [@​aacunningham](https://github.com/aacunningham) in [https://github.com/charliermarsh/ruff/pull/4178](https://github.com/charliermarsh/ruff/pull/4178) - \[`flake8-pyi`] Implement `PYI042` and `PYI043` by [@​arya-k](https://github.com/arya-k) in [https://github.com/charliermarsh/ruff/pull/4214](https://github.com/charliermarsh/ruff/pull/4214) - \[`pylint`] Implement import-self (`W0406`) by [@​chanman3388](https://github.com/chanman3388) in [https://github.com/charliermarsh/ruff/pull/4154](https://github.com/charliermarsh/ruff/pull/4154) - Warn on PEP 604 syntax not in an annotation, but don't autofix by [@​wookie184](https://github.com/wookie184) in [https://github.com/charliermarsh/ruff/pull/4170](https://github.com/charliermarsh/ruff/pull/4170) ##### Bug Fixes - Fix panic in pydocstyle D214 when docstring indentation is empty by [@​madkinsz](https://github.com/madkinsz) in [https://github.com/charliermarsh/ruff/pull/4216](https://github.com/charliermarsh/ruff/pull/4216) - Render tabs as 4 spaces in diagnostics by [@​MichaReiser](https://github.com/MichaReiser) in [https://github.com/charliermarsh/ruff/pull/4132](https://github.com/charliermarsh/ruff/pull/4132) - Fix era panic caused by out of bound edition by [@​leiserfg](https://github.com/leiserfg) in [https://github.com/charliermarsh/ruff/pull/4206](https://github.com/charliermarsh/ruff/pull/4206) - End of statement insertion should occur after newline by [@​dhruvmanila](https://github.com/dhruvmanila) in [https://github.com/charliermarsh/ruff/pull/4215](https://github.com/charliermarsh/ruff/pull/4215) - Ignore **debuggerskip** in unused variable checks by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/4229](https://github.com/charliermarsh/ruff/pull/4229) ##### CLI - Show settings path in `--show-settings` output by [@​dhruvmanila](https://github.com/dhruvmanila) in [https://github.com/charliermarsh/ruff/pull/4199](https://github.com/charliermarsh/ruff/pull/4199) ##### Documentation - Allow linking to individual rules by [@​calumy](https://github.com/calumy) in [https://github.com/charliermarsh/ruff/pull/4158](https://github.com/charliermarsh/ruff/pull/4158) #### New Contributors - [@​wookie184](https://github.com/wookie184) made their first contribution in [https://github.com/charliermarsh/ruff/pull/4170](https://github.com/charliermarsh/ruff/pull/4170) - [@​arya-k](https://github.com/arya-k) made their first contribution in [https://github.com/charliermarsh/ruff/pull/4211](https://github.com/charliermarsh/ruff/pull/4211) **Full Changelog**: astral-sh/ruff@v0.0.264...v0.0.265 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/allenporter/flux-local). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS43MS40IiwidXBkYXRlZEluVmVyIjoiMzUuNzEuNCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
renovate bot
referenced
this pull request
in allenporter/pyrainbird
May 7, 2023
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [ruff](https://github.com/charliermarsh/ruff) | `==0.0.264` -> `==0.0.265` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>charliermarsh/ruff</summary> ### [`v0.0.265`](https://github.com/charliermarsh/ruff/releases/tag/v0.0.265) [Compare Source](https://github.com/charliermarsh/ruff/compare/v0.0.264...v0.0.265) <!-- Release notes generated using configuration in .github/release.yml at main --> #### What's Changed ##### Breaking Changes - Change `--fix-only` exit semantics to mirror `--fix` by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/4146](https://github.com/charliermarsh/ruff/pull/4146) ##### Rules - \[flake8-pyi] PYI020 by [@​arya-k](https://github.com/arya-k) in [https://github.com/charliermarsh/ruff/pull/4211](https://github.com/charliermarsh/ruff/pull/4211) - Update B027 to support autofixing by [@​aacunningham](https://github.com/aacunningham) in [https://github.com/charliermarsh/ruff/pull/4178](https://github.com/charliermarsh/ruff/pull/4178) - \[`flake8-pyi`] Implement `PYI042` and `PYI043` by [@​arya-k](https://github.com/arya-k) in [https://github.com/charliermarsh/ruff/pull/4214](https://github.com/charliermarsh/ruff/pull/4214) - \[`pylint`] Implement import-self (`W0406`) by [@​chanman3388](https://github.com/chanman3388) in [https://github.com/charliermarsh/ruff/pull/4154](https://github.com/charliermarsh/ruff/pull/4154) - Warn on PEP 604 syntax not in an annotation, but don't autofix by [@​wookie184](https://github.com/wookie184) in [https://github.com/charliermarsh/ruff/pull/4170](https://github.com/charliermarsh/ruff/pull/4170) ##### Bug Fixes - Fix panic in pydocstyle D214 when docstring indentation is empty by [@​madkinsz](https://github.com/madkinsz) in [https://github.com/charliermarsh/ruff/pull/4216](https://github.com/charliermarsh/ruff/pull/4216) - Render tabs as 4 spaces in diagnostics by [@​MichaReiser](https://github.com/MichaReiser) in [https://github.com/charliermarsh/ruff/pull/4132](https://github.com/charliermarsh/ruff/pull/4132) - Fix era panic caused by out of bound edition by [@​leiserfg](https://github.com/leiserfg) in [https://github.com/charliermarsh/ruff/pull/4206](https://github.com/charliermarsh/ruff/pull/4206) - End of statement insertion should occur after newline by [@​dhruvmanila](https://github.com/dhruvmanila) in [https://github.com/charliermarsh/ruff/pull/4215](https://github.com/charliermarsh/ruff/pull/4215) - Ignore **debuggerskip** in unused variable checks by [@​charliermarsh](https://github.com/charliermarsh) in [https://github.com/charliermarsh/ruff/pull/4229](https://github.com/charliermarsh/ruff/pull/4229) ##### CLI - Show settings path in `--show-settings` output by [@​dhruvmanila](https://github.com/dhruvmanila) in [https://github.com/charliermarsh/ruff/pull/4199](https://github.com/charliermarsh/ruff/pull/4199) ##### Documentation - Allow linking to individual rules by [@​calumy](https://github.com/calumy) in [https://github.com/charliermarsh/ruff/pull/4158](https://github.com/charliermarsh/ruff/pull/4158) #### New Contributors - [@​wookie184](https://github.com/wookie184) made their first contribution in [https://github.com/charliermarsh/ruff/pull/4170](https://github.com/charliermarsh/ruff/pull/4170) - [@​arya-k](https://github.com/arya-k) made their first contribution in [https://github.com/charliermarsh/ruff/pull/4211](https://github.com/charliermarsh/ruff/pull/4211) **Full Changelog**: astral-sh/ruff@v0.0.264...v0.0.265 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/allenporter/pyrainbird). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS43MS40IiwidXBkYXRlZEluVmVyIjoiMzUuNzEuNCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This was referenced Jun 20, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #4018
This PR replaces tabs in the source code with 4 spaces for a terminal-independent rendering of Diagnostics.
Ideally, we would respect the users tab settings but that requires replacing
annotated_snipped
with our own implementation (similar to Rome) which requires more effort. For now, the goal is to fix the misalignment.