MCPcopy Index your code
hub / github.com/python-cmd2/cmd2 / matches_config

Method matches_config

cmd2/rich_utils.py:453–465  ·  view source on GitHub ↗

Check if this console instance was initialized with the specified settings. :param file: file stream being checked :param kwargs: other console settings being checked :return: True if the settings match this console's configuration

(
        self,
        *,
        file: IO[str] | None,
        **kwargs: Any,
    )

Source from the content-addressed store, hash-verified

451 )
452
453 def matches_config(
454 self,
455 *,
456 file: IO[str] | None,
457 **kwargs: Any,
458 ) -> bool:
459 """Check if this console instance was initialized with the specified settings.
460
461 :param file: file stream being checked
462 :param kwargs: other console settings being checked
463 :return: True if the settings match this console's configuration
464 """
465 return self._config_key == self._build_config_key(file=file, **kwargs)
466
467 def on_broken_pipe(self) -> None:
468 """Override which raises BrokenPipeError instead of SystemExit."""

Callers 1

Calls 1

_build_config_keyMethod · 0.95

Tested by

no test coverage detected