-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[flake8-logging] Stabilize exc-info-outside-except-handler (LOG014)
#18517
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
Conversation
|
| code | total | + violation | - violation | + fix | - fix |
|---|---|---|---|---|---|
| LOG014 | 16 | 16 | 0 | 0 | 0 |
| RUF100 | 1 | 0 | 1 | 0 | 0 |
Linter (preview)
✅ ecosystem check detected no linter changes.
|
I'm kind of on the fence about the ecosystem results. Some of them seem like true positives, like the zulip case, but many of the others are in functions annotated with some kind of |
9252447 to
829acf4
Compare
59c579a to
85e7b5f
Compare
|
I think stabilizing this is in line with other rules we've stabilized, and 16 ecosystem hits is not much overall. LOG004 and LOG014 are the only 2/7 LOG rules in preview still. I gave LOG004 a |
dylwil3
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's okay to stabilize this for the reasons you give. Codebases with lots of custom exception handlers may choose not to enable the rule at all if it's noisy - it seems relatively niche to me.
flake8-loggin] Stabilize exc-info-outside-except-handler (LOG014)
flake8-loggin] Stabilize exc-info-outside-except-handler (LOG014)flake8-logging] Stabilize exc-info-outside-except-handler (LOG014)
…14`) (#18517) ## Summary - Stabilizes LOG014 (exc-info-outside-except-handler) rule by changing it from Preview to Stable ## Test plan - ✅ Rule is already tested in main test function, no migration needed - ✅ `make check` passes - ✅ `make test` passes ## Rule Documentation - [Test file](https://github.com/astral-sh/ruff/blob/main/crates/ruff_linter/src/rules/flake8_logging/mod.rs#L22-L23) - [Rule documentation](https://docs.astral.sh/ruff/rules/exc-info-outside-except-handler/)
…14`) (#18517) ## Summary - Stabilizes LOG014 (exc-info-outside-except-handler) rule by changing it from Preview to Stable ## Test plan - ✅ Rule is already tested in main test function, no migration needed - ✅ `make check` passes - ✅ `make test` passes ## Rule Documentation - [Test file](https://github.com/astral-sh/ruff/blob/main/crates/ruff_linter/src/rules/flake8_logging/mod.rs#L22-L23) - [Rule documentation](https://docs.astral.sh/ruff/rules/exc-info-outside-except-handler/)
…14`) (#18517) ## Summary - Stabilizes LOG014 (exc-info-outside-except-handler) rule by changing it from Preview to Stable ## Test plan - ✅ Rule is already tested in main test function, no migration needed - ✅ `make check` passes - ✅ `make test` passes ## Rule Documentation - [Test file](https://github.com/astral-sh/ruff/blob/main/crates/ruff_linter/src/rules/flake8_logging/mod.rs#L22-L23) - [Rule documentation](https://docs.astral.sh/ruff/rules/exc-info-outside-except-handler/)
…14`) (#18517) ## Summary - Stabilizes LOG014 (exc-info-outside-except-handler) rule by changing it from Preview to Stable ## Test plan - ✅ Rule is already tested in main test function, no migration needed - ✅ `make check` passes - ✅ `make test` passes ## Rule Documentation - [Test file](https://github.com/astral-sh/ruff/blob/main/crates/ruff_linter/src/rules/flake8_logging/mod.rs#L22-L23) - [Rule documentation](https://docs.astral.sh/ruff/rules/exc-info-outside-except-handler/)
…14`) (#18517) ## Summary - Stabilizes LOG014 (exc-info-outside-except-handler) rule by changing it from Preview to Stable ## Test plan - ✅ Rule is already tested in main test function, no migration needed - ✅ `make check` passes - ✅ `make test` passes ## Rule Documentation - [Test file](https://github.com/astral-sh/ruff/blob/main/crates/ruff_linter/src/rules/flake8_logging/mod.rs#L22-L23) - [Rule documentation](https://docs.astral.sh/ruff/rules/exc-info-outside-except-handler/)
…14`) (#18517) ## Summary - Stabilizes LOG014 (exc-info-outside-except-handler) rule by changing it from Preview to Stable ## Test plan - ✅ Rule is already tested in main test function, no migration needed - ✅ `make check` passes - ✅ `make test` passes ## Rule Documentation - [Test file](https://github.com/astral-sh/ruff/blob/main/crates/ruff_linter/src/rules/flake8_logging/mod.rs#L22-L23) - [Rule documentation](https://docs.astral.sh/ruff/rules/exc-info-outside-except-handler/)
…14`) (#18517) ## Summary - Stabilizes LOG014 (exc-info-outside-except-handler) rule by changing it from Preview to Stable ## Test plan - ✅ Rule is already tested in main test function, no migration needed - ✅ `make check` passes - ✅ `make test` passes ## Rule Documentation - [Test file](https://github.com/astral-sh/ruff/blob/main/crates/ruff_linter/src/rules/flake8_logging/mod.rs#L22-L23) - [Rule documentation](https://docs.astral.sh/ruff/rules/exc-info-outside-except-handler/)
…ence * main: (71 commits) Bump 0.12.0 (astral-sh#18724) Revert "[ty] Offer "Did you mean...?" suggestions for unresolved `from` imports and unresolved attributes (astral-sh#18705)" (astral-sh#18721) [`flake8-return`] Stabilize only add `return None` at the end when fixing `implicit-return` (`RET503`) (astral-sh#18516) [`pyupgrade`] Stabilize `non-pep695-generic-function` (`UP047`) (astral-sh#18524) [`pyupgrade`] Stabilize `non-pep695-generic-class` (`UP046`) (astral-sh#18519) [`pandas-vet`] Deprecate `pandas-df-variable-name` (`PD901`) (astral-sh#18618) [`flake8-bandit`] Remove `suspicious-xmle-tree-usage` (`S320`) (astral-sh#18617) Stabilize `dataclass-enum` (`RUF049`) (astral-sh#18570) Stabilize `unnecessary-dict-index-lookup` (`PLR1733`) (astral-sh#18571) Remove rust-toolchain.toml from sdist (astral-sh#17925) Stabilize `starmap-zip` (`RUF058`) (astral-sh#18525) [`flake8-logging`] Stabilize `exc-info-outside-except-handler` (`LOG014`) (astral-sh#18517) [`pyupgrade`] Stabilize `non-pep604-annotation-optional` (`UP045`) and preview behavior for `non-pep604-annotation-union` (`UP007`) (astral-sh#18505) Stabilize `pytest-warns-too-broad` (`PT030`) (astral-sh#18568) Stabilize `for-loop-writes` (`FURB122`) (astral-sh#18565) Stabilize `pytest-warns-with-multiple-statements` (`PT031`) (astral-sh#18569) Stabilize `pytest-parameter-with-default-argument` (`PT028`) (astral-sh#18566) Stabilize `nan-comparison` (`PLW0177`) (astral-sh#18559) Stabilize `check-and-remove-from-set` (`FURB132`) (astral-sh#18560) Stabilize `unnecessary-round` (`RUF057`) (astral-sh#18563) ...
Summary
Test plan
make checkpassesmake testpassesRule Documentation