Bug Report: Pre-commit Hook Interference with requirements.txt
Describe the bug
The pre-commit hook is currently causing issues with the requirements.txt file. Specifically, it seems to be modifying or overwriting the file in a way that is inconsistent with the project's dependencies and desired configuration. This behavior is disrupting the build process and introducing errors.
To Reproduce
- Commit changes: Make any changes to the project codebase and stage them for commit.
- Run pre-commit: Execute the pre-commit hook to validate the changes before committing.
- Inspect requirements.txt: Examine the
requirements.txtfile. - Observe discrepancies: Notice that the file's contents have been altered or that there are errors related to missing or incorrect dependencies.
Expected behavior
The pre-commit hook should validate code quality and formatting without interfering with the project's dependency management. It should not modify the requirements.txt file unless explicitly configured to do so for specific purposes.
Additional context
- Pre-commit hook configuration: Please provide details about the pre-commit hook's configuration, including any custom rules or plugins being used.
- Error messages: If applicable, share any error messages or warnings that appear during the pre-commit process or when attempting to build the project after the hook runs.
- Desired behavior: Clearly articulate how you expect the pre-commit hook to behave with respect to the
requirements.txtfile. Should it ignore the file entirely, perform specific validations, or be configured to update it based on certain criteria?
By providing this information, we can better understand the root cause of the issue and work towards a solution that ensures the pre-commit hook functions as intended without disrupting the project's dependency management.