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):