Request: Unsafe fix for non-self-return-type
/PYI034
#14184
Labels
fixes
Related to suggested fixes for violations
non-self-return-type
/PYI034
#14184
https://docs.astral.sh/ruff/rules/non-self-return-type/
Very similar to #14183
I feel like logically a fix for this rule should be feasible without too much complexity? (at least in pyi files and maybe py files above 3.10, see #9761). The fix should be unsafe as there might be a specific intent, or a stub shows that the runtime returns an instance not actually based on
self/cls
. Marking it unsafe may also simplify the logic to apply the fix (ifSelf
already exists in scope).Maybe it can be restricted to where the return type to replace is the same as the class and not overloaded ?
The text was updated successfully, but these errors were encountered: