ruff/crates/ruff_linter/resources/test
Robsdedude e36611c4d8
[flake8_pyi] Fix PYI041's fix causing TypeError with None | None | ... (#18637)
<!--
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
Fix `PYI041`'s fix turning `None | int | None | float` into `None | None
| float`, which raises a `TypeError` when executed.

The fix consists of making sure that the merged super-type is inserted
where the first type that is merged was before.

## Test Plan
Tests have been expanded with examples from the issue.

## Related Issue
Fixes https://github.com/astral-sh/ruff/issues/18298
2025-06-20 15:04:51 -04:00
..
fixtures [flake8_pyi] Fix PYI041's fix causing TypeError with None | None | ... (#18637) 2025-06-20 15:04:51 -04:00
package
project
__init__.py
disallowed_rule_names.txt