Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing dependency to PyYAML #6

Open
LecrisUT opened this issue Jan 26, 2023 · 4 comments
Open

Missing dependency to PyYAML #6

LecrisUT opened this issue Jan 26, 2023 · 4 comments

Comments

@LecrisUT
Copy link

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

@gegles
Copy link

gegles commented Jan 23, 2024

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'

@gegles
Copy link

gegles commented Jan 23, 2024

@LecrisUT, is there a workaround?

@LecrisUT
Copy link
Author

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

@LecrisUT
Copy link
Author

Scrap the latter: #4. Just link to that fork will be ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants