The following code results in a PYI049 error even though _B is very much used:
from typing import TypedDict
class A:
class _B(TypedDict):
pass
def f(self) -> None:
print(A._B())
A().f()
$ ruff check --select=PYI test.py
test.py:5:11: PYI049 Private TypedDict `_B` is never used
Found 1 error.
$ ruff --version
ruff 0.2.1