Limit PEP 604 checks to Python 3.10+ (#757)

This commit is contained in:
Charlie Marsh 2022-11-15 11:52:12 -05:00 committed by GitHub
parent 85b2a9920f
commit 374d57d822
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1059,7 +1059,7 @@ where
ExprKind::Subscript { value, slice, .. } => {
// Ex) typing.List[...]
if self.settings.enabled.contains(&CheckCode::U007)
&& self.settings.target_version >= PythonVersion::Py39
&& self.settings.target_version >= PythonVersion::Py310
{
pyupgrade::plugins::use_pep604_annotation(self, expr, value, slice);
}