You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Needed this to locate the ansys.jinja2 file for reuse annotate command
pre-commit try-repo ../ add-license-headers
in pyproject.toml:
dependencies = [
"importlib-metadata >=4.0",
"reuse",
]
This will show an error:
File "C:\Users\kmcadams\AppData\Local\Temp\tmp55ouq1ke\repoh5j406uu\py_env-python3.11\Lib\site-packages\ansys\pre_commit_hooks\add_license_headers.py", line 60, in get_files
output = lint.lint_files_without_copyright_and_licensing(report, tmp)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'reuse.lint' has no attribute 'lint_files_without_copyright_and_licensing'
🔍 Before submitting the issue
🐞 Description of the bug
Current usage of lint is not compliant with reuse 2.X, so it's being blocked in the dependencies currently. We should update to reuse 2.x if possible
📝 Steps to reproduce
in pre-commit-hooks repository,
mkdir test-pre-commit-hooks
cd test-pre-commit-hooks
git init
pre-commit sample-config > .pre-commit-config.yaml
git add .pre-commit-config.yaml
git commit -m "add pre-commit configuration"
echo "# test" > test.py
mkdir src
mv test.py src
git add src/test.py
cp -r ../.reuse ./
pre-commit try-repo ../ add-license-headers
in pyproject.toml:
dependencies = [
"importlib-metadata >=4.0",
"reuse",
]
This will show an error:
File "C:\Users\kmcadams\AppData\Local\Temp\tmp55ouq1ke\repoh5j406uu\py_env-python3.11\Lib\site-packages\ansys\pre_commit_hooks\add_license_headers.py", line 60, in get_files
output = lint.lint_files_without_copyright_and_licensing(report, tmp)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'reuse.lint' has no attribute 'lint_files_without_copyright_and_licensing'
💻 Which operating system are you using?
Windows
📀 Which ANSYS version are you using?
No response
🐍 Which Python version are you using?
3.11
📦 Installed packages
The text was updated successfully, but these errors were encountered: