mirror of https://github.com/astral-sh/ruff
Limit PEP 604 checks to Python 3.10+ (#757)
This commit is contained in:
parent
85b2a9920f
commit
374d57d822
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue