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

Ensure that tab characters aren't in multi-line strings before throwing a violation #3837

Merged
merged 26 commits into from
Apr 7, 2023

Conversation

evanrittenhouse
Copy link
Contributor

@evanrittenhouse evanrittenhouse commented Apr 1, 2023

Fixes #3674 and #3438

@github-actions
Copy link
Contributor

github-actions bot commented Apr 1, 2023

PR Check Results

Ecosystem

✅ ecosystem check detected no changes.

Benchmark

Linux

group                                      main                                   pr
-----                                      ----                                   --
linter/all-rules/large/dataset.py          1.04     21.8±1.10ms  1909.2 KB/sec    1.00     21.0±0.53ms  1982.5 KB/sec
linter/all-rules/numpy/ctypeslib.py        1.04      5.5±0.20ms     3.0 MB/sec    1.00      5.3±0.22ms     3.2 MB/sec
linter/all-rules/numpy/globals.py          1.00   593.5±17.81µs     5.0 MB/sec    1.03   609.0±46.49µs     4.8 MB/sec
linter/all-rules/pydantic/types.py         1.00      9.0±0.39ms     2.8 MB/sec    1.00      9.0±0.36ms     2.8 MB/sec
linter/default-rules/large/dataset.py      1.00     10.2±0.44ms     4.0 MB/sec    1.00     10.2±0.34ms     4.0 MB/sec
linter/default-rules/numpy/ctypeslib.py    1.00      2.1±0.11ms     7.9 MB/sec    1.08      2.3±0.22ms     7.4 MB/sec
linter/default-rules/numpy/globals.py      1.00   244.0±11.22µs    12.1 MB/sec    1.08   264.6±19.40µs    11.1 MB/sec
linter/default-rules/pydantic/types.py     1.00      4.6±0.17ms     5.5 MB/sec    1.05      4.8±0.21ms     5.3 MB/sec

Windows

group                                      main                                   pr
-----                                      ----                                   --
linter/all-rules/large/dataset.py          1.02     20.0±0.70ms     2.0 MB/sec    1.00     19.6±0.62ms     2.1 MB/sec
linter/all-rules/numpy/ctypeslib.py        1.00      5.1±0.19ms     3.3 MB/sec    1.01      5.1±0.22ms     3.3 MB/sec
linter/all-rules/numpy/globals.py          1.01   598.3±32.18µs     4.9 MB/sec    1.00   590.3±20.67µs     5.0 MB/sec
linter/all-rules/pydantic/types.py         1.01      8.6±0.36ms     3.0 MB/sec    1.00      8.4±0.39ms     3.0 MB/sec
linter/default-rules/large/dataset.py      1.00      9.8±0.34ms     4.2 MB/sec    1.01      9.9±0.34ms     4.1 MB/sec
linter/default-rules/numpy/ctypeslib.py    1.00      2.1±0.07ms     7.9 MB/sec    1.08      2.3±0.10ms     7.3 MB/sec
linter/default-rules/numpy/globals.py      1.00   236.6±46.68µs    12.5 MB/sec    1.06   250.4±18.24µs    11.8 MB/sec
linter/default-rules/pydantic/types.py     1.00      4.4±0.11ms     5.9 MB/sec    1.07      4.6±0.18ms     5.5 MB/sec

@evanrittenhouse evanrittenhouse marked this pull request as ready for review April 1, 2023 15:26
@evanrittenhouse evanrittenhouse marked this pull request as draft April 1, 2023 21:42
crates/ruff_python_ast/src/source_code/indexer.rs Outdated Show resolved Hide resolved
crates/ruff_python_ast/src/source_code/indexer.rs Outdated Show resolved Hide resolved
crates/ruff_python_ast/src/source_code/indexer.rs Outdated Show resolved Hide resolved
crates/ruff/src/rules/pycodestyle/rules/tab_indentation.rs Outdated Show resolved Hide resolved
@evanrittenhouse evanrittenhouse marked this pull request as ready for review April 5, 2023 02:56
@charliermarsh
Copy link
Member

(Doing some testing, then will merge tonight!)

// Tab on last line of the quoted range, preceding the quote.
if lineno == end.row() && tab_column < end.column() {
return None;
}
Copy link
Member

Choose a reason for hiding this comment

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

I think it's sufficient to just check these, and not check the "Is it on the start and end line" condition, since if it's on the start and end line, it'll be caught by the first condition... But hoping I'm not thinking about it incorrectly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nah, I think that's right. IIRC I included a test case which contained a triple-quoted string on one line, so if that passes I think we should be good.

return None;
}

let tab_column = line[..tab_index].chars().count();
Copy link
Member

Choose a reason for hiding this comment

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

(I think we need to count characters here, since .column() is based on characters.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How do 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.

indent.find('\t') returns the index of the starting byte for the tab character, but some characters can require multiple bytes (think unicode) -- so str.len() in Rust doesn't always return what you might expect if coming from another programming language.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh interesting, I didn't know that. I'll have to read up on it, thanks!

@charliermarsh charliermarsh merged commit abaf0a1 into astral-sh:main Apr 7, 2023
14 checks passed
renovate bot added a commit to ixm-one/pytest-cmake-presets that referenced this pull request Apr 20, 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) | `^0.0.261` ->
`^0.0.262` |
[![age](https://badges.renovateapi.com/packages/pypi/ruff/0.0.262/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/pypi/ruff/0.0.262/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/pypi/ruff/0.0.262/compatibility-slim/0.0.261)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/pypi/ruff/0.0.262/confidence-slim/0.0.261)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

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

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

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

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

#### What's Changed

##### Configuration

- Allow users to extend the set of included files via `include` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3914
- Implement isort custom sections and ordering
([#&#8203;2419](https://togithub.com/charliermarsh/ruff/issues/2419)) by
[@&#8203;hackedd](https://togithub.com/hackedd) in
[astral-sh/ruff#3900

##### Rules

- \[`flake8-simplify`] Add autofix for `contextlib.suppress` (`SIM105`)
by [@&#8203;leiserfg](https://togithub.com/leiserfg) in
[astral-sh/ruff#3915
- \[`flake8-bandit`] Ignore assert errors (S101) in `TYPE_CHECKING`
blocks by [@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3960
- \[`flake8-comprehensions`] Implement
`unnecessary-literal-within-dict-call` (`C418`) by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3969
- \[`ruff`] Add checks for mutable defaults `dataclass`es by
[@&#8203;mosauter](https://togithub.com/mosauter) in
[astral-sh/ruff#3877
- \[`flake8-import-conventions`] Add a rule for `BannedImportAlias` by
[@&#8203;stancld](https://togithub.com/stancld) in
[astral-sh/ruff#3926
- \[`flake8-pyi`] Implement duplicate types in unions (`PYI016`) by
[@&#8203;USER-5](https://togithub.com/USER-5) in
[astral-sh/ruff#3922
- \[`flake8-bandit`] Implement flake8-bandit shell injection rules by
[@&#8203;robyoung](https://togithub.com/robyoung) in
[astral-sh/ruff#3924
- \[`flake8-comprehensions`] Redirect `PIE802` to `C419` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3971

##### Bug Fixes

- Fix unicode handling in PLE2515 by
[@&#8203;konstin](https://togithub.com/konstin) in
[astral-sh/ruff#3898
- Avoid adding required imports to stub files by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3940
- Add 'or if cond' to `E712` message by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3962
- Ignore argument assignments when enforcing `RET504` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4004
- Fix (doc-)line-too-long start location by
[@&#8203;MichaReiser](https://togithub.com/MichaReiser) in
[astral-sh/ruff#4006
- Ignore stub file assignments to value-requiring targets by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4030
- Allow legacy C and T selectors in JSON schema by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3889
- Ignore `PLW2901` when using typing cast by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#3891
- Visit comprehension to detect group name usage/overrides by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#3887
- Ensure that tab characters aren't in multi-line strings before
throwing a violation by
[@&#8203;evanrittenhouse](https://togithub.com/evanrittenhouse) in
[astral-sh/ruff#3837
- Avoid N802 violations for `@override` methods by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3912
- Check for arguments in inner/outer call for `C414` by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#3916
- Do not skip analysis if `*args` present for `F523` by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#3923
- Extend SIM105 to match also 'Ellipsis only' bodies in exception
handlers by [@&#8203;leiserfg](https://togithub.com/leiserfg) in
[astral-sh/ruff#3925
- Support `pyright: ignore` comments by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3941
- Tidy up some `pygrep-hooks` rules by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3942
- Use identifier range for pytest rules by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3948
- Allow `typing_extensions.TypeVar` assignments in `.pyi` files by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3951
- Raise percent-format upgrade rule (`UP031`) for hanging modulos by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3953
- Check for parenthesis in implicit str concat in `PT006` by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#3955
- Do not consider nested comment as part of code by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#3984
- Preserve type annotations when fixing `E731` by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#3983
- Remove autofix behavior for uncapitalized-environment-variables
(`SIM112`) by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3988
- Respect typing-modules when evaluating no-return functions by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4001
- Avoid short-circuiting when detecting RET rules by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4002
- Set non-empty range for indentation diagnostics by
[@&#8203;MichaReiser](https://togithub.com/MichaReiser) in
[astral-sh/ruff#4005
- Ignore relative imports in `banned-api` rules by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4024
- Support relative imports in `banned-api` enforcement by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4025
- Treat non-future function annotations as required-at-runtime by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4028
- Ignore certain flake8-pyi errors within function bodies by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4029

#### New Contributors

- [@&#8203;tjkuson](https://togithub.com/tjkuson) made their first
contribution in
[astral-sh/ruff#3886
- [@&#8203;mosauter](https://togithub.com/mosauter) made their first
contribution in
[astral-sh/ruff#3877
- [@&#8203;stancld](https://togithub.com/stancld) made their first
contribution in
[astral-sh/ruff#3926
- [@&#8203;USER-5](https://togithub.com/USER-5) made their first
contribution in
[astral-sh/ruff#3922
- [@&#8203;robyoung](https://togithub.com/robyoung) made their first
contribution in
[astral-sh/ruff#3924
- [@&#8203;hackedd](https://togithub.com/hackedd) made their first
contribution in
[astral-sh/ruff#3900
- [@&#8203;justinchuby](https://togithub.com/justinchuby) made their
first contribution in
[astral-sh/ruff#3982
- [@&#8203;mirecl](https://togithub.com/mirecl) made their first
contribution in
[astral-sh/ruff#4008
- [@&#8203;Xemnas0](https://togithub.com/Xemnas0) made their first
contribution in
[astral-sh/ruff#4026

**Full Changelog**:
astral-sh/ruff@v0.0.261...v0.0.262

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

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/flux-local that referenced this pull request Apr 21, 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) | `==0.0.261` ->
`==0.0.262` |
[![age](https://badges.renovateapi.com/packages/pypi/ruff/0.0.262/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/pypi/ruff/0.0.262/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/pypi/ruff/0.0.262/compatibility-slim/0.0.261)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/pypi/ruff/0.0.262/confidence-slim/0.0.261)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

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

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

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

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

#### What's Changed

##### Configuration

- Allow users to extend the set of included files via `include` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3914
- Implement isort custom sections and ordering
([#&#8203;2419](https://togithub.com/charliermarsh/ruff/issues/2419)) by
[@&#8203;hackedd](https://togithub.com/hackedd) in
[astral-sh/ruff#3900

##### Rules

- \[`flake8-simplify`] Add autofix for `contextlib.suppress` (`SIM105`)
by [@&#8203;leiserfg](https://togithub.com/leiserfg) in
[astral-sh/ruff#3915
- \[`flake8-bandit`] Ignore assert errors (S101) in `TYPE_CHECKING`
blocks by [@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3960
- \[`flake8-comprehensions`] Implement
`unnecessary-literal-within-dict-call` (`C418`) by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3969
- \[`ruff`] Add checks for mutable defaults `dataclass`es by
[@&#8203;mosauter](https://togithub.com/mosauter) in
[astral-sh/ruff#3877
- \[`flake8-import-conventions`] Add a rule for `BannedImportAlias` by
[@&#8203;stancld](https://togithub.com/stancld) in
[astral-sh/ruff#3926
- \[`flake8-pyi`] Implement duplicate types in unions (`PYI016`) by
[@&#8203;USER-5](https://togithub.com/USER-5) in
[astral-sh/ruff#3922
- \[`flake8-bandit`] Implement flake8-bandit shell injection rules by
[@&#8203;robyoung](https://togithub.com/robyoung) in
[astral-sh/ruff#3924
- \[`flake8-comprehensions`] Redirect `PIE802` to `C419` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3971

##### Bug Fixes

- Fix unicode handling in PLE2515 by
[@&#8203;konstin](https://togithub.com/konstin) in
[astral-sh/ruff#3898
- Avoid adding required imports to stub files by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3940
- Add 'or if cond' to `E712` message by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3962
- Ignore argument assignments when enforcing `RET504` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4004
- Fix (doc-)line-too-long start location by
[@&#8203;MichaReiser](https://togithub.com/MichaReiser) in
[astral-sh/ruff#4006
- Ignore stub file assignments to value-requiring targets by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4030
- Allow legacy C and T selectors in JSON schema by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3889
- Ignore `PLW2901` when using typing cast by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#3891
- Visit comprehension to detect group name usage/overrides by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#3887
- Ensure that tab characters aren't in multi-line strings before
throwing a violation by
[@&#8203;evanrittenhouse](https://togithub.com/evanrittenhouse) in
[astral-sh/ruff#3837
- Avoid N802 violations for `@override` methods by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3912
- Check for arguments in inner/outer call for `C414` by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#3916
- Do not skip analysis if `*args` present for `F523` by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#3923
- Extend SIM105 to match also 'Ellipsis only' bodies in exception
handlers by [@&#8203;leiserfg](https://togithub.com/leiserfg) in
[astral-sh/ruff#3925
- Support `pyright: ignore` comments by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3941
- Tidy up some `pygrep-hooks` rules by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3942
- Use identifier range for pytest rules by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3948
- Allow `typing_extensions.TypeVar` assignments in `.pyi` files by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3951
- Raise percent-format upgrade rule (`UP031`) for hanging modulos by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3953
- Check for parenthesis in implicit str concat in `PT006` by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#3955
- Do not consider nested comment as part of code by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#3984
- Preserve type annotations when fixing `E731` by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#3983
- Remove autofix behavior for uncapitalized-environment-variables
(`SIM112`) by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3988
- Respect typing-modules when evaluating no-return functions by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4001
- Avoid short-circuiting when detecting RET rules by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4002
- Set non-empty range for indentation diagnostics by
[@&#8203;MichaReiser](https://togithub.com/MichaReiser) in
[astral-sh/ruff#4005
- Ignore relative imports in `banned-api` rules by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4024
- Support relative imports in `banned-api` enforcement by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4025
- Treat non-future function annotations as required-at-runtime by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4028
- Ignore certain flake8-pyi errors within function bodies by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4029

#### New Contributors

- [@&#8203;tjkuson](https://togithub.com/tjkuson) made their first
contribution in
[astral-sh/ruff#3886
- [@&#8203;mosauter](https://togithub.com/mosauter) made their first
contribution in
[astral-sh/ruff#3877
- [@&#8203;stancld](https://togithub.com/stancld) made their first
contribution in
[astral-sh/ruff#3926
- [@&#8203;USER-5](https://togithub.com/USER-5) made their first
contribution in
[astral-sh/ruff#3922
- [@&#8203;robyoung](https://togithub.com/robyoung) made their first
contribution in
[astral-sh/ruff#3924
- [@&#8203;hackedd](https://togithub.com/hackedd) made their first
contribution in
[astral-sh/ruff#3900
- [@&#8203;justinchuby](https://togithub.com/justinchuby) made their
first contribution in
[astral-sh/ruff#3982
- [@&#8203;mirecl](https://togithub.com/mirecl) made their first
contribution in
[astral-sh/ruff#4008
- [@&#8203;Xemnas0](https://togithub.com/Xemnas0) made their first
contribution in
[astral-sh/ruff#4026

**Full Changelog**:
astral-sh/ruff@v0.0.261...v0.0.262

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

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 Apr 21, 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) | `==0.0.261` ->
`==0.0.262` |
[![age](https://badges.renovateapi.com/packages/pypi/ruff/0.0.262/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/pypi/ruff/0.0.262/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/pypi/ruff/0.0.262/compatibility-slim/0.0.261)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/pypi/ruff/0.0.262/confidence-slim/0.0.261)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

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

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

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

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

#### What's Changed

##### Configuration

- Allow users to extend the set of included files via `include` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3914
- Implement isort custom sections and ordering
([#&#8203;2419](https://togithub.com/charliermarsh/ruff/issues/2419)) by
[@&#8203;hackedd](https://togithub.com/hackedd) in
[astral-sh/ruff#3900

##### Rules

- \[`flake8-simplify`] Add autofix for `contextlib.suppress` (`SIM105`)
by [@&#8203;leiserfg](https://togithub.com/leiserfg) in
[astral-sh/ruff#3915
- \[`flake8-bandit`] Ignore assert errors (S101) in `TYPE_CHECKING`
blocks by [@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3960
- \[`flake8-comprehensions`] Implement
`unnecessary-literal-within-dict-call` (`C418`) by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3969
- \[`ruff`] Add checks for mutable defaults `dataclass`es by
[@&#8203;mosauter](https://togithub.com/mosauter) in
[astral-sh/ruff#3877
- \[`flake8-import-conventions`] Add a rule for `BannedImportAlias` by
[@&#8203;stancld](https://togithub.com/stancld) in
[astral-sh/ruff#3926
- \[`flake8-pyi`] Implement duplicate types in unions (`PYI016`) by
[@&#8203;USER-5](https://togithub.com/USER-5) in
[astral-sh/ruff#3922
- \[`flake8-bandit`] Implement flake8-bandit shell injection rules by
[@&#8203;robyoung](https://togithub.com/robyoung) in
[astral-sh/ruff#3924
- \[`flake8-comprehensions`] Redirect `PIE802` to `C419` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3971

##### Bug Fixes

- Fix unicode handling in PLE2515 by
[@&#8203;konstin](https://togithub.com/konstin) in
[astral-sh/ruff#3898
- Avoid adding required imports to stub files by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3940
- Add 'or if cond' to `E712` message by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3962
- Ignore argument assignments when enforcing `RET504` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4004
- Fix (doc-)line-too-long start location by
[@&#8203;MichaReiser](https://togithub.com/MichaReiser) in
[astral-sh/ruff#4006
- Ignore stub file assignments to value-requiring targets by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4030
- Allow legacy C and T selectors in JSON schema by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3889
- Ignore `PLW2901` when using typing cast by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#3891
- Visit comprehension to detect group name usage/overrides by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#3887
- Ensure that tab characters aren't in multi-line strings before
throwing a violation by
[@&#8203;evanrittenhouse](https://togithub.com/evanrittenhouse) in
[astral-sh/ruff#3837
- Avoid N802 violations for `@override` methods by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3912
- Check for arguments in inner/outer call for `C414` by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#3916
- Do not skip analysis if `*args` present for `F523` by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#3923
- Extend SIM105 to match also 'Ellipsis only' bodies in exception
handlers by [@&#8203;leiserfg](https://togithub.com/leiserfg) in
[astral-sh/ruff#3925
- Support `pyright: ignore` comments by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3941
- Tidy up some `pygrep-hooks` rules by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3942
- Use identifier range for pytest rules by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3948
- Allow `typing_extensions.TypeVar` assignments in `.pyi` files by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3951
- Raise percent-format upgrade rule (`UP031`) for hanging modulos by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3953
- Check for parenthesis in implicit str concat in `PT006` by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#3955
- Do not consider nested comment as part of code by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#3984
- Preserve type annotations when fixing `E731` by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#3983
- Remove autofix behavior for uncapitalized-environment-variables
(`SIM112`) by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3988
- Respect typing-modules when evaluating no-return functions by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4001
- Avoid short-circuiting when detecting RET rules by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4002
- Set non-empty range for indentation diagnostics by
[@&#8203;MichaReiser](https://togithub.com/MichaReiser) in
[astral-sh/ruff#4005
- Ignore relative imports in `banned-api` rules by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4024
- Support relative imports in `banned-api` enforcement by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4025
- Treat non-future function annotations as required-at-runtime by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4028
- Ignore certain flake8-pyi errors within function bodies by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#4029

#### New Contributors

- [@&#8203;tjkuson](https://togithub.com/tjkuson) made their first
contribution in
[astral-sh/ruff#3886
- [@&#8203;mosauter](https://togithub.com/mosauter) made their first
contribution in
[astral-sh/ruff#3877
- [@&#8203;stancld](https://togithub.com/stancld) made their first
contribution in
[astral-sh/ruff#3926
- [@&#8203;USER-5](https://togithub.com/USER-5) made their first
contribution in
[astral-sh/ruff#3922
- [@&#8203;robyoung](https://togithub.com/robyoung) made their first
contribution in
[astral-sh/ruff#3924
- [@&#8203;hackedd](https://togithub.com/hackedd) made their first
contribution in
[astral-sh/ruff#3900
- [@&#8203;justinchuby](https://togithub.com/justinchuby) made their
first contribution in
[astral-sh/ruff#3982
- [@&#8203;mirecl](https://togithub.com/mirecl) made their first
contribution in
[astral-sh/ruff#4008
- [@&#8203;Xemnas0](https://togithub.com/Xemnas0) made their first
contribution in
[astral-sh/ruff#4026

**Full Changelog**:
astral-sh/ruff@v0.0.261...v0.0.262

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

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@evanrittenhouse evanrittenhouse deleted the 3674_multiline_tabs branch June 15, 2023 21:14
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.

W191 False positive for multiline string
3 participants