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

Make ambiguous-unicode detection sensitive to 'word' context #4552

Merged
merged 2 commits into from May 22, 2023

Conversation

charliermarsh
Copy link
Member

@charliermarsh charliermarsh commented May 20, 2023

Summary

This PR upgrades our ambiguous-unicode detection to avoid some false positives by borrowing techniques from VS Code.

If you look at VS Code (microsoft/vscode#143720 (comment), microsoft/vscode#143796 (comment)), you'll see that their logic for flagging ambiguous unicode is more nuanced than ours, in that they avoid flagging all-unicode words that contain non-ambiguous unicode characters. This is helpful for avoiding false positives like "Русский", which was brought up in a discussion that led me to look into this further.

Closes #4534.

Closes #3947.

@charliermarsh charliermarsh force-pushed the charlie/boundaries branch 2 times, most recently from f0851d4 to 7c9b7ca Compare May 20, 2023 20:58
@github-actions
Copy link
Contributor

github-actions bot commented May 20, 2023

PR Check Results

Ecosystem

ℹ️ ecosystem check detected changes. (+3, -69, 0 error(s))

airflow (+0, -4)

- tests/executors/test_kubernetes_executor.py:76:15: RUF001 [*] String contains ambiguous unicode character `К` (did you mean `K`?)
- tests/executors/test_kubernetes_executor.py:76:16: RUF001 [*] String contains ambiguous unicode character `о` (did you mean `o`?)
- tests/executors/test_kubernetes_executor.py:76:22: RUF001 [*] String contains ambiguous unicode character `е` (did you mean `e`?)
- tests/executors/test_kubernetes_executor.py:76:23: RUF001 [*] String contains ambiguous unicode character `р` (did you mean `p`?)

disnake (+3, -0)

+ disnake/enums.py:749:30: RUF100 [*] Unused `noqa` directive (unused: `RUF001`)
+ disnake/enums.py:757:25: RUF100 [*] Unused `noqa` directive (unused: `RUF001`)
+ disnake/enums.py:803:31: RUF100 [*] Unused `noqa` directive (unused: `RUF001`)

zulip (+0, -65)

- tools/linter_lib/custom_check.py:546:81: RUF001 [*] String contains ambiguous unicode character `Α` (did you mean `A`?)
- zerver/tests/test_email_mirror.py:137:24: RUF001 [*] String contains ambiguous unicode character `Т` (did you mean `T`?)
- zerver/tests/test_email_mirror.py:137:25: RUF001 [*] String contains ambiguous unicode character `е` (did you mean `e`?)
- zerver/tests/test_email_mirror.py:137:26: RUF001 [*] String contains ambiguous unicode character `с` (did you mean `c`?)
- zerver/tests/test_email_mirror.py:137:28: RUF001 [*] String contains ambiguous unicode character `о` (did you mean `o`?)
- zerver/tests/test_i18n.py:103:21: RUF001 [*] String contains ambiguous unicode character `Р` (did you mean `P`?)
- zerver/tests/test_i18n.py:103:22: RUF001 [*] String contains ambiguous unicode character `е` (did you mean `e`?)
- zerver/tests/test_i18n.py:103:23: RUF001 [*] String contains ambiguous unicode character `г` (did you mean `r`?)
- zerver/tests/test_i18n.py:103:25: RUF001 [*] String contains ambiguous unicode character `с` (did you mean `c`?)
- zerver/tests/test_i18n.py:103:27: RUF001 [*] String contains ambiguous unicode character `р` (did you mean `p`?)
- zerver/tests/test_i18n.py:103:28: RUF001 [*] String contains ambiguous unicode character `у` (did you mean `y`?)
- zerver/tests/test_i18n.py:103:29: RUF001 [*] String contains ambiguous unicode character `ј` (did you mean `j`?)
- zerver/tests/test_i18n.py:103:31: RUF001 [*] String contains ambiguous unicode character `е` (did you mean `e`?)
- zerver/tests/test_i18n.py:115:21: RUF001 [*] String contains ambiguous unicode character `Р` (did you mean `P`?)
- zerver/tests/test_i18n.py:115:22: RUF001 [*] String contains ambiguous unicode character `е` (did you mean `e`?)
- zerver/tests/test_i18n.py:115:23: RUF001 [*] String contains ambiguous unicode character `г` (did you mean `r`?)
- zerver/tests/test_i18n.py:115:25: RUF001 [*] String contains ambiguous unicode character `с` (did you mean `c`?)
- zerver/tests/test_i18n.py:115:27: RUF001 [*] String contains ambiguous unicode character `р` (did you mean `p`?)
- zerver/tests/test_i18n.py:115:28: RUF001 [*] String contains ambiguous unicode character `у` (did you mean `y`?)
- zerver/tests/test_i18n.py:115:29: RUF001 [*] String contains ambiguous unicode character `ј` (did you mean `j`?)
- zerver/tests/test_i18n.py:115:31: RUF001 [*] String contains ambiguous unicode character `е` (did you mean `e`?)
- zerver/tests/test_i18n.py:131:21: RUF001 [*] String contains ambiguous unicode character `Р` (did you mean `P`?)
- zerver/tests/test_i18n.py:131:22: RUF001 [*] String contains ambiguous unicode character `е` (did you mean `e`?)
- zerver/tests/test_i18n.py:131:23: RUF001 [*] String contains ambiguous unicode character `г` (did you mean `r`?)
- zerver/tests/test_i18n.py:131:25: RUF001 [*] String contains ambiguous unicode character `с` (did you mean `c`?)
- zerver/tests/test_i18n.py:131:27: RUF001 [*] String contains ambiguous unicode character `р` (did you mean `p`?)
- zerver/tests/test_i18n.py:131:28: RUF001 [*] String contains ambiguous unicode character `у` (did you mean `y`?)
- zerver/tests/test_i18n.py:131:29: RUF001 [*] String contains ambiguous unicode character `ј` (did you mean `j`?)
- zerver/tests/test_i18n.py:131:31: RUF001 [*] String contains ambiguous unicode character `е` (did you mean `e`?)
- zerver/tests/test_link_embed.py:660:54: RUF001 [*] String contains ambiguous unicode character `ν` (did you mean `v`?)
- zerver/tests/test_link_embed.py:660:56: RUF001 [*] String contains ambiguous unicode character `ι` (did you mean `i`?)
- zerver/tests/test_markdown.py:2828:46: RUF001 [*] String contains ambiguous unicode character `р` (did you mean `p`?)
- zerver/tests/test_markdown.py:2828:49: RUF001 [*] String contains ambiguous unicode character `е` (did you mean `e`?)
- zerver/tests/test_markdown.py:2831:24: RUF001 [*] String contains ambiguous unicode character `р` (did you mean `p`?)
- zerver/tests/test_markdown.py:2831:27: RUF001 [*] String contains ambiguous unicode character `е` (did you mean `e`?)
- zerver/tests/test_message_send.py:2496:24: RUF001 [*] String contains ambiguous unicode character `Р` (did you mean `P`?)
- zerver/tests/test_message_send.py:2496:25: RUF001 [*] String contains ambiguous unicode character `о` (did you mean `o`?)
- zerver/tests/test_message_send.py:2496:26: RUF001 [*] String contains ambiguous unicode character `с` (did you mean `c`?)
- zerver/tests/test_message_send.py:2496:27: RUF001 [*] String contains ambiguous unicode character `с` (did you mean `c`?)
- zerver/tests/test_upload.py:646:27: RUF001 [*] String contains ambiguous unicode character `З` (did you mean `3`?)
- zerver/tests/test_upload.py:646:29: RUF001 [*] String contains ambiguous unicode character `р` (did you mean `p`?)
- zerver/tests/test_upload.py:646:30: RUF001 [*] String contains ambiguous unicode character `а` (did you mean `a`?)
- zerver/tests/test_upload.py:646:32: RUF001 [*] String contains ambiguous unicode character `е` (did you mean `e`?)
- zerver/tests/test_upload.py:646:36: RUF001 [*] String contains ambiguous unicode character `е` (did you mean `e`?)
- zerver/webhooks/opencollective/tests.py:12:35: RUF001 [*] String contains ambiguous unicode character `υ` (did you mean `u`?)
- zerver/webhooks/opencollective/tests.py:12:38: RUF001 [*] String contains ambiguous unicode character `ρ` (did you mean `p`?)
- zerver/webhooks/opencollective/tests.py:12:42: RUF001 [*] String contains ambiguous unicode character `Κ` (did you mean `K`?)
- zerver/webhooks/opencollective/tests.py:12:43: RUF001 [*] String contains ambiguous unicode character `υ` (did you mean `u`?)
- zerver/webhooks/opencollective/tests.py:12:44: RUF001 [*] String contains ambiguous unicode character `ρ` (did you mean `p`?)
- zerver/webhooks/opencollective/tests.py:12:45: RUF001 [*] String contains ambiguous unicode character `ι` (did you mean `i`?)
- zerver/webhooks/opencollective/tests.py:12:46: RUF001 [*] String contains ambiguous unicode character `α` (did you mean `a`?)
- zerver/webhooks/opencollective/tests.py:12:49: RUF001 [*] String contains ambiguous unicode character `ν` (did you mean `v`?)
- zerver/webhooks/opencollective/tests.py:12:50: RUF001 [*] String contains ambiguous unicode character `ο` (did you mean `o`?)
- zilencer/management/commands/populate_db.py:471:22: RUF001 [*] String contains ambiguous unicode character `А` (did you mean `A`?)
- zilencer/management/commands/populate_db.py:471:24: RUF001 [*] String contains ambiguous unicode character `е` (did you mean `e`?)
- zilencer/management/commands/populate_db.py:471:26: RUF001 [*] String contains ambiguous unicode character `с` (did you mean `c`?)
- zilencer/management/commands/populate_db.py:471:27: RUF001 [*] String contains ambiguous unicode character `а` (did you mean `a`?)
- zilencer/management/commands/populate_db.py:471:30: RUF001 [*] String contains ambiguous unicode character `р` (did you mean `p`?)
- zilencer/management/commands/populate_db.py:890:48: RUF003 [*] Comment contains ambiguous unicode character `е` (did you mean `e`?)
- zilencer/management/commands/populate_db.py:890:52: RUF003 [*] Comment contains ambiguous unicode character `е` (did you mean `e`?)
- zilencer/management/commands/populate_db.py:892:90: RUF001 [*] String contains ambiguous unicode character `е` (did you mean `e`?)
- zilencer/management/commands/populate_db.py:892:94: RUF001 [*] String contains ambiguous unicode character `е` (did you mean `e`?)
- zilencer/management/commands/populate_db.py:906:23: RUF001 [*] String contains ambiguous unicode character `о` (did you mean `o`?)
- zilencer/management/commands/populate_db.py:906:29: RUF001 [*] String contains ambiguous unicode character `е` (did you mean `e`?)
- zilencer/management/commands/populate_db.py:906:30: RUF001 [*] String contains ambiguous unicode character `р` (did you mean `p`?)

Rules changed: 3
Rule Changes Additions Removals
RUF001 67 0 67
RUF100 3 3 0
RUF003 2 0 2

Benchmark

Linux

group                                      main                                   pr
-----                                      ----                                   --
linter/all-rules/large/dataset.py          1.04     14.5±0.28ms     2.8 MB/sec    1.00     13.9±0.05ms     2.9 MB/sec
linter/all-rules/numpy/ctypeslib.py        1.00      3.4±0.01ms     4.9 MB/sec    1.00      3.4±0.01ms     4.9 MB/sec
linter/all-rules/numpy/globals.py          1.00    417.6±2.09µs     7.1 MB/sec    1.00    418.2±0.49µs     7.1 MB/sec
linter/all-rules/pydantic/types.py         1.00      5.8±0.01ms     4.4 MB/sec    1.00      5.8±0.02ms     4.4 MB/sec
linter/default-rules/large/dataset.py      1.01      6.7±0.02ms     6.1 MB/sec    1.00      6.6±0.01ms     6.1 MB/sec
linter/default-rules/numpy/ctypeslib.py    1.00   1439.9±5.48µs    11.6 MB/sec    1.01  1449.0±19.49µs    11.5 MB/sec
linter/default-rules/numpy/globals.py      1.00    159.1±0.22µs    18.5 MB/sec    1.01    160.8±0.55µs    18.3 MB/sec
linter/default-rules/pydantic/types.py     1.00      3.0±0.02ms     8.5 MB/sec    1.00      3.0±0.01ms     8.5 MB/sec
parser/large/dataset.py                    1.00      5.1±0.01ms     7.9 MB/sec    1.02      5.2±0.00ms     7.8 MB/sec
parser/numpy/ctypeslib.py                  1.00   1014.6±0.71µs    16.4 MB/sec    1.02   1038.9±0.50µs    16.0 MB/sec
parser/numpy/globals.py                    1.00    104.1±0.15µs    28.3 MB/sec    1.01    105.1±0.72µs    28.1 MB/sec
parser/pydantic/types.py                   1.00      2.2±0.00ms    11.5 MB/sec    1.02      2.3±0.00ms    11.2 MB/sec

Windows

group                                      main                                   pr
-----                                      ----                                   --
linter/all-rules/large/dataset.py          1.00     21.4±0.53ms  1945.7 KB/sec    1.02     21.8±0.72ms  1907.3 KB/sec
linter/all-rules/numpy/ctypeslib.py        1.00      5.3±0.22ms     3.1 MB/sec    1.00      5.3±0.21ms     3.1 MB/sec
linter/all-rules/numpy/globals.py          1.00   621.0±31.51µs     4.8 MB/sec    1.00   619.3±36.71µs     4.8 MB/sec
linter/all-rules/pydantic/types.py         1.00      8.9±0.31ms     2.9 MB/sec    1.01      9.1±0.32ms     2.8 MB/sec
linter/default-rules/large/dataset.py      1.00     10.5±0.38ms     3.9 MB/sec    1.01     10.5±0.29ms     3.9 MB/sec
linter/default-rules/numpy/ctypeslib.py    1.00      2.2±0.12ms     7.6 MB/sec    1.00      2.2±0.09ms     7.6 MB/sec
linter/default-rules/numpy/globals.py      1.00   245.9±15.68µs    12.0 MB/sec    1.02   251.8±21.84µs    11.7 MB/sec
linter/default-rules/pydantic/types.py     1.00      4.6±0.16ms     5.5 MB/sec    1.01      4.7±0.17ms     5.5 MB/sec
parser/large/dataset.py                    1.10      8.8±0.19ms     4.6 MB/sec    1.00      8.0±0.17ms     5.1 MB/sec
parser/numpy/ctypeslib.py                  1.08  1661.9±57.68µs    10.0 MB/sec    1.00  1536.5±89.79µs    10.8 MB/sec
parser/numpy/globals.py                    1.04    164.2±7.51µs    18.0 MB/sec    1.00    157.8±6.21µs    18.7 MB/sec
parser/pydantic/types.py                   1.06      3.7±0.10ms     6.8 MB/sec    1.00      3.5±0.14ms     7.3 MB/sec

},
char_range,
);
if settings.rules.enabled(diagnostic.kind.rule()) {
Copy link
Member

Choose a reason for hiding this comment

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

Unrelated to this PR: I just noticed this now. Our current approach of creating the diagnostic first and then filtering it out is kind of expensive because it means that we format (and allocate) all messages to then immediately drop them again.

Comment on lines 115 to 124
if !buffer.is_empty() {
if flags.is_candidate_word() {
diagnostics.append(&mut buffer);
}
buffer.clear();
}
Copy link
Member

Choose a reason for hiding this comment

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

Nit: This could be slightly faster if we only store the TextRange, confusable, and represent in the buffer and delay the generation of the diagnostics until here.

Copy link
Contributor

Choose a reason for hiding this comment

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

Would that mean we would have to pass the confusable and represent to this function, or would there be any other way to add it to the buffer. (just trying to understand the codebase a bit more)

Copy link
Member

Choose a reason for hiding this comment

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

The idea would be to change buffer to Vec<Candidate> where Candidate is defined as

struct Candidate {
	range: TextRange,
	confusable: char,
	representant: char
}

And change this loop here to:

if !word_candidates.is_empty() {
	if flags.is_candidate_word() {
		for candidate in word_candidates.drain() {
			let kind = match context { ... };
			if settings.enabled(kind) {
				diagnostics.push(Diagnostic {  ... })
			}
		}
	}
	
	word_candidates.clear();
}

Copy link
Member

Choose a reason for hiding this comment

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

Wouldn't a Vec<usize> for relative_offset alone be enough? Once we know we know we want to flag the current word and actually need to emit diagnostics we can read confusable and representant from the word

Copy link
Member Author

Choose a reason for hiding this comment

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

Storing the relative_offset requires that we then do the lookup again, I think? I opted for Candidate for now.

Copy link
Member

@konstin konstin left a comment

Choose a reason for hiding this comment

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

can't add much to micha's review

31 |-x = "Р усский"
31 |+x = "P усский"

confusables.py:31:7: RUF001 [*] String contains ambiguous unicode character ` ` (did you mean ` `?)
Copy link
Member

Choose a reason for hiding this comment

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

here we really need #4448

Copy link
Member Author

Choose a reason for hiding this comment

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

Agree!

@charliermarsh charliermarsh enabled auto-merge (squash) May 22, 2023 14:30
@charliermarsh charliermarsh merged commit 04c9348 into main May 22, 2023
14 checks passed
@charliermarsh charliermarsh deleted the charlie/boundaries branch May 22, 2023 14:42
renovate bot added a commit to ixm-one/pytest-cmake-presets that referenced this pull request May 25, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [ruff](https://togithub.com/charliermarsh/ruff)
([changelog](https://togithub.com/charliermarsh/ruff/releases)) |
`^0.0.269` -> `^0.0.270` |
[![age](https://badges.renovateapi.com/packages/pypi/ruff/0.0.270/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/pypi/ruff/0.0.270/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/pypi/ruff/0.0.270/compatibility-slim/0.0.269)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/pypi/ruff/0.0.270/confidence-slim/0.0.269)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>charliermarsh/ruff</summary>

###
[`v0.0.270`](https://togithub.com/charliermarsh/ruff/releases/tag/v0.0.270)

[Compare
Source](https://togithub.com/charliermarsh/ruff/compare/v0.0.269...v0.0.270)

<!-- Release notes generated using configuration in .github/release.yml
at main -->

#### What's Changed

##### Rules

- \[`flake8-bandit`] Implement `paramiko-call` (`S601`) by
[@&#8203;scop](https://togithub.com/scop) in
[astral-sh/ruff#4500
- \[`flake8-pyi`] Add autofix for PYI009 by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[astral-sh/ruff#4583
- \[`flake8-pyi`] Implement `PYI013` by
[@&#8203;density](https://togithub.com/density) in
[astral-sh/ruff#4517
- \[`pylint`] Add `duplicate-value` (`W0130`) by
[@&#8203;hoel-bagard](https://togithub.com/hoel-bagard) in
[astral-sh/ruff#4515
- \[`pylint`] Add `named_expr_without_context` (`W0131`) by
[@&#8203;hoel-bagard](https://togithub.com/hoel-bagard) in
[astral-sh/ruff#4531
- \[`ruff`] Extend `RUF005` to recursive and literal-literal
concatenations by
[@&#8203;hoel-bagard](https://togithub.com/hoel-bagard) in
[astral-sh/ruff#4557
- \[`ruff`] Make ambiguous-unicode detection sensitive to 'word' context
by [@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4552
- \[`ruff`] Name ambiguous characters by
[@&#8203;covracer](https://togithub.com/covracer) in
[astral-sh/ruff#4448

##### Settings

- Implement `--extend-fixable` option by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4297
- Support new `extend-per-file-ignores` setting by
[@&#8203;aacunningham](https://togithub.com/aacunningham) in
[astral-sh/ruff#4265

##### Bug Fixes

- Fix RUF010 auto-fix with parenthesis by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#4524
- Parenthesize more sub-expressions in f-string conversion by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4535
- Fix false-positive for TRY302 if exception cause is given by
[@&#8203;153957](https://togithub.com/153957) in
[astral-sh/ruff#4559
- Fix `# isort: split` comment detection in nested blocks by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4584
- Avoid some false positives in dunder variable assigments by
[@&#8203;scop](https://togithub.com/scop) in
[astral-sh/ruff#4508
- Fix UP032 auto-fix with integers by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#4525
- Improve reference resolution for deferred-annotations-within-classes
by [@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4509
- Improve handling of `__qualname__`, `__module__`, and `__class__` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4512
- Include empty success test in JUnit output by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4537
- Fix SIM110 and SIM111 ranges by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#4545
- Ignore `#region` code folding marks in eradicate rules by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4546
- Avoid infinite loop for required imports with isort: off by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4581
- Make B007 fix relevance stricter by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4607
- Introduce `tab-size` to correcly calculate the line length with
tabulations by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#4167
- Visit `TypeVar` and `NewType` name arguments by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4627
- Improve `Message` sorting performance by
[@&#8203;MichaReiser](https://togithub.com/MichaReiser) in
[astral-sh/ruff#4624

#### New Contributors

- [@&#8203;hoel-bagard](https://togithub.com/hoel-bagard) made their
first contribution in
[astral-sh/ruff#4516
- [@&#8203;density](https://togithub.com/density) made their first
contribution in
[astral-sh/ruff#4517
- [@&#8203;Mr-Pepe](https://togithub.com/Mr-Pepe) made their first
contribution in
[astral-sh/ruff#4540
- [@&#8203;153957](https://togithub.com/153957) made their first
contribution in
[astral-sh/ruff#4559
- [@&#8203;covracer](https://togithub.com/covracer) made their first
contribution in
[astral-sh/ruff#4448

**Full Changelog**:
astral-sh/ruff@v0.0.269...v0.0.270

</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:eyJjcmVhdGVkSW5WZXIiOiIzNS45OC40IiwidXBkYXRlZEluVmVyIjoiMzUuOTguNCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Signed-off-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
renovate bot added a commit to allenporter/pyrainbird that referenced this pull request May 26, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [ruff](https://togithub.com/charliermarsh/ruff)
([changelog](https://togithub.com/charliermarsh/ruff/releases)) |
`==0.0.269` -> `==0.0.270` |
[![age](https://badges.renovateapi.com/packages/pypi/ruff/0.0.270/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/pypi/ruff/0.0.270/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/pypi/ruff/0.0.270/compatibility-slim/0.0.269)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/pypi/ruff/0.0.270/confidence-slim/0.0.269)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>charliermarsh/ruff</summary>

###
[`v0.0.270`](https://togithub.com/charliermarsh/ruff/releases/tag/v0.0.270)

[Compare
Source](https://togithub.com/charliermarsh/ruff/compare/v0.0.269...v0.0.270)

<!-- Release notes generated using configuration in .github/release.yml
at main -->

#### What's Changed

##### Rules

- \[`flake8-bandit`] Implement `paramiko-call` (`S601`) by
[@&#8203;scop](https://togithub.com/scop) in
[astral-sh/ruff#4500
- \[`flake8-pyi`] Add autofix for PYI009 by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[astral-sh/ruff#4583
- \[`flake8-pyi`] Implement `PYI013` by
[@&#8203;density](https://togithub.com/density) in
[astral-sh/ruff#4517
- \[`pylint`] Add `duplicate-value` (`W0130`) by
[@&#8203;hoel-bagard](https://togithub.com/hoel-bagard) in
[astral-sh/ruff#4515
- \[`pylint`] Add `named_expr_without_context` (`W0131`) by
[@&#8203;hoel-bagard](https://togithub.com/hoel-bagard) in
[astral-sh/ruff#4531
- \[`ruff`] Extend `RUF005` to recursive and literal-literal
concatenations by
[@&#8203;hoel-bagard](https://togithub.com/hoel-bagard) in
[astral-sh/ruff#4557
- \[`ruff`] Make ambiguous-unicode detection sensitive to 'word' context
by [@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4552
- \[`ruff`] Name ambiguous characters by
[@&#8203;covracer](https://togithub.com/covracer) in
[astral-sh/ruff#4448

##### Settings

- Implement `--extend-fixable` option by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4297
- Support new `extend-per-file-ignores` setting by
[@&#8203;aacunningham](https://togithub.com/aacunningham) in
[astral-sh/ruff#4265

##### Bug Fixes

- Fix RUF010 auto-fix with parenthesis by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#4524
- Parenthesize more sub-expressions in f-string conversion by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4535
- Fix false-positive for TRY302 if exception cause is given by
[@&#8203;153957](https://togithub.com/153957) in
[astral-sh/ruff#4559
- Fix `# isort: split` comment detection in nested blocks by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4584
- Avoid some false positives in dunder variable assigments by
[@&#8203;scop](https://togithub.com/scop) in
[astral-sh/ruff#4508
- Fix UP032 auto-fix with integers by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#4525
- Improve reference resolution for deferred-annotations-within-classes
by [@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4509
- Improve handling of `__qualname__`, `__module__`, and `__class__` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4512
- Include empty success test in JUnit output by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4537
- Fix SIM110 and SIM111 ranges by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#4545
- Ignore `#region` code folding marks in eradicate rules by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4546
- Avoid infinite loop for required imports with isort: off by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4581
- Make B007 fix relevance stricter by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4607
- Introduce `tab-size` to correcly calculate the line length with
tabulations by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#4167
- Visit `TypeVar` and `NewType` name arguments by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4627
- Improve `Message` sorting performance by
[@&#8203;MichaReiser](https://togithub.com/MichaReiser) in
[astral-sh/ruff#4624

#### New Contributors

- [@&#8203;hoel-bagard](https://togithub.com/hoel-bagard) made their
first contribution in
[astral-sh/ruff#4516
- [@&#8203;density](https://togithub.com/density) made their first
contribution in
[astral-sh/ruff#4517
- [@&#8203;Mr-Pepe](https://togithub.com/Mr-Pepe) made their first
contribution in
[astral-sh/ruff#4540
- [@&#8203;153957](https://togithub.com/153957) made their first
contribution in
[astral-sh/ruff#4559
- [@&#8203;covracer](https://togithub.com/covracer) made their first
contribution in
[astral-sh/ruff#4448

**Full Changelog**:
astral-sh/ruff@v0.0.269...v0.0.270

</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:eyJjcmVhdGVkSW5WZXIiOiIzNS4xMDIuNCIsInVwZGF0ZWRJblZlciI6IjM1LjEwMi40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
renovate bot added a commit to allenporter/flux-local that referenced this pull request May 28, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [ruff](https://togithub.com/charliermarsh/ruff)
([changelog](https://togithub.com/charliermarsh/ruff/releases)) |
`==0.0.269` -> `==0.0.270` |
[![age](https://badges.renovateapi.com/packages/pypi/ruff/0.0.270/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/pypi/ruff/0.0.270/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/pypi/ruff/0.0.270/compatibility-slim/0.0.269)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/pypi/ruff/0.0.270/confidence-slim/0.0.269)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>charliermarsh/ruff</summary>

###
[`v0.0.270`](https://togithub.com/charliermarsh/ruff/releases/tag/v0.0.270)

[Compare
Source](https://togithub.com/charliermarsh/ruff/compare/v0.0.269...v0.0.270)

<!-- Release notes generated using configuration in .github/release.yml
at main -->

#### What's Changed

##### Rules

- \[`flake8-bandit`] Implement `paramiko-call` (`S601`) by
[@&#8203;scop](https://togithub.com/scop) in
[astral-sh/ruff#4500
- \[`flake8-pyi`] Add autofix for PYI009 by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[astral-sh/ruff#4583
- \[`flake8-pyi`] Implement `PYI013` by
[@&#8203;density](https://togithub.com/density) in
[astral-sh/ruff#4517
- \[`pylint`] Add `duplicate-value` (`W0130`) by
[@&#8203;hoel-bagard](https://togithub.com/hoel-bagard) in
[astral-sh/ruff#4515
- \[`pylint`] Add `named_expr_without_context` (`W0131`) by
[@&#8203;hoel-bagard](https://togithub.com/hoel-bagard) in
[astral-sh/ruff#4531
- \[`ruff`] Extend `RUF005` to recursive and literal-literal
concatenations by
[@&#8203;hoel-bagard](https://togithub.com/hoel-bagard) in
[astral-sh/ruff#4557
- \[`ruff`] Make ambiguous-unicode detection sensitive to 'word' context
by [@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4552
- \[`ruff`] Name ambiguous characters by
[@&#8203;covracer](https://togithub.com/covracer) in
[astral-sh/ruff#4448

##### Settings

- Implement `--extend-fixable` option by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4297
- Support new `extend-per-file-ignores` setting by
[@&#8203;aacunningham](https://togithub.com/aacunningham) in
[astral-sh/ruff#4265

##### Bug Fixes

- Fix RUF010 auto-fix with parenthesis by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#4524
- Parenthesize more sub-expressions in f-string conversion by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4535
- Fix false-positive for TRY302 if exception cause is given by
[@&#8203;153957](https://togithub.com/153957) in
[astral-sh/ruff#4559
- Fix `# isort: split` comment detection in nested blocks by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4584
- Avoid some false positives in dunder variable assigments by
[@&#8203;scop](https://togithub.com/scop) in
[astral-sh/ruff#4508
- Fix UP032 auto-fix with integers by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#4525
- Improve reference resolution for deferred-annotations-within-classes
by [@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4509
- Improve handling of `__qualname__`, `__module__`, and `__class__` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4512
- Include empty success test in JUnit output by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4537
- Fix SIM110 and SIM111 ranges by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#4545
- Ignore `#region` code folding marks in eradicate rules by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4546
- Avoid infinite loop for required imports with isort: off by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4581
- Make B007 fix relevance stricter by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4607
- Introduce `tab-size` to correcly calculate the line length with
tabulations by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#4167
- Visit `TypeVar` and `NewType` name arguments by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4627
- Improve `Message` sorting performance by
[@&#8203;MichaReiser](https://togithub.com/MichaReiser) in
[astral-sh/ruff#4624

#### New Contributors

- [@&#8203;hoel-bagard](https://togithub.com/hoel-bagard) made their
first contribution in
[astral-sh/ruff#4516
- [@&#8203;density](https://togithub.com/density) made their first
contribution in
[astral-sh/ruff#4517
- [@&#8203;Mr-Pepe](https://togithub.com/Mr-Pepe) made their first
contribution in
[astral-sh/ruff#4540
- [@&#8203;153957](https://togithub.com/153957) made their first
contribution in
[astral-sh/ruff#4559
- [@&#8203;covracer](https://togithub.com/covracer) made their first
contribution in
[astral-sh/ruff#4448

**Full Changelog**:
astral-sh/ruff@v0.0.269...v0.0.270

</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:eyJjcmVhdGVkSW5WZXIiOiIzNS4xMDIuMTAiLCJ1cGRhdGVkSW5WZXIiOiIzNS4xMDIuMTAiLCJ0YXJnZXRCcmFuY2giOiJtYWluIn0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
MichaReiser pushed a commit that referenced this pull request Jul 27, 2023
Limit match range to end of last statement
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants