Closed PGijsbers closed 3 weeks ago
This pull request removes black and bandit from pre-commit hooks in favor of using ruff for both linting and formatting. It also includes various code improvements and type hint updates across multiple files.
Change | Details | Files | |
---|---|---|---|
Replace black and bandit with ruff in pre-commit configuration |
|
.pre-commit-config.yaml |
|
Update type hints and improve code quality |
|
) instead of Union[] |
src/core/conversions.py src/schemas/datasets/dcat.py src/routers/openml/datasets.py src/routers/openml/tasks.py tests/routers/openml/study_test.py tests/routers/openml/flows_test.py |
Improve code organization and imports |
|
src/schemas/datasets/mldcat_ap.py src/schemas/datasets/openml.py src/schemas/flows.py |
|
Address linter warnings and improve code quality |
|
src/database/qualities.py src/database/setup.py tests/routers/openml/migration/datasets_migration_test.py src/database/users.py src/routers/openml/tasktype.py |
No sequence diagram generated.
Nevermind. I am stupid, or tired, or both.
It's just fewer dependencies. There might be small disparities between bandit and ruff, but it seems simpler to use just one tool. (and it's faster)
Summary by Sourcery
Replace 'black' and 'bandit' with 'ruff' in pre-commit configuration to reduce dependencies and improve performance. Enhance type handling in conversion functions and simplify union type annotations. Clean up unused code and comments, and update test cases for improved readability and compliance with linting rules.
Enhancements:
Build:
Tests: