Called in the EnvironBuilder to add files from the data dict.
(
self,
key: str,
value: (t.IO[bytes] | tuple[t.IO[bytes], str] | tuple[t.IO[bytes], str, str]),
)
| 427 | return cls(**out) |
| 428 | |
| 429 | def _add_file_from_data( |
| 430 | self, |
| 431 | key: str, |
| 432 | value: (t.IO[bytes] | tuple[t.IO[bytes], str] | tuple[t.IO[bytes], str, str]), |
| 433 | ) -> None: |
| 434 | """Called in the EnvironBuilder to add files from the data dict.""" |
| 435 | if isinstance(value, tuple): |
| 436 | self.files.add_file(key, *value) |
| 437 | else: |
| 438 | self.files.add_file(key, value) |
| 439 | |
| 440 | @staticmethod |
| 441 | def _make_base_url(scheme: str, host: str, script_root: str) -> str: |