---
source: crates/ruff_linter/src/rules/flake8_pyi/mod.rs
---
PYI019 [*] Use `Self` instead of custom TypeVar `S`
 --> PYI019_1.pyi:4:10
  |
3 | class F:
4 |     def m[S](self: S) -> S: ...
  |          ^^^^^^^^^^^^^^^^^
  |
help: Replace TypeVar `S` with `Self`
  |
3 | class F:
  -     def m[S](self: S) -> S: ...
4 +     def m(self) -> typing.Self: ...
  |
