diff options
author | Abseil Team <absl-team@google.com> | 2022-06-13 17:19:29 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2022-06-13 17:19:54 -0700 |
commit | fea82554c370d78e9c9eb63e0d8cc85cac30ff15 (patch) | |
tree | 342a6fd16d5a42ddf845b8ec6267fb10131e61dd /absl | |
parent | a7fd67f4448d89d9b92cfe6a2f57ac81107cc67d (diff) | |
download | absl-py-fea82554c370d78e9c9eb63e0d8cc85cac30ff15.tar.gz |
Use type annotations instead of type comments for this method.
PiperOrigin-RevId: 454734291
Change-Id: I043f77b129a411a9f517b37800df3ea729cb7a59
Diffstat (limited to 'absl')
-rw-r--r-- | absl/testing/absltest.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/absl/testing/absltest.py b/absl/testing/absltest.py index f2939e3..d3cf95a 100644 --- a/absl/testing/absltest.py +++ b/absl/testing/absltest.py @@ -531,8 +531,9 @@ class _TempFile(object): # Literal to express more precise return types. The contained type is # currently `Any` to avoid [bad-return-type] errors in the open_* methods. @contextlib.contextmanager - def _open(self, mode, encoding='utf8', errors='strict'): - # type: (Text, Text, Text) -> Iterator[Any] + def _open( + self, mode: str, encoding: str = 'utf8', errors: str = 'strict' + ) -> Iterator[Any]: with io.open( self.full_path, mode=mode, encoding=encoding, errors=errors) as fp: yield fp |