diff options
author | Abseil Team <absl-team@google.com> | 2021-03-01 09:15:54 -0800 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2021-03-01 09:16:20 -0800 |
commit | 28b57668dbc08573e36c77d4066414d9440cd571 (patch) | |
tree | 1621a8c3bcd845b938aafd756af3e250245440fa /absl | |
parent | 8ae8e19e5da94af8ac44ab73b6132795f69e4a82 (diff) | |
download | absl-py-28b57668dbc08573e36c77d4066414d9440cd571.tar.gz |
Move type comment for `enter_context` to before docstring
Otherwise, typed_ast will consider it misplaced and fail to parse the module
PiperOrigin-RevId: 360204546
Change-Id: Ic15ac1173f101c2eb06b078d471d820b16f3bf2b
Diffstat (limited to 'absl')
-rw-r--r-- | absl/testing/absltest.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/absl/testing/absltest.py b/absl/testing/absltest.py index 979f71d..22041db 100644 --- a/absl/testing/absltest.py +++ b/absl/testing/absltest.py @@ -696,6 +696,7 @@ class TestCase(unittest3_backport.TestCase): return tf def enter_context(self, manager): + # type: (ContextManager[_T]) -> _T """Returns the CM's value after registering it with the exit stack. Entering a context pushes it onto a stack of contexts. The context is exited @@ -714,7 +715,6 @@ class TestCase(unittest3_backport.TestCase): Args: manager: The context manager to enter. """ - # type: (ContextManager[_T]) -> _T if not self._exit_stack: raise AssertionError( 'self._exit_stack is not set: enter_context is Py3-only; also make ' |