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

Exempt return with side effects for TRY300 #3780

Conversation

JonathanPlasse
Copy link
Contributor

@github-actions
Copy link
Contributor

github-actions bot commented Mar 28, 2023

PR Check Results

Ecosystem

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

airflow (+0, -53)

- airflow/api_connexion/endpoints/connection_endpoint.py:188:9: TRY300 Consider moving this statement to an `else` block
- airflow/api_connexion/endpoints/dag_run_endpoint.py:351:13: TRY300 Consider moving this statement to an `else` block
- airflow/api_connexion/endpoints/pool_endpoint.py:154:9: TRY300 Consider moving this statement to an `else` block
- airflow/api_connexion/schemas/connection_schema.py:60:13: TRY300 Consider moving this statement to an `else` block
- airflow/api_internal/endpoints/rpc_api_endpoint.py:97:9: TRY300 Consider moving this statement to an `else` block
- airflow/cli/commands/info_command.py:222:13: TRY300 Consider moving this statement to an `else` block
- airflow/configuration.py:125:9: TRY300 Consider moving this statement to an `else` block
- airflow/models/variable.py:77:17: TRY300 Consider moving this statement to an `else` block
- airflow/operators/python.py:665:13: TRY300 Consider moving this statement to an `else` block
- airflow/providers/alibaba/cloud/log/oss_task_handler.py:168:13: TRY300 Consider moving this statement to an `else` block
- airflow/providers/amazon/aws/hooks/base_aws.py:498:13: TRY300 Consider moving this statement to an `else` block
- airflow/providers/amazon/aws/hooks/base_aws.py:790:13: TRY300 Consider moving this statement to an `else` block
- airflow/providers/amazon/aws/hooks/batch_client.py:366:17: TRY300 Consider moving this statement to an `else` block
- airflow/providers/amazon/aws/hooks/cloud_formation.py:55:13: TRY300 Consider moving this statement to an `else` block
- airflow/providers/amazon/aws/hooks/emr.py:474:13: TRY300 Consider moving this statement to an `else` block
- airflow/providers/amazon/aws/hooks/glue.py:173:13: TRY300 Consider moving this statement to an `else` block
- airflow/providers/amazon/aws/hooks/glue_catalog.py:162:13: TRY300 Consider moving this statement to an `else` block
- airflow/providers/amazon/aws/hooks/quicksight.py:115:13: TRY300 Consider moving this statement to an `else` block
- airflow/providers/amazon/aws/hooks/redshift_cluster.py:98:13: TRY300 Consider moving this statement to an `else` block
- airflow/providers/amazon/aws/hooks/sagemaker.py:1027:13: TRY300 Consider moving this statement to an `else` block
- airflow/providers/amazon/aws/operators/sagemaker.py:990:13: TRY300 Consider moving this statement to an `else` block
- airflow/providers/amazon/aws/secrets/secrets_manager.py:330:13: TRY300 Consider moving this statement to an `else` block
- airflow/providers/amazon/aws/secrets/systems_manager.py:207:13: TRY300 Consider moving this statement to an `else` block
- airflow/providers/apache/cassandra/hooks/cassandra.py:206:13: TRY300 Consider moving this statement to an `else` block
- airflow/providers/apache/hdfs/sensors/hdfs.py:128:13: TRY300 Consider moving this statement to an `else` block
- airflow/providers/apache/livy/hooks/livy.py:556:21: TRY300 Consider moving this statement to an `else` block
- airflow/providers/databricks/hooks/databricks_base.py:591:17: TRY300 Consider moving this statement to an `else` block
- airflow/providers/dbt/cloud/hooks/dbt.py:238:21: TRY300 Consider moving this statement to an `else` block
- airflow/providers/google/ads/hooks/ads.py:179:17: TRY300 Consider moving this statement to an `else` block
- airflow/providers/google/ads/hooks/ads.py:248:13: TRY300 Consider moving this statement to an `else` block
- airflow/providers/google/cloud/operators/functions.py:402:13: TRY300 Consider moving this statement to an `else` block
- airflow/providers/google/cloud/operators/vertex_ai/batch_prediction_job.py:431:13: TRY300 Consider moving this statement to an `else` block
- airflow/providers/google/cloud/operators/vertex_ai/dataset.py:200:13: TRY300 Consider moving this statement to an `else` block
- airflow/providers/google/cloud/operators/vertex_ai/endpoint_service.py:398:13: TRY300 Consider moving this statement to an `else` block
- airflow/providers/google/cloud/operators/vertex_ai/hyperparameter_tuning_job.py:363:13: TRY300 Consider moving this statement to an `else` block
- airflow/providers/google/cloud/operators/vision.py:926:13: TRY300 Consider moving this statement to an `else` block
- airflow/providers/hashicorp/_internal_client/vault_client.py:382:13: TRY300 Consider moving this statement to an `else` block
- airflow/providers/hashicorp/_internal_client/vault_client.py:406:13: TRY300 Consider moving this statement to an `else` block
- airflow/providers/jenkins/operators/jenkins_job_trigger.py:59:9: TRY300 Consider moving this statement to an `else` block
- airflow/providers/microsoft/azure/hooks/cosmos.py:341:13: TRY300 Consider moving this statement to an `else` block
- airflow/providers/microsoft/azure/hooks/data_lake.py:129:13: TRY300 Consider moving this statement to an `else` block
- airflow/providers/microsoft/azure/log/wasb_task_handler.py:81:13: TRY300 Consider moving this statement to an `else` block
- airflow/sentry.py:185:25: TRY300 Consider moving this statement to an `else` block
- airflow/stats.py:242:13: TRY300 Consider moving this statement to an `else` block
- airflow/utils/cli.py:110:17: TRY300 Consider moving this statement to an `else` block
- airflow/utils/log/colored_log.py:100:13: TRY300 Consider moving this statement to an `else` block
- airflow/utils/sqlalchemy.py:241:9: TRY300 Consider moving this statement to an `else` block
- airflow/www/extensions/init_appbuilder.py:63:9: TRY300 Consider moving this statement to an `else` block
- airflow/www/views.py:1562:13: TRY300 Consider moving this statement to an `else` block
- dev/breeze/src/airflow_breeze/utils/path_utils.py:106:9: TRY300 Consider moving this statement to an `else` block
- dev/breeze/src/airflow_breeze/utils/run_utils.py:152:13: TRY300 Consider moving this statement to an `else` block
- docs/exts/removemarktransform.py:63:17: TRY300 Consider moving this statement to an `else` block
- scripts/ci/pre_commit/pre_commit_update_breeze_config_hash.py:47:9: TRY300 Consider moving this statement to an `else` block

bokeh (+0, -34)

- release/build.py:108:9: TRY300 Consider moving this statement to an `else` block
- release/build.py:128:9: TRY300 Consider moving this statement to an `else` block
- release/build.py:180:9: TRY300 Consider moving this statement to an `else` block
- release/build.py:192:9: TRY300 Consider moving this statement to an `else` block
- release/build.py:199:9: TRY300 Consider moving this statement to an `else` block
- release/build.py:206:9: TRY300 Consider moving this statement to an `else` block
- release/build.py:213:9: TRY300 Consider moving this statement to an `else` block
- release/build.py:220:9: TRY300 Consider moving this statement to an `else` block
- release/build.py:46:9: TRY300 Consider moving this statement to an `else` block
- release/build.py:56:9: TRY300 Consider moving this statement to an `else` block
- release/build.py:64:9: TRY300 Consider moving this statement to an `else` block
- release/build.py:74:9: TRY300 Consider moving this statement to an `else` block
- release/build.py:82:9: TRY300 Consider moving this statement to an `else` block
- release/build.py:90:9: TRY300 Consider moving this statement to an `else` block
- release/build.py:98:9: TRY300 Consider moving this statement to an `else` block
- release/checks.py:46:13: TRY300 Consider moving this statement to an `else` block
- release/credentials.py:57:17: TRY300 Consider moving this statement to an `else` block
- release/deploy.py:32:9: TRY300 Consider moving this statement to an `else` block
- release/deploy.py:44:9: TRY300 Consider moving this statement to an `else` block
- release/deploy.py:67:9: TRY300 Consider moving this statement to an `else` block
- release/deploy.py:77:9: TRY300 Consider moving this statement to an `else` block
- release/deploy.py:86:9: TRY300 Consider moving this statement to an `else` block
- release/git.py:31:9: TRY300 Consider moving this statement to an `else` block
- release/git.py:39:9: TRY300 Consider moving this statement to an `else` block
- release/git.py:47:9: TRY300 Consider moving this statement to an `else` block
- release/git.py:72:9: TRY300 Consider moving this statement to an `else` block
- release/git.py:80:9: TRY300 Consider moving this statement to an `else` block
- release/git.py:90:9: TRY300 Consider moving this statement to an `else` block
- release/git.py:98:9: TRY300 Consider moving this statement to an `else` block
- release/remote.py:41:9: TRY300 Consider moving this statement to an `else` block
- release/remote.py:71:9: TRY300 Consider moving this statement to an `else` block
- release/remote.py:79:9: TRY300 Consider moving this statement to an `else` block
- src/bokeh/core/property/dataspec.py:234:13: TRY300 Consider moving this statement to an `else` block
- src/bokeh/plotting/_plot.py:97:17: TRY300 Consider moving this statement to an `else` block

zulip (+0, -14)

- corporate/views/portico.py:45:9: TRY300 Consider moving this statement to an `else` block
- zerver/decorator.py:767:17: TRY300 Consider moving this statement to an `else` block
- zerver/lib/logging_util.py:61:13: TRY300 Consider moving this statement to an `else` block
- zerver/lib/management.py:106:13: TRY300 Consider moving this statement to an `else` block
- zerver/lib/sessions.py:28:9: TRY300 Consider moving this statement to an `else` block
- zerver/lib/tex.py:39:9: TRY300 Consider moving this statement to an `else` block
- zerver/lib/webhooks/common.py:229:9: TRY300 Consider moving this statement to an `else` block
- zerver/management/commands/compilemessages.py:68:13: TRY300 Consider moving this statement to an `else` block
- zerver/views/auth.py:862:13: TRY300 Consider moving this statement to an `else` block
- zerver/views/documentation.py:102:17: TRY300 Consider moving this statement to an `else` block
- zerver/views/realm.py:368:9: TRY300 Consider moving this statement to an `else` block
- zerver/views/realm_linkifiers.py:38:9: TRY300 Consider moving this statement to an `else` block
- zerver/views/realm_linkifiers.py:71:9: TRY300 Consider moving this statement to an `else` block
- zproject/backends.py:2273:13: TRY300 Consider moving this statement to an `else` block

Benchmark

Linux

group                                      main                                   pr
-----                                      ----                                   --
linter/all-rules/large/dataset.py          1.01     16.8±0.09ms     2.4 MB/sec    1.00     16.7±0.09ms     2.4 MB/sec
linter/all-rules/numpy/ctypeslib.py        1.01      4.3±0.01ms     3.9 MB/sec    1.00      4.2±0.01ms     3.9 MB/sec
linter/all-rules/numpy/globals.py          1.00    555.2±1.30µs     5.3 MB/sec    1.01    558.6±3.63µs     5.3 MB/sec
linter/all-rules/pydantic/types.py         1.01      7.2±0.07ms     3.6 MB/sec    1.00      7.1±0.01ms     3.6 MB/sec
linter/default-rules/large/dataset.py      1.00      8.6±0.02ms     4.7 MB/sec    1.00      8.6±0.02ms     4.7 MB/sec
linter/default-rules/numpy/ctypeslib.py    1.00   1943.6±3.42µs     8.6 MB/sec    1.00   1941.0±3.07µs     8.6 MB/sec
linter/default-rules/numpy/globals.py      1.00    222.8±9.27µs    13.2 MB/sec    1.02    227.4±9.28µs    13.0 MB/sec
linter/default-rules/pydantic/types.py     1.00      4.0±0.01ms     6.4 MB/sec    1.00      4.0±0.01ms     6.4 MB/sec

Windows

group                                      main                                   pr
-----                                      ----                                   --
linter/all-rules/large/dataset.py          1.01     19.3±0.23ms     2.1 MB/sec    1.00     19.2±0.30ms     2.1 MB/sec
linter/all-rules/numpy/ctypeslib.py        1.01      5.0±0.08ms     3.4 MB/sec    1.00      4.9±0.08ms     3.4 MB/sec
linter/all-rules/numpy/globals.py          1.00    599.5±9.02µs     4.9 MB/sec    1.00   601.4±14.25µs     4.9 MB/sec
linter/all-rules/pydantic/types.py         1.00      8.2±0.14ms     3.1 MB/sec    1.00      8.2±0.12ms     3.1 MB/sec
linter/default-rules/large/dataset.py      1.01     10.0±0.12ms     4.1 MB/sec    1.00      9.9±0.09ms     4.1 MB/sec
linter/default-rules/numpy/ctypeslib.py    1.00      2.2±0.03ms     7.7 MB/sec    1.00      2.2±0.06ms     7.7 MB/sec
linter/default-rules/numpy/globals.py      1.00    237.1±5.59µs    12.4 MB/sec    1.00    236.4±9.88µs    12.5 MB/sec
linter/default-rules/pydantic/types.py     1.01      4.6±0.07ms     5.6 MB/sec    1.00      4.6±0.10ms     5.6 MB/sec

@JonathanPlasse
Copy link
Contributor Author

As said in the issue.
Changing this code

def something_that_may_go_wrong():
    raise Exception

def func():
    try:
        _ = something_that_may_go_wrong()
        return something_that_may_go_wrong()
    except Exception:
        print("Failed")

into this

def something_that_may_go_wrong():
    raise Exception

def func():
    try:
        _ = something_that_may_go_wrong()
        result = something_that_may_go_wrong()
    except Exception:
        print("Failed")
    else:
        return result

Is not much better and decreases readability.

And this is a common pattern as there are 101 fewer errors in the ecosystem check with this PR.

@charliermarsh charliermarsh merged commit 5501fc9 into astral-sh:main Mar 28, 2023
@charliermarsh charliermarsh added bug Something isn't working rule Implementing or modifying a lint rule labels Mar 28, 2023
@JonathanPlasse JonathanPlasse deleted the exempt-return-with-side-effects-for-try300 branch March 29, 2023 05:28
renovate bot added a commit to ixm-one/pytest-cmake-presets that referenced this pull request Mar 30, 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.259` ->
`^0.0.260` |
[![age](https://badges.renovateapi.com/packages/pypi/ruff/0.0.260/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/pypi/ruff/0.0.260/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/pypi/ruff/0.0.260/compatibility-slim/0.0.259)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/pypi/ruff/0.0.260/confidence-slim/0.0.259)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

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

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

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

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

#### What's Changed

##### Rules

- \[`flake8-bugbear`] Add more immutable functions for `B008` by
[@&#8203;rouge8](https://togithub.com/rouge8) in
[astral-sh/ruff#3764
- \[`flake8-bugbear`] Allow `pathlib.Path()` in `B008` by
[@&#8203;rouge8](https://togithub.com/rouge8) in
[astral-sh/ruff#3794
- \[`flake8-bugbear`] Expand the scope of useless-expression (B018) by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3455
- \[`flake8-bugbear`]: Implement rule `B031` by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#3680
- \[`flake8-gettext`] Implement `flake8-gettext` by
[@&#8203;leiserfg](https://togithub.com/leiserfg) in
[astral-sh/ruff#3785
- \[`flake8-logging-format`] Add support for `.log(level, msg)` calls in
`flake8-logging-format` by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#3726
- \[`flake8-logging-format`] Allow aliased `logging` module as a logger
candidate by [@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#3718
- \[`flake8-pyi`] Add autofix for `PYI014` by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#3729
- \[`flake8-pyi`] Implement `PYI012` by
[@&#8203;JBLDKY](https://togithub.com/JBLDKY) in
[astral-sh/ruff#3743
- \[`flake8-pyi`] Implement `PYI015` by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#3728
- \[`flake8-simplify`] Fix SIM222 and SIM223 false negative by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#3740
- \[`isort`]: support submodules in known\_(first|third)\_party config
options by [@&#8203;astaric](https://togithub.com/astaric) in
[astral-sh/ruff#3768
- \[`pycodestyle`] Use unicode-width to determine line-length instead of
character count by
[@&#8203;MichaReiser](https://togithub.com/MichaReiser) in
[astral-sh/ruff#3714
- \[`pydocstyle`] Implement autofix for `D403` by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#3731
- \[`pylint`] Avoid `useless-import alias` (`C0414`) in `.pyi` files by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3761
- \[`pylint`] Exempt `PLR1711` and `RET501` if non-`None` annotation by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#3705
- \[`tryceratops`] Exempt return with side effects for TRY300 by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#3780

##### Bug Fixes

- Avoid parsing `ForwardRef` contents as type references by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3698
- Avoid parsing f-strings in type annotations by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3699
- Include `with` statements in complexity calculation by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3771
- Use import alias locations for `pep8-naming` import rules by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3772
- Allow `TID252` to fix all valid module paths by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#3796
- Fix SIM118 auto-fix by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#3695
- Avoid panics for implicitly concatenated forward references by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3700
- Allow simple container literals as default values by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#3703
- Traverse over nested string type annotations by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3724
- Use `wild::args()` and add `wild` as a dependency by
[@&#8203;agriyakhetarpal](https://togithub.com/agriyakhetarpal) in
[astral-sh/ruff#3739
- Avoid overlong-line errors for lines that end with URLs by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3663
- Sort statistics by count by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#3748
- Reduce explicit clones by
[@&#8203;MichaReiser](https://togithub.com/MichaReiser) in
[astral-sh/ruff#3793
- Add flymake-ruff to docs by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3800

#### New Contributors

- [@&#8203;agriyakhetarpal](https://togithub.com/agriyakhetarpal) made
their first contribution in
[astral-sh/ruff#3739
- [@&#8203;leiserfg](https://togithub.com/leiserfg) made their first
contribution in
[astral-sh/ruff#3741
- [@&#8203;JBLDKY](https://togithub.com/JBLDKY) made their first
contribution in
[astral-sh/ruff#3743
- [@&#8203;astaric](https://togithub.com/astaric) made their first
contribution in
[astral-sh/ruff#3768

**Full Changelog**:
astral-sh/ruff@v0.0.259...v0.0.260

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

Signed-off-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
renovate bot added a commit to allenporter/pyrainbird that referenced this pull request Mar 31, 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.259` ->
`==0.0.260` |
[![age](https://badges.renovateapi.com/packages/pypi/ruff/0.0.260/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/pypi/ruff/0.0.260/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/pypi/ruff/0.0.260/compatibility-slim/0.0.259)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/pypi/ruff/0.0.260/confidence-slim/0.0.259)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

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

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

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

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

#### What's Changed

##### Rules

- \[`flake8-bugbear`] Add more immutable functions for `B008` by
[@&#8203;rouge8](https://togithub.com/rouge8) in
[astral-sh/ruff#3764
- \[`flake8-bugbear`] Allow `pathlib.Path()` in `B008` by
[@&#8203;rouge8](https://togithub.com/rouge8) in
[astral-sh/ruff#3794
- \[`flake8-bugbear`] Expand the scope of useless-expression (B018) by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3455
- \[`flake8-bugbear`]: Implement rule `B031` by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#3680
- \[`flake8-gettext`] Implement `flake8-gettext` by
[@&#8203;leiserfg](https://togithub.com/leiserfg) in
[astral-sh/ruff#3785
- \[`flake8-logging-format`] Add support for `.log(level, msg)` calls in
`flake8-logging-format` by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#3726
- \[`flake8-logging-format`] Allow aliased `logging` module as a logger
candidate by [@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#3718
- \[`flake8-pyi`] Add autofix for `PYI014` by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#3729
- \[`flake8-pyi`] Implement `PYI012` by
[@&#8203;JBLDKY](https://togithub.com/JBLDKY) in
[astral-sh/ruff#3743
- \[`flake8-pyi`] Implement `PYI015` by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#3728
- \[`flake8-simplify`] Fix SIM222 and SIM223 false negative by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#3740
- \[`isort`]: support submodules in known\_(first|third)\_party config
options by [@&#8203;astaric](https://togithub.com/astaric) in
[astral-sh/ruff#3768
- \[`pycodestyle`] Use unicode-width to determine line-length instead of
character count by
[@&#8203;MichaReiser](https://togithub.com/MichaReiser) in
[astral-sh/ruff#3714
- \[`pydocstyle`] Implement autofix for `D403` by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#3731
- \[`pylint`] Avoid `useless-import alias` (`C0414`) in `.pyi` files by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3761
- \[`pylint`] Exempt `PLR1711` and `RET501` if non-`None` annotation by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#3705
- \[`tryceratops`] Exempt return with side effects for TRY300 by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#3780

##### Bug Fixes

- Avoid parsing `ForwardRef` contents as type references by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3698
- Avoid parsing f-strings in type annotations by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3699
- Include `with` statements in complexity calculation by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3771
- Use import alias locations for `pep8-naming` import rules by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3772
- Allow `TID252` to fix all valid module paths by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#3796
- Fix SIM118 auto-fix by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#3695
- Avoid panics for implicitly concatenated forward references by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3700
- Allow simple container literals as default values by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#3703
- Traverse over nested string type annotations by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3724
- Use `wild::args()` and add `wild` as a dependency by
[@&#8203;agriyakhetarpal](https://togithub.com/agriyakhetarpal) in
[astral-sh/ruff#3739
- Avoid overlong-line errors for lines that end with URLs by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3663
- Sort statistics by count by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#3748
- Reduce explicit clones by
[@&#8203;MichaReiser](https://togithub.com/MichaReiser) in
[astral-sh/ruff#3793
- Add flymake-ruff to docs by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3800

#### New Contributors

- [@&#8203;agriyakhetarpal](https://togithub.com/agriyakhetarpal) made
their first contribution in
[astral-sh/ruff#3739
- [@&#8203;leiserfg](https://togithub.com/leiserfg) made their first
contribution in
[astral-sh/ruff#3741
- [@&#8203;JBLDKY](https://togithub.com/JBLDKY) made their first
contribution in
[astral-sh/ruff#3743
- [@&#8203;astaric](https://togithub.com/astaric) made their first
contribution in
[astral-sh/ruff#3768

**Full Changelog**:
astral-sh/ruff@v0.0.259...v0.0.260

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

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

---

### Release Notes

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

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

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

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

#### What's Changed

##### Rules

- \[`flake8-bugbear`] Add more immutable functions for `B008` by
[@&#8203;rouge8](https://togithub.com/rouge8) in
[astral-sh/ruff#3764
- \[`flake8-bugbear`] Allow `pathlib.Path()` in `B008` by
[@&#8203;rouge8](https://togithub.com/rouge8) in
[astral-sh/ruff#3794
- \[`flake8-bugbear`] Expand the scope of useless-expression (B018) by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3455
- \[`flake8-bugbear`]: Implement rule `B031` by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#3680
- \[`flake8-gettext`] Implement `flake8-gettext` by
[@&#8203;leiserfg](https://togithub.com/leiserfg) in
[astral-sh/ruff#3785
- \[`flake8-logging-format`] Add support for `.log(level, msg)` calls in
`flake8-logging-format` by
[@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#3726
- \[`flake8-logging-format`] Allow aliased `logging` module as a logger
candidate by [@&#8203;dhruvmanila](https://togithub.com/dhruvmanila) in
[astral-sh/ruff#3718
- \[`flake8-pyi`] Add autofix for `PYI014` by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#3729
- \[`flake8-pyi`] Implement `PYI012` by
[@&#8203;JBLDKY](https://togithub.com/JBLDKY) in
[astral-sh/ruff#3743
- \[`flake8-pyi`] Implement `PYI015` by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#3728
- \[`flake8-simplify`] Fix SIM222 and SIM223 false negative by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#3740
- \[`isort`]: support submodules in known\_(first|third)\_party config
options by [@&#8203;astaric](https://togithub.com/astaric) in
[astral-sh/ruff#3768
- \[`pycodestyle`] Use unicode-width to determine line-length instead of
character count by
[@&#8203;MichaReiser](https://togithub.com/MichaReiser) in
[astral-sh/ruff#3714
- \[`pydocstyle`] Implement autofix for `D403` by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#3731
- \[`pylint`] Avoid `useless-import alias` (`C0414`) in `.pyi` files by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3761
- \[`pylint`] Exempt `PLR1711` and `RET501` if non-`None` annotation by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#3705
- \[`tryceratops`] Exempt return with side effects for TRY300 by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#3780

##### Bug Fixes

- Avoid parsing `ForwardRef` contents as type references by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3698
- Avoid parsing f-strings in type annotations by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3699
- Include `with` statements in complexity calculation by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3771
- Use import alias locations for `pep8-naming` import rules by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3772
- Allow `TID252` to fix all valid module paths by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#3796
- Fix SIM118 auto-fix by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#3695
- Avoid panics for implicitly concatenated forward references by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3700
- Allow simple container literals as default values by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#3703
- Traverse over nested string type annotations by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3724
- Use `wild::args()` and add `wild` as a dependency by
[@&#8203;agriyakhetarpal](https://togithub.com/agriyakhetarpal) in
[astral-sh/ruff#3739
- Avoid overlong-line errors for lines that end with URLs by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3663
- Sort statistics by count by
[@&#8203;JonathanPlasse](https://togithub.com/JonathanPlasse) in
[astral-sh/ruff#3748
- Reduce explicit clones by
[@&#8203;MichaReiser](https://togithub.com/MichaReiser) in
[astral-sh/ruff#3793
- Add flymake-ruff to docs by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[astral-sh/ruff#3800

#### New Contributors

- [@&#8203;agriyakhetarpal](https://togithub.com/agriyakhetarpal) made
their first contribution in
[astral-sh/ruff#3739
- [@&#8203;leiserfg](https://togithub.com/leiserfg) made their first
contribution in
[astral-sh/ruff#3741
- [@&#8203;JBLDKY](https://togithub.com/JBLDKY) made their first
contribution in
[astral-sh/ruff#3743
- [@&#8203;astaric](https://togithub.com/astaric) made their first
contribution in
[astral-sh/ruff#3768

**Full Changelog**:
astral-sh/ruff@v0.0.259...v0.0.260

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

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
bug Something isn't working rule Implementing or modifying a lint rule
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TRY300 when returning a function result
2 participants