Skip to content

fail to manage error when missing variable in kicker

The code below don't pass the hash_ctx parameter so the program fail

    # remaining inputs are unmapped inputs
    for input_name in inputs:
        yield Issue(
            Check.input_must_be_mapped_to_var,
            f"Input '{input_name}': is not mapped to any Kicker's variable",
            getattr(input_name, "__pos__", None),
        )

exception:

 File "tbc_check/checker.py", line 1112, in _check_tpl
    yield Issue(
          ~~~~~^
        Check.input_must_be_mapped_to_var,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        f"Input '{input_name}': is not mapped to any Kicker's variable",
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        getattr(input_name, "__pos__", None),
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
TypeError: Issue.__init__() missing 1 required positional argument: 'hash_ctx'