quoted-annotation (UP037)#
Derived from the pyupgrade linter.
Fix is always available.
What it does#
Checks for the presence of unnecessary quotes in type annotations.
Why is this bad?#
In Python, type annotations can be quoted to avoid forward references.
However, if from __future__ import annotations
is present, Python
will always evaluate type annotations in a deferred manner, making
the quotes unnecessary.
Example#
Use instead: