Derived from the pyupgrade linter.
Fix is sometimes available.
What it does#
NamedTuple declarations that use functional syntax.
Why is this bad?#
NamedTuple subclasses can be defined either through a functional syntax
Foo = NamedTuple(...)) or a class syntax (
class Foo(NamedTuple): ...).
The class syntax is more readable and generally preferred over the
functional syntax, which exists primarily for backwards compatibility