def exit_with_error(msg: str, is_toml: bool = False) -> NoReturn:
    """Using mypy's argument parser, raise `SystemExit` to fail hard if validation fails.

    Considering that the plugin's startup duration is around double as long as mypy's, this aims to
    import and construct objects only when that's required - which happens once and terminates the
    run. Considering that most of the runs are successful, there's no need for this to linger in the
    global scope.
    """
    from mypy.main import CapturableArgumentParser

    handler = CapturableArgumentParser(
        prog="(django-stubs) mypy", usage=textwrap.dedent(TOML_USAGE if is_toml else INI_USAGE)
    )
    handler.error(msg)
Using mypy's argument parser, raise `SystemExit` to fail hard if validation fails.

    Considering that the plugin's startup duration is around double as long as mypy's, this aims to
    import and construct objects only when that's required - which happens once and terminates the
    run. Considering that most of the runs are successful, there's no need for this to linger in the
    global scope.
    
mypy_django_plugin/config.py