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

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

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