Summary
The --cfg-path Click option in numbast/src/numbast/experimental/mlir/tools/static_binding_generator.py is declared without required=True, but cfg_path is used unconditionally inside the command handler via Config.from_yaml_path(cfg_path), which opens the file without checking for None. When --cfg-path is omitted, Click passes None to this function, causing a TypeError at runtime.
The --output-dir option in the same command already uses required=True as a precedent.
Suggested fix
@click.option(
"--cfg-path",
type=click.Path(exists=True, dir_okay=False, readable=True),
required=True,
)
References
Summary
The
--cfg-pathClick option innumbast/src/numbast/experimental/mlir/tools/static_binding_generator.pyis declared withoutrequired=True, butcfg_pathis used unconditionally inside the command handler viaConfig.from_yaml_path(cfg_path), which opens the file without checking forNone. When--cfg-pathis omitted, Click passesNoneto this function, causing aTypeErrorat runtime.The
--output-diroption in the same command already usesrequired=Trueas a precedent.Suggested fix
References