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

Have to run add-license-headers twice for empty file #114

Closed
2 tasks done
klmcadams opened this issue Jan 11, 2024 · 1 comment
Closed
2 tasks done

Have to run add-license-headers twice for empty file #114

klmcadams opened this issue Jan 11, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@klmcadams
Copy link
Contributor

🔍 Before submitting the issue

  • I have searched among the existing issues
  • I am using a Python virtual environment

🐞 Description of the bug

Empty init.py file is only adding the copyright line on the first run, and the license is added on the second run of the hook

📝 Steps to reproduce

in pydynamicreporting, do pre-commit run --all-files and look at tests/init.py's behavior. It must be something with how I'm gathering the data (lint_json) for all of the files where it's not registering it as a file missing a header

💻 Which operating system are you using?

Windows

📀 Which ANSYS version are you using?

No response

🐍 Which Python version are you using?

3.10

📦 Installed packages

N/A
@klmcadams klmcadams added the bug Something isn't working label Jan 11, 2024
@klmcadams klmcadams changed the title Have to run hook twice for empty file Have to run add-license-headers twice for empty file Jan 11, 2024
@klmcadams
Copy link
Contributor Author

Closed by #116

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant