Build a key representing the settings used to initialize a console. This key includes the file identity, global settings (ALLOW_STYLE, application theme), and any other settings passed in via kwargs. :param file: file stream being checked :param kwargs: other consol
(
*,
file: IO[str] | None,
**kwargs: Any,
)
| 431 | |
| 432 | @staticmethod |
| 433 | def _build_config_key( |
| 434 | *, |
| 435 | file: IO[str] | None, |
| 436 | **kwargs: Any, |
| 437 | ) -> tuple[Any, ...]: |
| 438 | """Build a key representing the settings used to initialize a console. |
| 439 | |
| 440 | This key includes the file identity, global settings (ALLOW_STYLE, application theme), |
| 441 | and any other settings passed in via kwargs. |
| 442 | |
| 443 | :param file: file stream being checked |
| 444 | :param kwargs: other console settings |
| 445 | """ |
| 446 | return ( |
| 447 | id(file), |
| 448 | ALLOW_STYLE, |
| 449 | id(get_theme()), |
| 450 | tuple(sorted(kwargs.items())), |
| 451 | ) |
| 452 | |
| 453 | def matches_config( |
| 454 | self, |
no test coverage detected