cmake-format-precommit
cmake-format-precommit copied to clipboard
Missing dependency to `PyYAML`
trafficstars
Some commands seem to require it, i.e. https://github.com/cheshirekow/cmake_format/blob/eff5df1f41c665ea7cac799396042e4f406ef09a/cmakelang/format/main.py#L208-L220
These should be included in this precommit package
Yeah, I am facing this issue as well:
File "/Users/gegles/.cache/pre-commit/repoqbs4vry3/py_env-python3.11/lib/python3.11/site-packages/cmakelang/format/__main__.py", line 359, in get_config
return get_configdict(configfile_paths)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/gegles/.cache/pre-commit/repoqbs4vry3/py_env-python3.11/lib/python3.11/site-packages/cmakelang/format/__main__.py", line 312, in get_configdict
increment_dict = get_one_config_dict(configfile_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/gegles/.cache/pre-commit/repoqbs4vry3/py_env-python3.11/lib/python3.11/site-packages/cmakelang/format/__main__.py", line 287, in get_one_config_dict
return load_yaml(config_file)
^^^^^^^^^^^^^^^^^^^^^^
File "/Users/gegles/.cache/pre-commit/repoqbs4vry3/py_env-python3.11/lib/python3.11/site-packages/cmakelang/format/__main__.py", line 212, in load_yaml
import yaml
ModuleNotFoundError: No module named 'yaml'
@LecrisUT, is there a workaround?
You can add it to additional_dependencies or fork this, add dependencies/install_requires in setup.py make a PR and link to that in the meantime
Scrap the latter: https://github.com/cheshirekow/cmake-format-precommit/pull/4. Just link to that fork will be ok