mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-03 18:28:24 +00:00
![]() ## Summary Closes https://github.com/astral-sh/ty/issues/502. In the following example: ```py class Foo: x: int def method(self): y = x ``` The user may intended to use `y = self.x` in `method`. This is now added as a subdiagnostic in the following form : `info: An attribute with the same name as 'x' is defined, consider using 'self.x'` ## Test Plan Added mdtest with snapshot diagnostics. |
||
---|---|---|
.. | ||
resources | ||
src | ||
tests | ||
build.rs | ||
Cargo.toml | ||
mdtest.py | ||
mdtest.py.lock |