Skip to content

Conversation

@charliermarsh
Copy link
Member

Summary

It looks like bugbear, from the start, has had an exemption here to exempt raise lower_case_var. I looked at Hypothesis and Trio, which are mentioned in that issue, and Hypothesis has exactly one case of this, and Trio has none, so IMO it doesn't seem worth special-casing.

Closes #5664.

@charliermarsh charliermarsh requested a review from zanieb July 13, 2023 23:25
@github-actions
Copy link
Contributor

github-actions bot commented Jul 13, 2023

PR Check Results

Ecosystem

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

bokeh (+1, -0)

+ tests/support/util/filesystem.py:74:17: B904 Within an `except` clause, raise exceptions with `raise ... from err` or `raise ... from None` to distinguish them from errors in exception handling

zulip (+1, -0)

+ zerver/management/commands/register_server.py:127:17: B904 Within an `except` clause, raise exceptions with `raise ... from err` or `raise ... from None` to distinguish them from errors in exception handling

Rules changed: 1
Rule Changes Additions Removals
B904 2 2 0

Benchmark

Linux

group                                      main                                   pr
-----                                      ----                                   --
formatter/large/dataset.py                 1.01      9.5±0.02ms     4.3 MB/sec    1.00      9.4±0.03ms     4.3 MB/sec
formatter/numpy/ctypeslib.py               1.01   1867.3±3.31µs     8.9 MB/sec    1.00   1857.8±2.45µs     9.0 MB/sec
formatter/numpy/globals.py                 1.00    208.1±0.51µs    14.2 MB/sec    1.00    208.6±0.41µs    14.1 MB/sec
formatter/pydantic/types.py                1.01      4.1±0.01ms     6.2 MB/sec    1.00      4.0±0.01ms     6.3 MB/sec
linter/all-rules/large/dataset.py          1.00     13.6±0.02ms     3.0 MB/sec    1.00     13.6±0.03ms     3.0 MB/sec
linter/all-rules/numpy/ctypeslib.py        1.01      3.4±0.01ms     4.8 MB/sec    1.00      3.4±0.00ms     4.9 MB/sec
linter/all-rules/numpy/globals.py          1.03    456.8±3.20µs     6.5 MB/sec    1.00    445.6±0.69µs     6.6 MB/sec
linter/all-rules/pydantic/types.py         1.00      6.1±0.01ms     4.2 MB/sec    1.00      6.1±0.01ms     4.2 MB/sec
linter/default-rules/large/dataset.py      1.00      6.8±0.02ms     6.0 MB/sec    1.00      6.7±0.01ms     6.0 MB/sec
linter/default-rules/numpy/ctypeslib.py    1.02   1488.2±1.49µs    11.2 MB/sec    1.00   1465.5±2.66µs    11.4 MB/sec
linter/default-rules/numpy/globals.py      1.03    170.9±0.24µs    17.3 MB/sec    1.00    165.7±0.17µs    17.8 MB/sec
linter/default-rules/pydantic/types.py     1.01      3.1±0.01ms     8.3 MB/sec    1.00      3.0±0.01ms     8.4 MB/sec

Windows

group                                      main                                   pr
-----                                      ----                                   --
formatter/large/dataset.py                 1.00     12.8±0.34ms     3.2 MB/sec    1.03     13.2±0.25ms     3.1 MB/sec
formatter/numpy/ctypeslib.py               1.00      2.5±0.08ms     6.7 MB/sec    1.04      2.6±0.07ms     6.5 MB/sec
formatter/numpy/globals.py                 1.00   295.5±26.39µs    10.0 MB/sec    1.02   301.3±24.30µs     9.8 MB/sec
formatter/pydantic/types.py                1.00      5.4±0.13ms     4.7 MB/sec    1.04      5.6±0.16ms     4.5 MB/sec
linter/all-rules/large/dataset.py          1.04     19.3±0.44ms     2.1 MB/sec    1.00     18.6±0.35ms     2.2 MB/sec
linter/all-rules/numpy/ctypeslib.py        1.00      4.8±0.14ms     3.5 MB/sec    1.01      4.8±0.11ms     3.4 MB/sec
linter/all-rules/numpy/globals.py          1.03   609.0±24.06µs     4.8 MB/sec    1.00   594.1±18.71µs     5.0 MB/sec
linter/all-rules/pydantic/types.py         1.00      8.6±0.18ms     3.0 MB/sec    1.00      8.6±0.23ms     3.0 MB/sec
linter/default-rules/large/dataset.py      1.01      9.7±0.23ms     4.2 MB/sec    1.00      9.5±0.19ms     4.3 MB/sec
linter/default-rules/numpy/ctypeslib.py    1.00      2.1±0.04ms     8.1 MB/sec    1.02      2.1±0.05ms     7.9 MB/sec
linter/default-rules/numpy/globals.py      1.00    240.4±6.59µs    12.3 MB/sec    1.02    244.1±7.43µs    12.1 MB/sec
linter/default-rules/pydantic/types.py     1.00      4.3±0.13ms     5.9 MB/sec    1.02      4.4±0.08ms     5.8 MB/sec

Copy link
Member

@zanieb zanieb left a comment

Choose a reason for hiding this comment

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

Yeah this exclusion doesn't make sense to me? Even if I wanted to use with_traceback you'd need from None to hide the other tracebacks? e.g.

traceback_exc = None
try:
    try:
        raise ValueError()
    except Exception as inner:
        traceback_exc = inner
        raise TypeError() from inner
except Exception:
    raise RuntimeError().with_traceback(traceback_exc.__traceback__) from None

This change does create a new common case though, when an exception is reraised

try:
    raise ValueError()
except ValueError as exc:
    raise exc

Throws

example.py:4:5: B904 Within an `except` clause, raise exceptions with `raise ... from err` or `raise ... from None` to distinguish them from errors in exception handling

but should suggest using just raise to avoid adding an extra traceback frame e.g.

Traceback (most recent call last):
  File "/Users/mz/eng/src/astral-sh/ruff/example.py", line 4, in <module>
    raise exc
  File "/Users/mz/eng/src/astral-sh/ruff/example.py", line 2, in <module>
    raise ValueError()
ValueError

vs

try:
    raise ValueError()
except ValueError:
    raise
Traceback (most recent call last):
  File "/Users/mz/eng/src/astral-sh/ruff/example.py", line 2, in <module>
    raise ValueError()
ValueError

Edit: Charlie pointed out that this is already covered by TRY201 so it probably ought to be excluded entirely here?

@charliermarsh
Copy link
Member Author

Ah interesting, I think these are now false positives whereby in most cases, they're just re-raising the exception. Need to fix.

@charliermarsh
Copy link
Member Author

I'm gonna change the rule to allow those "verbose re-raises", since we have TRY201 to flag them.

@charliermarsh
Copy link
Member Author

(Gonna see how ecosystem CI checks shake out.)

@charliermarsh
Copy link
Member Author

I'm worried this may actually be a dupe of TRY200 now, but I guess this is still fine to fix.

Copy link
Member

@zanieb zanieb left a comment

Choose a reason for hiding this comment

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

I still find this message confusing for except e: raise e — both suggestions raise e from None and raise e from e are less correct than raise or raise e.

@charliermarsh
Copy link
Member Author

Hmm, we no longer flag except e: raise e though.

@charliermarsh
Copy link
Member Author

Ah, ok, so we are flagging it for the nested exception in Zulip.

@zanieb
Copy link
Member

zanieb commented Jul 14, 2023

@charliermarsh Ah I see that's nested — that may be reasonable actually?

As written look like a violation:

try:
    try:
        raise RuntimeError("one") # Raise for traceback
    except Exception as e1:
        raise RuntimeError("two") from e1
except RuntimeError as e2:
    try:
        raise RuntimeError("three")
    except RuntimeError as e3:
        raise e2
Traceback (most recent call last):
  File "/Users/mz/eng/src/RustPython/Parser/example.py", line 3, in <module>
    raise RuntimeError("one") # Raise for traceback
    ^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: one

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/mz/eng/src/RustPython/Parser/example.py", line 10, in <module>
    raise e2
  File "/Users/mz/eng/src/RustPython/Parser/example.py", line 5, in <module>
    raise RuntimeError("two") from e1
RuntimeError: two

Suggestions look reasonable:

try:
    try:
        raise RuntimeError("one") # Raise for traceback
    except Exception as e1:
        raise RuntimeError("two") from e1
except RuntimeError as e2:
    try:
        raise RuntimeError("three")
    except RuntimeError as e3:
        raise e2 from e2
Traceback (most recent call last):
  File "/Users/mz/eng/src/RustPython/Parser/example.py", line 10, in <module>
    raise e2 from e2
  File "/Users/mz/eng/src/RustPython/Parser/example.py", line 5, in <module>
    raise RuntimeError("two") from e1
RuntimeError: two
try:
    try:
        raise RuntimeError("one") # Raise for traceback
    except Exception as e1:
        raise RuntimeError("two") from e1
except RuntimeError as e2:
    try:
        raise RuntimeError("three")
    except RuntimeError as e3:
        raise e2 from None
Traceback (most recent call last):
  File "/Users/mz/eng/src/RustPython/Parser/example.py", line 10, in <module>
    raise e2 from None
  File "/Users/mz/eng/src/RustPython/Parser/example.py", line 5, in <module>
    raise RuntimeError("two") from e1
RuntimeError: two
try:
    try:
        raise RuntimeError("one") # Raise for traceback
    except Exception as e1:
        raise RuntimeError("two") from e1
except RuntimeError as e2:
    try:
        raise RuntimeError("three")
    except RuntimeError as e3:
        raise e2 from e3
Traceback (most recent call last):
  File "/Users/mz/eng/src/RustPython/Parser/example.py", line 8, in <module>
    raise RuntimeError("three")
RuntimeError: three

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/mz/eng/src/RustPython/Parser/example.py", line 10, in <module>
    raise e2 from e3
  File "/Users/mz/eng/src/RustPython/Parser/example.py", line 5, in <module>
    raise RuntimeError("two") from e1
RuntimeError: two

@charliermarsh charliermarsh merged commit 513de13 into main Jul 14, 2023
@charliermarsh charliermarsh deleted the charlie/b904 branch July 14, 2023 15:46
evanrittenhouse pushed a commit to evanrittenhouse/ruff that referenced this pull request Jul 19, 2023
## Summary

It looks like bugbear, [from the
start](PyCQA/flake8-bugbear#181 (comment)),
has had an exemption here to exempt `raise lower_case_var`. I looked at
Hypothesis and Trio, which are mentioned in that issue, and Hypothesis
has exactly one case of this, and Trio has none, so IMO it doesn't seem
worth special-casing.

Closes astral-sh#5664.
konstin pushed a commit that referenced this pull request Jul 19, 2023
## Summary

It looks like bugbear, [from the
start](PyCQA/flake8-bugbear#181 (comment)),
has had an exemption here to exempt `raise lower_case_var`. I looked at
Hypothesis and Trio, which are mentioned in that issue, and Hypothesis
has exactly one case of this, and Trio has none, so IMO it doesn't seem
worth special-casing.

Closes #5664.
jankatins referenced this pull request in jankatins/pr-workflow-example Jul 22, 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://beta.ruff.rs/docs)
([source](https://togithub.com/astral-sh/ruff),
[changelog](https://togithub.com/astral-sh/ruff/releases)) | `0.0.278`
-> `0.0.280` |
[![age](https://developer.mend.io/api/mc/badges/age/pypi/ruff/0.0.280?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/ruff/0.0.280?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/ruff/0.0.278/0.0.280?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/ruff/0.0.278/0.0.280?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>astral-sh/ruff (ruff)</summary>

###
[`v0.0.280`](https://togithub.com/astral-sh/ruff/compare/v0.0.279...v0.0.280)

[Compare
Source](https://togithub.com/astral-sh/ruff/compare/v0.0.279...v0.0.280)

###
[`v0.0.279`](https://togithub.com/astral-sh/ruff/releases/tag/v0.0.279)

[Compare
Source](https://togithub.com/astral-sh/ruff/compare/v0.0.278...v0.0.279)

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

#### What's Changed

##### Rules

- \[`flake8-pyi`] Implement flake8-pyi's PYI026 by
[@&#8203;LaBatata101](https://togithub.com/LaBatata101) in
[https://github.com/astral-sh/ruff/pull/5844](https://togithub.com/astral-sh/ruff/pull/5844)
- \[`flake8-pyi`] Implement flake8-pyi's `PYI017` by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[https://github.com/astral-sh/ruff/pull/5895](https://togithub.com/astral-sh/ruff/pull/5895)
- \[`flake8-pyi`] Implement flake8-pyi's `PYI036` by
[@&#8203;density](https://togithub.com/density) in
[https://github.com/astral-sh/ruff/pull/5668](https://togithub.com/astral-sh/ruff/pull/5668)
- \[`flake8-pyi`] Implement flake8-pyi's `PYI041` by
[@&#8203;density](https://togithub.com/density) in
[https://github.com/astral-sh/ruff/pull/5722](https://togithub.com/astral-sh/ruff/pull/5722)
- \[`flake8-use-pathlib`] Implement `os-path-getsize` and
`os-path-get(a|m|c)-time` (`PTH202-205`) by
[@&#8203;sbrugman](https://togithub.com/sbrugman) in
[https://github.com/astral-sh/ruff/pull/5835](https://togithub.com/astral-sh/ruff/pull/5835)
- \[`flake8-use-pathlib`] Implement `path-constructor-default-argument`
(`PTH201`) by [@&#8203;sbrugman](https://togithub.com/sbrugman) in
[https://github.com/astral-sh/ruff/pull/5833](https://togithub.com/astral-sh/ruff/pull/5833)
- \[`pandas-vet`] Implement constant series rule (`PD101`) by
[@&#8203;sbrugman](https://togithub.com/sbrugman) in
[https://github.com/astral-sh/ruff/pull/5802](https://togithub.com/astral-sh/ruff/pull/5802)
- \[`pylint`] Implement Pylint's `consider-using-in` (`PLR1714`) by
[@&#8203;tjkuson](https://togithub.com/tjkuson) in
[https://github.com/astral-sh/ruff/pull/5193](https://togithub.com/astral-sh/ruff/pull/5193)

##### Rule changes

- \[`flake8-annotations`] Check for `Any` in other types for `ANN401` by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[https://github.com/astral-sh/ruff/pull/5601](https://togithub.com/astral-sh/ruff/pull/5601)
- \[`flake8-bugbear`] Add autofix for B004 by
[@&#8203;density](https://togithub.com/density) in
[https://github.com/astral-sh/ruff/pull/5788](https://togithub.com/astral-sh/ruff/pull/5788)
- \[`flake8-bugbear`] Remove `B904`'s lowercase exemption by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/5751](https://togithub.com/astral-sh/ruff/pull/5751)
- \[`flake8-use-pathlib`] extend PTH118 with `os.sep` by
[@&#8203;sbrugman](https://togithub.com/sbrugman) in
[https://github.com/astral-sh/ruff/pull/5935](https://togithub.com/astral-sh/ruff/pull/5935)
- \[`pyupgrade`] Expand scope of `quoted-annotation` rule (`UP037`) by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/5766](https://togithub.com/astral-sh/ruff/pull/5766)
- \[`pyupgrade`] Extend PEP 604 rewrites to support some quoted
annotations by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/5725](https://togithub.com/astral-sh/ruff/pull/5725)
- \[`ruff`] Expand `RUF015` to include all expression types by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/5767](https://togithub.com/astral-sh/ruff/pull/5767)

##### Bug Fixes

- Consider single element subscript expr for implicit optional by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[https://github.com/astral-sh/ruff/pull/5717](https://togithub.com/astral-sh/ruff/pull/5717)
- Ignore `Enum`-and-`str` subclasses for slots enforcement by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/5749](https://togithub.com/astral-sh/ruff/pull/5749)
- Avoid removing raw strings in comparison fixes by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/5755](https://togithub.com/astral-sh/ruff/pull/5755)
- Fix nested calls to `sorted` with differing arguments by
[@&#8203;density](https://togithub.com/density) in
[https://github.com/astral-sh/ruff/pull/5761](https://togithub.com/astral-sh/ruff/pull/5761)
- Use unused variable detection to power `incorrect-dict-iterator` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/5763](https://togithub.com/astral-sh/ruff/pull/5763)
- Include alias when formatting import-from structs by
[@&#8203;guillaumeLepape](https://togithub.com/guillaumeLepape) in
[https://github.com/astral-sh/ruff/pull/5786](https://togithub.com/astral-sh/ruff/pull/5786)
- Make `lint_only` aware of the source kind by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[https://github.com/astral-sh/ruff/pull/5876](https://togithub.com/astral-sh/ruff/pull/5876)
- Restore `redefined-while-unused` violations in classes by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/5926](https://togithub.com/astral-sh/ruff/pull/5926)
- Flatten nested tuples when fixing UP007 violations by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/5724](https://togithub.com/astral-sh/ruff/pull/5724)
- Ignore Jupyter Notebooks for `--add-noqa` by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[https://github.com/astral-sh/ruff/pull/5727](https://togithub.com/astral-sh/ruff/pull/5727)
- Avoid checking `EXE001` and `EXE002` on WSL by
[@&#8203;tjkuson](https://togithub.com/tjkuson) in
[https://github.com/astral-sh/ruff/pull/5735](https://togithub.com/astral-sh/ruff/pull/5735)
- Properly group assignment targets by
[@&#8203;MichaReiser](https://togithub.com/MichaReiser) in
[https://github.com/astral-sh/ruff/pull/5728](https://togithub.com/astral-sh/ruff/pull/5728)
- Avoid stack overflow for non-BitOr binary types by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/5743](https://togithub.com/astral-sh/ruff/pull/5743)
- Move function visit out of `Expr::Call` branches by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/5772](https://togithub.com/astral-sh/ruff/pull/5772)
- \[B006] Add bytes to immutable types by
[@&#8203;harupy](https://togithub.com/harupy) in
[https://github.com/astral-sh/ruff/pull/5776](https://togithub.com/astral-sh/ruff/pull/5776)
- Format `SetComp` by [@&#8203;lkh42t](https://togithub.com/lkh42t) in
[https://github.com/astral-sh/ruff/pull/5774](https://togithub.com/astral-sh/ruff/pull/5774)
- Gate `runtime-import-in-type-checking-block` (`TCH004`) behind enabled
flag by [@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/5789](https://togithub.com/astral-sh/ruff/pull/5789)
- perf: only compute start offset for overlong lines by
[@&#8203;sbrugman](https://togithub.com/sbrugman) in
[https://github.com/astral-sh/ruff/pull/5811](https://togithub.com/astral-sh/ruff/pull/5811)
- Change `pandas-use-of-dot-read-table` rule to emit only when
`read_table` is used on CSV data by
[@&#8203;tjkuson](https://togithub.com/tjkuson) in
[https://github.com/astral-sh/ruff/pull/5807](https://togithub.com/astral-sh/ruff/pull/5807)
- Do not fix `NamedTuple` calls containing both a list of fields and
keywords by [@&#8203;harupy](https://togithub.com/harupy) in
[https://github.com/astral-sh/ruff/pull/5799](https://togithub.com/astral-sh/ruff/pull/5799)
- Ignore directories when collecting files to lint by
[@&#8203;harupy](https://togithub.com/harupy) in
[https://github.com/astral-sh/ruff/pull/5775](https://togithub.com/astral-sh/ruff/pull/5775)
- Add filename to `noqa` warnings by
[@&#8203;sobolevn](https://togithub.com/sobolevn) in
[https://github.com/astral-sh/ruff/pull/5856](https://togithub.com/astral-sh/ruff/pull/5856)
- Handle io errors gracefully by
[@&#8203;konstin](https://togithub.com/konstin) in
[https://github.com/astral-sh/ruff/pull/5611](https://togithub.com/astral-sh/ruff/pull/5611)
- Allow `respect_gitignore` when not in a git repo by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[https://github.com/astral-sh/ruff/pull/5937](https://togithub.com/astral-sh/ruff/pull/5937)

#### New Contributors

- [@&#8203;eggplants](https://togithub.com/eggplants) made their first
contribution in
[https://github.com/astral-sh/ruff/pull/5741](https://togithub.com/astral-sh/ruff/pull/5741)
- [@&#8203;guillaumeLepape](https://togithub.com/guillaumeLepape) made
their first contribution in
[https://github.com/astral-sh/ruff/pull/5786](https://togithub.com/astral-sh/ruff/pull/5786)
- [@&#8203;odiseo0](https://togithub.com/odiseo0) made their first
contribution in
[https://github.com/astral-sh/ruff/pull/5888](https://togithub.com/astral-sh/ruff/pull/5888)
- [@&#8203;DavidCain](https://togithub.com/DavidCain) made their first
contribution in
[https://github.com/astral-sh/ruff/pull/5889](https://togithub.com/astral-sh/ruff/pull/5889)
- [@&#8203;LaBatata101](https://togithub.com/LaBatata101) made their
first contribution in
[https://github.com/astral-sh/ruff/pull/5844](https://togithub.com/astral-sh/ruff/pull/5844)

**Full Changelog**:
astral-sh/ruff@v0.0.278...v0.0.279

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **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://developer.mend.io/github/jankatins/pr-workflow-example).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi4xMS4wIiwidXBkYXRlZEluVmVyIjoiMzYuMTEuMCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->
renovate bot referenced this pull request in allenporter/pyrainbird Jul 23, 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://beta.ruff.rs/docs)
([source](https://togithub.com/astral-sh/ruff),
[changelog](https://togithub.com/astral-sh/ruff/releases)) | `==0.0.278`
-> `==0.0.280` |
[![age](https://developer.mend.io/api/mc/badges/age/pypi/ruff/0.0.280?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/ruff/0.0.280?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/ruff/0.0.278/0.0.280?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/ruff/0.0.278/0.0.280?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>astral-sh/ruff (ruff)</summary>

###
[`v0.0.280`](https://togithub.com/astral-sh/ruff/compare/v0.0.279...v0.0.280)

[Compare
Source](https://togithub.com/astral-sh/ruff/compare/v0.0.279...v0.0.280)

###
[`v0.0.279`](https://togithub.com/astral-sh/ruff/releases/tag/v0.0.279)

[Compare
Source](https://togithub.com/astral-sh/ruff/compare/v0.0.278...v0.0.279)

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

#### What's Changed

##### Rules

- \[`flake8-pyi`] Implement flake8-pyi's PYI026 by
[@&#8203;LaBatata101](https://togithub.com/LaBatata101) in
[https://github.com/astral-sh/ruff/pull/5844](https://togithub.com/astral-sh/ruff/pull/5844)
- \[`flake8-pyi`] Implement flake8-pyi's `PYI017` by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[https://github.com/astral-sh/ruff/pull/5895](https://togithub.com/astral-sh/ruff/pull/5895)
- \[`flake8-pyi`] Implement flake8-pyi's `PYI036` by
[@&#8203;density](https://togithub.com/density) in
[https://github.com/astral-sh/ruff/pull/5668](https://togithub.com/astral-sh/ruff/pull/5668)
- \[`flake8-pyi`] Implement flake8-pyi's `PYI041` by
[@&#8203;density](https://togithub.com/density) in
[https://github.com/astral-sh/ruff/pull/5722](https://togithub.com/astral-sh/ruff/pull/5722)
- \[`flake8-use-pathlib`] Implement `os-path-getsize` and
`os-path-get(a|m|c)-time` (`PTH202-205`) by
[@&#8203;sbrugman](https://togithub.com/sbrugman) in
[https://github.com/astral-sh/ruff/pull/5835](https://togithub.com/astral-sh/ruff/pull/5835)
- \[`flake8-use-pathlib`] Implement `path-constructor-default-argument`
(`PTH201`) by [@&#8203;sbrugman](https://togithub.com/sbrugman) in
[https://github.com/astral-sh/ruff/pull/5833](https://togithub.com/astral-sh/ruff/pull/5833)
- \[`pandas-vet`] Implement constant series rule (`PD101`) by
[@&#8203;sbrugman](https://togithub.com/sbrugman) in
[https://github.com/astral-sh/ruff/pull/5802](https://togithub.com/astral-sh/ruff/pull/5802)
- \[`pylint`] Implement Pylint's `consider-using-in` (`PLR1714`) by
[@&#8203;tjkuson](https://togithub.com/tjkuson) in
[https://github.com/astral-sh/ruff/pull/5193](https://togithub.com/astral-sh/ruff/pull/5193)

##### Rule changes

- \[`flake8-annotations`] Check for `Any` in other types for `ANN401` by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[https://github.com/astral-sh/ruff/pull/5601](https://togithub.com/astral-sh/ruff/pull/5601)
- \[`flake8-bugbear`] Add autofix for B004 by
[@&#8203;density](https://togithub.com/density) in
[https://github.com/astral-sh/ruff/pull/5788](https://togithub.com/astral-sh/ruff/pull/5788)
- \[`flake8-bugbear`] Remove `B904`'s lowercase exemption by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/5751](https://togithub.com/astral-sh/ruff/pull/5751)
- \[`flake8-use-pathlib`] extend PTH118 with `os.sep` by
[@&#8203;sbrugman](https://togithub.com/sbrugman) in
[https://github.com/astral-sh/ruff/pull/5935](https://togithub.com/astral-sh/ruff/pull/5935)
- \[`pyupgrade`] Expand scope of `quoted-annotation` rule (`UP037`) by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/5766](https://togithub.com/astral-sh/ruff/pull/5766)
- \[`pyupgrade`] Extend PEP 604 rewrites to support some quoted
annotations by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/5725](https://togithub.com/astral-sh/ruff/pull/5725)
- \[`ruff`] Expand `RUF015` to include all expression types by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/5767](https://togithub.com/astral-sh/ruff/pull/5767)

##### Bug Fixes

- Consider single element subscript expr for implicit optional by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[https://github.com/astral-sh/ruff/pull/5717](https://togithub.com/astral-sh/ruff/pull/5717)
- Ignore `Enum`-and-`str` subclasses for slots enforcement by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/5749](https://togithub.com/astral-sh/ruff/pull/5749)
- Avoid removing raw strings in comparison fixes by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/5755](https://togithub.com/astral-sh/ruff/pull/5755)
- Fix nested calls to `sorted` with differing arguments by
[@&#8203;density](https://togithub.com/density) in
[https://github.com/astral-sh/ruff/pull/5761](https://togithub.com/astral-sh/ruff/pull/5761)
- Use unused variable detection to power `incorrect-dict-iterator` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/5763](https://togithub.com/astral-sh/ruff/pull/5763)
- Include alias when formatting import-from structs by
[@&#8203;guillaumeLepape](https://togithub.com/guillaumeLepape) in
[https://github.com/astral-sh/ruff/pull/5786](https://togithub.com/astral-sh/ruff/pull/5786)
- Make `lint_only` aware of the source kind by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[https://github.com/astral-sh/ruff/pull/5876](https://togithub.com/astral-sh/ruff/pull/5876)
- Restore `redefined-while-unused` violations in classes by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/5926](https://togithub.com/astral-sh/ruff/pull/5926)
- Flatten nested tuples when fixing UP007 violations by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/5724](https://togithub.com/astral-sh/ruff/pull/5724)
- Ignore Jupyter Notebooks for `--add-noqa` by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[https://github.com/astral-sh/ruff/pull/5727](https://togithub.com/astral-sh/ruff/pull/5727)
- Avoid checking `EXE001` and `EXE002` on WSL by
[@&#8203;tjkuson](https://togithub.com/tjkuson) in
[https://github.com/astral-sh/ruff/pull/5735](https://togithub.com/astral-sh/ruff/pull/5735)
- Properly group assignment targets by
[@&#8203;MichaReiser](https://togithub.com/MichaReiser) in
[https://github.com/astral-sh/ruff/pull/5728](https://togithub.com/astral-sh/ruff/pull/5728)
- Avoid stack overflow for non-BitOr binary types by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/5743](https://togithub.com/astral-sh/ruff/pull/5743)
- Move function visit out of `Expr::Call` branches by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/5772](https://togithub.com/astral-sh/ruff/pull/5772)
- \[B006] Add bytes to immutable types by
[@&#8203;harupy](https://togithub.com/harupy) in
[https://github.com/astral-sh/ruff/pull/5776](https://togithub.com/astral-sh/ruff/pull/5776)
- Format `SetComp` by [@&#8203;lkh42t](https://togithub.com/lkh42t) in
[https://github.com/astral-sh/ruff/pull/5774](https://togithub.com/astral-sh/ruff/pull/5774)
- Gate `runtime-import-in-type-checking-block` (`TCH004`) behind enabled
flag by [@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/5789](https://togithub.com/astral-sh/ruff/pull/5789)
- perf: only compute start offset for overlong lines by
[@&#8203;sbrugman](https://togithub.com/sbrugman) in
[https://github.com/astral-sh/ruff/pull/5811](https://togithub.com/astral-sh/ruff/pull/5811)
- Change `pandas-use-of-dot-read-table` rule to emit only when
`read_table` is used on CSV data by
[@&#8203;tjkuson](https://togithub.com/tjkuson) in
[https://github.com/astral-sh/ruff/pull/5807](https://togithub.com/astral-sh/ruff/pull/5807)
- Do not fix `NamedTuple` calls containing both a list of fields and
keywords by [@&#8203;harupy](https://togithub.com/harupy) in
[https://github.com/astral-sh/ruff/pull/5799](https://togithub.com/astral-sh/ruff/pull/5799)
- Ignore directories when collecting files to lint by
[@&#8203;harupy](https://togithub.com/harupy) in
[https://github.com/astral-sh/ruff/pull/5775](https://togithub.com/astral-sh/ruff/pull/5775)
- Add filename to `noqa` warnings by
[@&#8203;sobolevn](https://togithub.com/sobolevn) in
[https://github.com/astral-sh/ruff/pull/5856](https://togithub.com/astral-sh/ruff/pull/5856)
- Handle io errors gracefully by
[@&#8203;konstin](https://togithub.com/konstin) in
[https://github.com/astral-sh/ruff/pull/5611](https://togithub.com/astral-sh/ruff/pull/5611)
- Allow `respect_gitignore` when not in a git repo by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[https://github.com/astral-sh/ruff/pull/5937](https://togithub.com/astral-sh/ruff/pull/5937)

#### New Contributors

- [@&#8203;eggplants](https://togithub.com/eggplants) made their first
contribution in
[https://github.com/astral-sh/ruff/pull/5741](https://togithub.com/astral-sh/ruff/pull/5741)
- [@&#8203;guillaumeLepape](https://togithub.com/guillaumeLepape) made
their first contribution in
[https://github.com/astral-sh/ruff/pull/5786](https://togithub.com/astral-sh/ruff/pull/5786)
- [@&#8203;odiseo0](https://togithub.com/odiseo0) made their first
contribution in
[https://github.com/astral-sh/ruff/pull/5888](https://togithub.com/astral-sh/ruff/pull/5888)
- [@&#8203;DavidCain](https://togithub.com/DavidCain) made their first
contribution in
[https://github.com/astral-sh/ruff/pull/5889](https://togithub.com/astral-sh/ruff/pull/5889)
- [@&#8203;LaBatata101](https://togithub.com/LaBatata101) made their
first contribution in
[https://github.com/astral-sh/ruff/pull/5844](https://togithub.com/astral-sh/ruff/pull/5844)

**Full Changelog**:
astral-sh/ruff@v0.0.278...v0.0.279

</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://developer.mend.io/github/allenporter/pyrainbird).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi4xMS4wIiwidXBkYXRlZEluVmVyIjoiMzYuMTEuMCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
renovate bot referenced this pull request in allenporter/flux-local Jul 24, 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://beta.ruff.rs/docs)
([source](https://togithub.com/astral-sh/ruff),
[changelog](https://togithub.com/astral-sh/ruff/releases)) | `==0.0.278`
-> `==0.0.280` |
[![age](https://developer.mend.io/api/mc/badges/age/pypi/ruff/0.0.280?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/ruff/0.0.280?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/ruff/0.0.278/0.0.280?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/ruff/0.0.278/0.0.280?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>astral-sh/ruff (ruff)</summary>

###
[`v0.0.280`](https://togithub.com/astral-sh/ruff/releases/tag/v0.0.280)

[Compare
Source](https://togithub.com/astral-sh/ruff/compare/v0.0.279...v0.0.280)

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

#### What's Changed

##### Bug Fixes

- Avoid collapsing `elif` and `else` branches during import sorting by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/5964](https://togithub.com/astral-sh/ruff/pull/5964)

**Full Changelog**:
astral-sh/ruff@v0.0.279...v0.0.280

###
[`v0.0.279`](https://togithub.com/astral-sh/ruff/releases/tag/v0.0.279)

[Compare
Source](https://togithub.com/astral-sh/ruff/compare/v0.0.278...v0.0.279)

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

#### What's Changed

##### Rules

- \[`flake8-pyi`] Implement flake8-pyi's PYI026 by
[@&#8203;LaBatata101](https://togithub.com/LaBatata101) in
[https://github.com/astral-sh/ruff/pull/5844](https://togithub.com/astral-sh/ruff/pull/5844)
- \[`flake8-pyi`] Implement flake8-pyi's `PYI017` by
[@&#8203;qdegraaf](https://togithub.com/qdegraaf) in
[https://github.com/astral-sh/ruff/pull/5895](https://togithub.com/astral-sh/ruff/pull/5895)
- \[`flake8-pyi`] Implement flake8-pyi's `PYI036` by
[@&#8203;density](https://togithub.com/density) in
[https://github.com/astral-sh/ruff/pull/5668](https://togithub.com/astral-sh/ruff/pull/5668)
- \[`flake8-pyi`] Implement flake8-pyi's `PYI041` by
[@&#8203;density](https://togithub.com/density) in
[https://github.com/astral-sh/ruff/pull/5722](https://togithub.com/astral-sh/ruff/pull/5722)
- \[`flake8-use-pathlib`] Implement `os-path-getsize` and
`os-path-get(a|m|c)-time` (`PTH202-205`) by
[@&#8203;sbrugman](https://togithub.com/sbrugman) in
[https://github.com/astral-sh/ruff/pull/5835](https://togithub.com/astral-sh/ruff/pull/5835)
- \[`flake8-use-pathlib`] Implement `path-constructor-default-argument`
(`PTH201`) by [@&#8203;sbrugman](https://togithub.com/sbrugman) in
[https://github.com/astral-sh/ruff/pull/5833](https://togithub.com/astral-sh/ruff/pull/5833)
- \[`pandas-vet`] Implement constant series rule (`PD101`) by
[@&#8203;sbrugman](https://togithub.com/sbrugman) in
[https://github.com/astral-sh/ruff/pull/5802](https://togithub.com/astral-sh/ruff/pull/5802)
- \[`pylint`] Implement Pylint's `consider-using-in` (`PLR1714`) by
[@&#8203;tjkuson](https://togithub.com/tjkuson) in
[https://github.com/astral-sh/ruff/pull/5193](https://togithub.com/astral-sh/ruff/pull/5193)

##### Rule changes

- \[`flake8-annotations`] Check for `Any` in other types for `ANN401` by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[https://github.com/astral-sh/ruff/pull/5601](https://togithub.com/astral-sh/ruff/pull/5601)
- \[`flake8-bugbear`] Add autofix for B004 by
[@&#8203;density](https://togithub.com/density) in
[https://github.com/astral-sh/ruff/pull/5788](https://togithub.com/astral-sh/ruff/pull/5788)
- \[`flake8-bugbear`] Remove `B904`'s lowercase exemption by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/5751](https://togithub.com/astral-sh/ruff/pull/5751)
- \[`flake8-use-pathlib`] extend PTH118 with `os.sep` by
[@&#8203;sbrugman](https://togithub.com/sbrugman) in
[https://github.com/astral-sh/ruff/pull/5935](https://togithub.com/astral-sh/ruff/pull/5935)
- \[`pyupgrade`] Expand scope of `quoted-annotation` rule (`UP037`) by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/5766](https://togithub.com/astral-sh/ruff/pull/5766)
- \[`pyupgrade`] Extend PEP 604 rewrites to support some quoted
annotations by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/5725](https://togithub.com/astral-sh/ruff/pull/5725)
- \[`ruff`] Expand `RUF015` to include all expression types by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/5767](https://togithub.com/astral-sh/ruff/pull/5767)

##### Bug Fixes

- Consider single element subscript expr for implicit optional by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[https://github.com/astral-sh/ruff/pull/5717](https://togithub.com/astral-sh/ruff/pull/5717)
- Ignore `Enum`-and-`str` subclasses for slots enforcement by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/5749](https://togithub.com/astral-sh/ruff/pull/5749)
- Avoid removing raw strings in comparison fixes by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/5755](https://togithub.com/astral-sh/ruff/pull/5755)
- Fix nested calls to `sorted` with differing arguments by
[@&#8203;density](https://togithub.com/density) in
[https://github.com/astral-sh/ruff/pull/5761](https://togithub.com/astral-sh/ruff/pull/5761)
- Use unused variable detection to power `incorrect-dict-iterator` by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/5763](https://togithub.com/astral-sh/ruff/pull/5763)
- Include alias when formatting import-from structs by
[@&#8203;guillaumeLepape](https://togithub.com/guillaumeLepape) in
[https://github.com/astral-sh/ruff/pull/5786](https://togithub.com/astral-sh/ruff/pull/5786)
- Make `lint_only` aware of the source kind by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[https://github.com/astral-sh/ruff/pull/5876](https://togithub.com/astral-sh/ruff/pull/5876)
- Restore `redefined-while-unused` violations in classes by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/5926](https://togithub.com/astral-sh/ruff/pull/5926)
- Flatten nested tuples when fixing UP007 violations by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/5724](https://togithub.com/astral-sh/ruff/pull/5724)
- Ignore Jupyter Notebooks for `--add-noqa` by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[https://github.com/astral-sh/ruff/pull/5727](https://togithub.com/astral-sh/ruff/pull/5727)
- Avoid checking `EXE001` and `EXE002` on WSL by
[@&#8203;tjkuson](https://togithub.com/tjkuson) in
[https://github.com/astral-sh/ruff/pull/5735](https://togithub.com/astral-sh/ruff/pull/5735)
- Properly group assignment targets by
[@&#8203;MichaReiser](https://togithub.com/MichaReiser) in
[https://github.com/astral-sh/ruff/pull/5728](https://togithub.com/astral-sh/ruff/pull/5728)
- Avoid stack overflow for non-BitOr binary types by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/5743](https://togithub.com/astral-sh/ruff/pull/5743)
- Move function visit out of `Expr::Call` branches by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/5772](https://togithub.com/astral-sh/ruff/pull/5772)
- \[B006] Add bytes to immutable types by
[@&#8203;harupy](https://togithub.com/harupy) in
[https://github.com/astral-sh/ruff/pull/5776](https://togithub.com/astral-sh/ruff/pull/5776)
- Format `SetComp` by [@&#8203;lkh42t](https://togithub.com/lkh42t) in
[https://github.com/astral-sh/ruff/pull/5774](https://togithub.com/astral-sh/ruff/pull/5774)
- Gate `runtime-import-in-type-checking-block` (`TCH004`) behind enabled
flag by [@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/astral-sh/ruff/pull/5789](https://togithub.com/astral-sh/ruff/pull/5789)
- perf: only compute start offset for overlong lines by
[@&#8203;sbrugman](https://togithub.com/sbrugman) in
[https://github.com/astral-sh/ruff/pull/5811](https://togithub.com/astral-sh/ruff/pull/5811)
- Change `pandas-use-of-dot-read-table` rule to emit only when
`read_table` is used on CSV data by
[@&#8203;tjkuson](https://togithub.com/tjkuson) in
[https://github.com/astral-sh/ruff/pull/5807](https://togithub.com/astral-sh/ruff/pull/5807)
- Do not fix `NamedTuple` calls containing both a list of fields and
keywords by [@&#8203;harupy](https://togithub.com/harupy) in
[https://github.com/astral-sh/ruff/pull/5799](https://togithub.com/astral-sh/ruff/pull/5799)
- Ignore directories when collecting files to lint by
[@&#8203;harupy](https://togithub.com/harupy) in
[https://github.com/astral-sh/ruff/pull/5775](https://togithub.com/astral-sh/ruff/pull/5775)
- Add filename to `noqa` warnings by
[@&#8203;sobolevn](https://togithub.com/sobolevn) in
[https://github.com/astral-sh/ruff/pull/5856](https://togithub.com/astral-sh/ruff/pull/5856)
- Handle io errors gracefully by
[@&#8203;konstin](https://togithub.com/konstin) in
[https://github.com/astral-sh/ruff/pull/5611](https://togithub.com/astral-sh/ruff/pull/5611)
- Allow `respect_gitignore` when not in a git repo by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[https://github.com/astral-sh/ruff/pull/5937](https://togithub.com/astral-sh/ruff/pull/5937)

#### New Contributors

- [@&#8203;eggplants](https://togithub.com/eggplants) made their first
contribution in
[https://github.com/astral-sh/ruff/pull/5741](https://togithub.com/astral-sh/ruff/pull/5741)
- [@&#8203;guillaumeLepape](https://togithub.com/guillaumeLepape) made
their first contribution in
[https://github.com/astral-sh/ruff/pull/5786](https://togithub.com/astral-sh/ruff/pull/5786)
- [@&#8203;odiseo0](https://togithub.com/odiseo0) made their first
contribution in
[https://github.com/astral-sh/ruff/pull/5888](https://togithub.com/astral-sh/ruff/pull/5888)
- [@&#8203;DavidCain](https://togithub.com/DavidCain) made their first
contribution in
[https://github.com/astral-sh/ruff/pull/5889](https://togithub.com/astral-sh/ruff/pull/5889)
- [@&#8203;LaBatata101](https://togithub.com/LaBatata101) made their
first contribution in
[https://github.com/astral-sh/ruff/pull/5844](https://togithub.com/astral-sh/ruff/pull/5844)

**Full Changelog**:
astral-sh/ruff@v0.0.278...v0.0.279

</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://developer.mend.io/github/allenporter/flux-local).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi4xMS4wIiwidXBkYXRlZEluVmVyIjoiMzYuMTEuMCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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.

B904 only triggered for error literals

3 participants