(self)
| 143 | raise DecodingError(str(exc)) from exc |
| 144 | |
| 145 | def flush(self) -> bytes: |
| 146 | if not self.seen_data: |
| 147 | return b"" |
| 148 | try: |
| 149 | if hasattr(self.decompressor, "finish"): |
| 150 | # Only available in the 'brotlicffi' package. |
| 151 | |
| 152 | # As the decompressor decompresses eagerly, this |
| 153 | # will never actually emit any data. However, it will potentially throw |
| 154 | # errors if a truncated or damaged data stream has been used. |
| 155 | self.decompressor.finish() # pragma: no cover |
| 156 | return b"" |
| 157 | except brotli.error as exc: # pragma: no cover |
| 158 | raise DecodingError(str(exc)) from exc |
| 159 | |
| 160 | |
| 161 | class ZStandardDecoder(ContentDecoder): |
nothing calls this directly
no test coverage detected