| 184 | |
| 185 | |
| 186 | class EncodedFile(io.TextIOWrapper): |
| 187 | __slots__ = () |
| 188 | |
| 189 | @property |
| 190 | def name(self) -> str: |
| 191 | # Ensure that file.name is a string. Workaround for a Python bug |
| 192 | # fixed in >=3.7.4: https://bugs.python.org/issue36015 |
| 193 | return repr(self.buffer) |
| 194 | |
| 195 | @property |
| 196 | def mode(self) -> str: |
| 197 | # TextIOWrapper doesn't expose a mode, but at least some of our |
| 198 | # tests check it. |
| 199 | assert hasattr(self.buffer, "mode") |
| 200 | return cast(str, self.buffer.mode.replace("b", "")) |
| 201 | |
| 202 | |
| 203 | class CaptureIO(io.TextIOWrapper): |
no outgoing calls
no test coverage detected
searching dependent graphs…