ruff/crates/ruff_linter
Robsdedude 14c42a8ddf
[refurb] Mark FURB180 fix unsafe when class has bases (#18149)
<!--
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

Mark `FURB180`'s fix as unsafe if the class already has base classes.
This is because the base classes might validate the other base classes
(like `typing.Protocol` does) or otherwise alter runtime behavior if
more base classes are added.

## Test Plan

The existing snapshot test covers this case already.

## References

Partially addresses https://github.com/astral-sh/ruff/issues/13307 (left
out way to permit certain exceptions)

---------

Co-authored-by: Brent Westbrook <36778786+ntBre@users.noreply.github.com>
Co-authored-by: Brent Westbrook <brentrwestbrook@gmail.com>
2025-06-03 00:51:09 +00:00
..
resources [fastapi] Avoid false positive for class dependencies (FAST003) (#18271) 2025-06-02 14:34:50 -04:00
src [refurb] Mark FURB180 fix unsafe when class has bases (#18149) 2025-06-03 00:51:09 +00:00
Cargo.toml Bump 0.11.12 (#18369) 2025-05-29 09:17:12 -04:00