Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions pyflakes/checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Loading