ruff/crates/ruff_linter/resources/test/fixtures/flake8_logging
Hmvp 49763a7f7c
[`flake8-logging`] Avoid false positive for `exc_info=True` outside `logger.exception` (`LOG014`) (#18737)
<!--
Thank you for contributing to Ruff/ty! To help us out with reviewing,
please consider the following:

- Does this pull request include a summary of the change? (See below.)
- Does this pull request include a descriptive title? (Please prefix
with `[ty]` for ty pull
  requests.)
- Does this pull request include references to any relevant issues?
-->

## Summary

Fixes https://github.com/astral-sh/ruff/issues/18726 by also checking if
its a literal and not only that it is truthy. See also the first comment
in the issue.

It would have been nice to check for inheritance of BaseException but I
figured that is not possible yet...

## Test Plan

I added a few tests for valid input to exc_info
2025-06-20 14:43:08 -04:00
..
LOG001.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
LOG002.py Rename `ruff` crate to `ruff_linter` (#7529) 2023-09-20 08:38:27 +02:00
LOG004_0.py [`flake8-logging`] `.exception()` and `exc_info=` outside exception handlers (`LOG004`, `LOG014`) (#15799) 2025-02-04 09:52:12 +01:00
LOG004_1.py [`flake8-logging`] `.exception()` and `exc_info=` outside exception handlers (`LOG004`, `LOG014`) (#15799) 2025-02-04 09:52:12 +01:00
LOG007.py Add `Expr::Name` checks to rules which use `is_logger_candidate` (#7521) 2023-09-27 00:21:22 +00:00
LOG009.py Avoid failures due to non-deterministic binding ordering (#10478) 2024-03-19 18:01:33 +00:00
LOG014_0.py [`flake8-logging`] Avoid false positive for `exc_info=True` outside `logger.exception` (`LOG014`) (#18737) 2025-06-20 14:43:08 -04:00
LOG014_1.py [`flake8-logging`] `.exception()` and `exc_info=` outside exception handlers (`LOG004`, `LOG014`) (#15799) 2025-02-04 09:52:12 +01:00
LOG015.py [`flake8-logging`] Root logger calls (`LOG015`) (#14302) 2024-11-13 09:11:55 +00:00