mirror of
https://github.com/astral-sh/ruff.git
synced 2025-11-02 21:03:11 +00:00
Minor code simplification (#19022)
When inside a typing only annotation, the code is always inside an annotation, too.
This commit is contained in:
parent
bedb53daec
commit
4103d73224
1 changed files with 1 additions and 3 deletions
|
|
@ -2765,9 +2765,7 @@ impl<'a> Checker<'a> {
|
||||||
|
|
||||||
self.semantic.restore(snapshot);
|
self.semantic.restore(snapshot);
|
||||||
|
|
||||||
if self.semantic.in_annotation()
|
if self.semantic.in_typing_only_annotation() {
|
||||||
&& self.semantic.in_typing_only_annotation()
|
|
||||||
{
|
|
||||||
if self.is_rule_enabled(Rule::QuotedAnnotation) {
|
if self.is_rule_enabled(Rule::QuotedAnnotation) {
|
||||||
pyupgrade::rules::quoted_annotation(self, annotation, range);
|
pyupgrade::rules::quoted_annotation(self, annotation, range);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue