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

Avoid short-circuiting when detecting RET rules #4002

Merged
merged 1 commit into from
Apr 18, 2023
Merged

Conversation

charliermarsh
Copy link
Member

Summary

We have some logic in the RET rule set that ejects from checking certain rules as soon as we hit errors in other rules. This can lead to confusing situations whereby we surface one error, the user fixes it, re-runs Ruff, then sees a seemingly unrelated error (which was previously suppressed by our short-circuiting).

This behavior matched flake8-return, but I think it's clearer to just run all checks regardless of the outcomes of other checks.

Closes #3989.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 18, 2023

PR Check Results

Ecosystem

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

airflow (+38, -0)

+ airflow/executors/kubernetes_executor.py:144:13: RET505 Unnecessary `else` after `return` statement
+ airflow/models/dag.py:2387:9: RET506 Unnecessary `else` after `raise` statement
+ airflow/models/dagcode.py:185:16: RET504 Unnecessary variable assignment before `return` statement
+ airflow/models/renderedtifields.py:150:20: RET504 Unnecessary variable assignment before `return` statement
+ airflow/providers/amazon/aws/operators/eks.py:197:13: RET501 [*] Do not explicitly `return None` in function if it is the only possible return value
+ airflow/providers/amazon/aws/secrets/secrets_manager.py:266:20: RET504 Unnecessary variable assignment before `return` statement
+ airflow/providers/apache/beam/operators/beam.py:345:17: RET503 [*] Missing explicit `return` at the end of function able to return non-`None` value
+ airflow/providers/apache/beam/operators/beam.py:500:17: RET503 [*] Missing explicit `return` at the end of function able to return non-`None` value
+ airflow/providers/apache/beam/operators/beam.py:652:17: RET503 [*] Missing explicit `return` at the end of function able to return non-`None` value
+ airflow/providers/apache/livy/hooks/livy.py:674:9: RET503 [*] Missing explicit `return` at the end of function able to return non-`None` value
+ airflow/providers/cncf/kubernetes/hooks/kubernetes.py:462:9: RET505 Unnecessary `elif` after `return` statement
+ airflow/providers/common/sql/sensors/sql.py:108:13: RET505 Unnecessary `else` after `return` statement
+ airflow/providers/dbt/cloud/operators/dbt.py:157:17: RET503 [*] Missing explicit `return` at the end of function able to return non-`None` value
+ airflow/providers/docker/operators/docker.py:390:13: RET505 Unnecessary `elif` after `return` statement
+ airflow/providers/docker/operators/docker.py:396:21: RET505 Unnecessary `else` after `return` statement
+ airflow/providers/google/cloud/operators/cloud_composer.py:606:13: RET503 [*] Missing explicit `return` at the end of function able to return non-`None` value
+ airflow/providers/google/cloud/transfers/cassandra_to_gcs.py:284:13: RET505 Unnecessary `else` after `return` statement
+ airflow/providers/google/cloud/transfers/gcs_to_bigquery.py:474:9: RET503 [*] Missing explicit `return` at the end of function able to return non-`None` value
+ airflow/providers/google/cloud/transfers/gcs_to_bigquery.py:499:17: RET503 [*] Missing explicit `return` at the end of function able to return non-`None` value
+ airflow/providers/google_vendor/googleads/interceptors/logging_interceptor.py:138:13: RET503 [*] Missing explicit `return` at the end of function able to return non-`None` value
+ airflow/providers/papermill/operators/papermill.py:88:9: RET506 Unnecessary `elif` after `raise` statement
+ airflow/providers/trino/hooks/trino.py:141:16: RET504 Unnecessary variable assignment before `return` statement
+ airflow/sensors/base.py:252:13: RET506 Unnecessary `else` after `raise` statement
+ airflow/sensors/bash.py:105:25: RET505 Unnecessary `else` after `return` statement
+ airflow/sensors/external_task.py:301:13: RET506 Unnecessary `elif` after `raise` statement
+ airflow/serialization/serialized_objects.py:484:13: RET505 Unnecessary `elif` after `return` statement
+ airflow/serialization/serialized_objects.py:526:9: RET505 Unnecessary `elif` after `return` statement
+ airflow/serialization/serialized_objects.py:558:13: RET505 Unnecessary `elif` after `return` statement
+ airflow/serialization/serialized_objects.py:562:13: RET503 [*] Missing explicit `return` at the end of function able to return non-`None` value
+ airflow/utils/dates.py:206:13: RET505 Unnecessary `else` after `return` statement
+ airflow/utils/helpers.py:349:13: RET507 Unnecessary `elif` after `continue` statement
+ airflow/utils/helpers.py:361:13: RET507 Unnecessary `elif` after `continue` statement
+ airflow/www/fab_security/manager.py:1235:13: RET505 Unnecessary `else` after `return` statement
+ airflow/www/fab_security/manager.py:544:9: RET503 [*] Missing explicit `return` at the end of function able to return non-`None` value
+ airflow/www/fab_security/sqla/manager.py:177:9: RET503 [*] Missing explicit `return` at the end of function able to return non-`None` value
+ dev/breeze/src/airflow_breeze/commands/ci_image_commands.py:403:17: RET505 Unnecessary `else` after `return` statement
+ dev/breeze/src/airflow_breeze/utils/confirm.py:82:21: RET505 Unnecessary `else` after `return` statement
+ tests/test_utils/logging_command_executor.py:103:17: RET503 [*] Missing explicit `return` at the end of function able to return non-`None` value

bokeh (+21, -0)

+ examples/server/app/clustering/main.py:96:5: RET503 [*] Missing explicit `return` at the end of function able to return non-`None` value
+ src/bokeh/client/connection.py:332:13: RET501 [*] Do not explicitly `return None` in function if it is the only possible return value
+ src/bokeh/core/serialization.py:291:13: RET505 Unnecessary `else` after `return` statement
+ src/bokeh/core/serialization.py:394:17: RET505 Unnecessary `elif` after `return` statement
+ src/bokeh/core/serialization.py:403:17: RET505 Unnecessary `elif` after `return` statement
+ src/bokeh/core/serialization.py:409:13: RET503 [*] Missing explicit `return` at the end of function able to return non-`None` value
+ src/bokeh/core/serialization.py:466:9: RET503 [*] Missing explicit `return` at the end of function able to return non-`None` value
+ src/bokeh/core/serialization.py:550:21: RET505 Unnecessary `else` after `return` statement
+ src/bokeh/core/serialization.py:553:21: RET503 [*] Missing explicit `return` at the end of function able to return non-`None` value
+ src/bokeh/core/serialization.py:569:13: RET503 [*] Missing explicit `return` at the end of function able to return non-`None` value
+ src/bokeh/core/serialization.py:708:17: RET503 [*] Missing explicit `return` at the end of function able to return non-`None` value
+ src/bokeh/core/serialization.py:714:17: RET503 [*] Missing explicit `return` at the end of function able to return non-`None` value
+ src/bokeh/models/plots.py:524:9: RET505 Unnecessary `else` after `return` statement
+ src/bokeh/plotting/_plot.py:153:9: RET505 Unnecessary `elif` after `return` statement
+ src/bokeh/server/tornado.py:326:9: RET506 Unnecessary `elif` after `raise` statement
+ src/bokeh/server/tornado.py:332:9: RET506 Unnecessary `elif` after `raise` statement
+ src/bokeh/server/tornado.py:338:9: RET506 Unnecessary `elif` after `raise` statement
+ src/bokeh/server/tornado.py:345:9: RET506 Unnecessary `elif` after `raise` statement
+ src/bokeh/server/tornado.py:356:9: RET506 Unnecessary `elif` after `raise` statement
+ src/bokeh/server/tornado.py:374:9: RET506 Unnecessary `else` after `raise` statement
+ src/bokeh/server/views/ws.py:147:9: RET506 Unnecessary `elif` after `raise` statement

zulip (+17, -0)

+ tools/lib/template_parser.py:340:9: RET505 Unnecessary `else` after `return` statement
+ tools/lib/template_parser.py:679:12: RET504 Unnecessary variable assignment before `return` statement
+ zerver/lib/addressee.py:141:13: RET503 [*] Missing explicit `return` at the end of function able to return non-`None` value
+ zerver/lib/addressee.py:141:13: RET505 Unnecessary `elif` after `return` statement
+ zerver/lib/push_notifications.py:676:9: RET505 Unnecessary `else` after `return` statement
+ zerver/lib/remote_server.py:95:9: RET506 Unnecessary `else` after `raise` statement
+ zerver/management/commands/change_user_role.py:89:13: RET506 Unnecessary `elif` after `raise` statement
+ zerver/tests/test_openapi.py:466:21: RET507 Unnecessary `else` after `continue` statement
+ zerver/webhooks/freshstatus/view.py:177:9: RET505 Unnecessary `elif` after `return` statement
+ zerver/webhooks/freshstatus/view.py:190:9: RET505 Unnecessary `else` after `return` statement
+ zerver/webhooks/github/view.py:838:9: RET505 Unnecessary `else` after `return` statement
+ zerver/webhooks/lidarr/view.py:141:9: RET505 Unnecessary `else` after `return` statement
+ zerver/webhooks/radarr/view.py:101:9: RET505 Unnecessary `else` after `return` statement
+ zerver/webhooks/sonarr/view.py:160:9: RET505 Unnecessary `else` after `return` statement
+ zerver/webhooks/sonarr/view.py:167:9: RET505 Unnecessary `else` after `return` statement
+ zerver/webhooks/trello/view/card_actions.py:106:13: RET505 Unnecessary `else` after `return` statement
+ zproject/backends.py:1537:13: RET505 Unnecessary `else` after `return` statement

Benchmark

Linux

group                                      main                                    pr
-----                                      ----                                    --
linter/all-rules/large/dataset.py          1.00     16.6±0.30ms     2.5 MB/sec     1.01     16.7±0.33ms     2.4 MB/sec
linter/all-rules/numpy/ctypeslib.py        1.04      4.4±0.14ms     3.8 MB/sec     1.00      4.2±0.15ms     4.0 MB/sec
linter/all-rules/numpy/globals.py          1.00   545.2±31.46µs     5.4 MB/sec     1.05   574.8±28.09µs     5.1 MB/sec
linter/all-rules/pydantic/types.py         1.02      7.4±0.38ms     3.4 MB/sec     1.00      7.3±0.32ms     3.5 MB/sec
linter/default-rules/large/dataset.py      1.07      9.5±0.71ms     4.3 MB/sec     1.00      9.0±0.61ms     4.5 MB/sec
linter/default-rules/numpy/ctypeslib.py    1.16  1933.9±178.25µs     8.6 MB/sec    1.00  1672.2±79.94µs    10.0 MB/sec
linter/default-rules/numpy/globals.py      1.00    196.0±7.30µs    15.1 MB/sec     1.03   201.6±13.66µs    14.6 MB/sec
linter/default-rules/pydantic/types.py     1.00      3.5±0.24ms     7.4 MB/sec     1.05      3.6±0.31ms     7.0 MB/sec
parser/large/dataset.py                    1.08      7.0±0.31ms     5.8 MB/sec     1.00      6.5±0.43ms     6.2 MB/sec
parser/numpy/ctypeslib.py                  1.02  1381.0±37.65µs    12.1 MB/sec     1.00  1351.9±35.89µs    12.3 MB/sec
parser/numpy/globals.py                    1.05    140.5±7.53µs    21.0 MB/sec     1.00    133.9±5.72µs    22.0 MB/sec
parser/pydantic/types.py                   1.01      3.0±0.09ms     8.6 MB/sec     1.00      3.0±0.07ms     8.6 MB/sec

Windows

group                                      main                                   pr
-----                                      ----                                   --
linter/all-rules/large/dataset.py          1.00     14.5±0.04ms     2.8 MB/sec    1.01     14.6±0.10ms     2.8 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.8 MB/sec
linter/all-rules/numpy/globals.py          1.00    380.3±1.89µs     7.8 MB/sec    1.01    383.6±6.82µs     7.7 MB/sec
linter/all-rules/pydantic/types.py         1.00      5.9±0.02ms     4.3 MB/sec    1.01      6.0±0.02ms     4.3 MB/sec
linter/default-rules/large/dataset.py      1.00      7.4±0.02ms     5.5 MB/sec    1.01      7.5±0.10ms     5.4 MB/sec
linter/default-rules/numpy/ctypeslib.py    1.00   1537.9±5.56µs    10.8 MB/sec    1.01   1545.8±5.00µs    10.8 MB/sec
linter/default-rules/numpy/globals.py      1.00    165.3±1.02µs    17.9 MB/sec    1.02    167.8±2.98µs    17.6 MB/sec
linter/default-rules/pydantic/types.py     1.00      3.3±0.01ms     7.8 MB/sec    1.00      3.3±0.01ms     7.8 MB/sec
parser/large/dataset.py                    1.00      6.1±0.02ms     6.6 MB/sec    1.00      6.1±0.02ms     6.6 MB/sec
parser/numpy/ctypeslib.py                  1.00   1136.6±4.16µs    14.7 MB/sec    1.01   1143.6±4.13µs    14.6 MB/sec
parser/numpy/globals.py                    1.00    115.2±0.42µs    25.6 MB/sec    1.00    115.0±0.58µs    25.7 MB/sec
parser/pydantic/types.py                   1.00      2.5±0.01ms    10.0 MB/sec    1.00      2.5±0.01ms    10.0 MB/sec

@charliermarsh charliermarsh merged commit 79c47e2 into main Apr 18, 2023
13 checks passed
@charliermarsh charliermarsh deleted the charlie/ret branch April 18, 2023 02:52
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>
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.

RET selection is behaving incorrectly
1 participant