List of keywords searched:
Code example:
import typing as t
if t.TYPE_CHECKING:
from typing_extensions import Self
class Foo:
def __init__(self, x: int) -> None:
self.x = x
def __iadd__(self, other: "Self") -> "Self":
"""Adds two Foo objects together."""
self.x += other.x
return self
Command: ruff check file.py --isolated --select=PYI034
Ruff Version: 0.5.7
I'd be happy to try and fix this as I have some Rust experience. Please let me know if I can be of help.