From ed5c7f972b61e8f01ea54a8b9bfd631fe115a01d Mon Sep 17 00:00:00 2001 From: anthony sottile Date: Thu, 8 Oct 2026 18:19:07 -0400 Subject: [PATCH] simplify annotationsFutureEnabled --- pyflakes/checker.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pyflakes/checker.py b/pyflakes/checker.py index f8eef751..02bb30cd 100644 --- a/pyflakes/checker.py +++ b/pyflakes/checker.py @@ -794,9 +794,7 @@ def futuresAllowed(self, value): @property def annotationsFutureEnabled(self): scope = self.scopeStack[0] - if not isinstance(scope, ModuleScope): - return False - return scope._annotations_future_enabled + return isinstance(scope, ModuleScope) and scope._annotations_future_enabled @annotationsFutureEnabled.setter def annotationsFutureEnabled(self, value):