This commit addresses multiple code quality issues identified by pre-commit
hooks and establishes a comprehensive pre-commit configuration for the
watcher-dashboard project.
Key changes:
- Add .pre-commit-config.yaml with comprehensive linting rules
- Fix ruff F405 errors in test/settings.py by explicit imports
- Correct spelling errors found by codespell (Descrition->Description,
Succeeeded->Succeeded)
- Fix doc8 line length violations in documentation files
- Add nosec comments for legitimate subprocess usage in tools/
- Add nosec comments for mark_safe usage (content is sanitized)
- Update bandit config to skip B703,B308 tests for safe mark_safe usage
The pre-commit configuration includes:
- Whitespace and formatting checks
- Python AST validation
- OpenStack hacking style checks
- Security scanning with bandit
- Code quality with ruff and autopep8
- Spell checking with codespell
- Documentation linting with sphinx-lint and doc8
All pre-commit hooks now pass successfully, ensuring consistent code
quality and preventing bad programming practices from being committed.
Assisted-By: cursor auto model
Change-Id: I3927de29a0059390cc625ec2ee9ad87ba001e85b
Signed-off-by: Sean Mooney <work@seanmooney.info>