---
source: crates/ruff_linter/src/rules/flake8_pyi/mod.rs
---
PYI024.pyi:3:9: PYI024 Use `typing.NamedTuple` instead of `collections.namedtuple`
  |
1 | import collections
2 |
3 | person: collections.namedtuple  # Y024 Use "typing.NamedTuple" instead of "collections.namedtuple"
  |         ^^^^^^^^^^^^^^^^^^^^^^ PYI024
4 |
5 | from collections import namedtuple
  |
  = help: Replace with `typing.NamedTuple`

PYI024.pyi:7:9: PYI024 Use `typing.NamedTuple` instead of `collections.namedtuple`
  |
5 | from collections import namedtuple
6 |
7 | person: namedtuple  # Y024 Use "typing.NamedTuple" instead of "collections.namedtuple"
  |         ^^^^^^^^^^ PYI024
8 |
9 | person = namedtuple(
  |
  = help: Replace with `typing.NamedTuple`

PYI024.pyi:9:10: PYI024 Use `typing.NamedTuple` instead of `collections.namedtuple`
   |
 7 | person: namedtuple  # Y024 Use "typing.NamedTuple" instead of "collections.namedtuple"
 8 |
 9 | person = namedtuple(
   |          ^^^^^^^^^^ PYI024
10 |     "Person", ["name", "age"]
11 | )  # Y024 Use "typing.NamedTuple" instead of "collections.namedtuple"
   |
   = help: Replace with `typing.NamedTuple`
