Respect logged and re-raised expressions in nested statements#11301
Merged
charliermarsh merged 1 commit intomainfrom May 6, 2024
Merged
Respect logged and re-raised expressions in nested statements#11301charliermarsh merged 1 commit intomainfrom
charliermarsh merged 1 commit intomainfrom
Conversation
Contributor
|
| code | total | + violation | - violation | + fix | - fix |
|---|---|---|---|---|---|
| BLE001 | 15 | 0 | 15 | 0 | 0 |
Linter (preview)
ℹ️ ecosystem check detected linter changes. (+0 -15 violations, +0 -0 fixes in 3 projects; 41 projects unchanged)
apache/airflow (+0 -9 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview --select ALL
- airflow/cli/cli_parser.py:78:8: BLE001 Do not catch blind exception: `Exception` - airflow/cli/commands/task_command.py:691:12: BLE001 Do not catch blind exception: `Exception` - airflow/providers/amazon/aws/log/s3_task_handler.py:193:20: BLE001 Do not catch blind exception: `Exception` - airflow/providers/google/cloud/hooks/datafusion.py:578:24: BLE001 Do not catch blind exception: `Exception` - airflow/providers/weaviate/hooks/weaviate.py:240:20: BLE001 Do not catch blind exception: `Exception` - airflow/sensors/base.py:289:20: BLE001 Do not catch blind exception: `Exception` - airflow/utils/log/file_task_handler.py:576:16: BLE001 Do not catch blind exception: `Exception` - tests/cli/commands/_common_cli_classes.py:102:20: BLE001 Do not catch blind exception: `Exception` - tests/sensors/test_external_task_sensor.py:531:16: BLE001 Do not catch blind exception: `Exception`
bokeh/bokeh (+0 -3 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview --select ALL
- src/bokeh/application/handlers/function.py:141:16: BLE001 Do not catch blind exception: `Exception` - src/bokeh/command/bootstrap.py:110:12: BLE001 Do not catch blind exception: `Exception` - tests/support/util/filesystem.py:67:16: BLE001 Do not catch blind exception: `Exception`
zulip/zulip (+0 -3 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview --select ALL
- corporate/lib/stripe.py:1199:16: BLE001 Do not catch blind exception: `Exception` - zerver/actions/scheduled_messages.py:385:16: BLE001 Do not catch blind exception: `Exception` - zerver/tornado/handlers.py:80:12: BLE001 Do not catch blind exception: `Exception`
Changes by rule (1 rules affected)
| code | total | + violation | - violation | + fix | - fix |
|---|---|---|---|---|---|
| BLE001 | 15 | 0 | 15 | 0 | 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Historically, we only ignored
flake8-blind-exceptif you re-raised or logged the exception as a direct child statement; but it could be nested somewhere. This was just a known limitation at the time of adding the previous logic.Closes #11289.