-
-
Notifications
You must be signed in to change notification settings - Fork 273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adopt "future" behavior of statement()
and frame()
#2221
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One nit, rest looks good! Thanks for doing this!
@@ -388,23 +388,9 @@ def statement(self, *, future: Literal[True]) -> NoReturn: | |||
def statement(self, *, future: Literal[None, True] = None) -> Module | NoReturn: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def statement(self, *, future: Literal[None, True] = None) -> Module | NoReturn: | |
def statement(self, *, future: Literal[None, True] = None) -> NoReturn: |
@@ -541,19 +541,19 @@ def _test(self, value: Any) -> None: | |||
self.assertIs(node.value, value) | |||
self.assertTrue(node._proxied.parent) | |||
self.assertEqual(node._proxied.root().name, value.__class__.__module__) | |||
with self.assertRaises(AttributeError): | |||
with self.assertRaises(StatementMissing): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Smart re-use of the test!
Type of Changes
Description
As promised, adopt the "future" behavior of
statement()
andframe()
.Refs #1217