It contains some utility Prospector profiles.
pip install prospector-profile-utilsThen, in your .prospector.yaml file, you can use the profiles like this:
inherits:
- utils:base
- utils:c2cwsgiutils
- utils:no-design-checksIt provide also an alternate base witch activate less strict checks:
inherits:
- utils:base-less-strictAdditional available profiles:
utils:fix: Disables specific rules that are known to have reliability issues.utils:autofix: Enables automatic fixing capabilities for supported rules.utils:tests: Specifically designed for test files validation, recommended to use in combination with theutils:fixorutils:pre-commitprofiles.utils:pre-commit: Specifically designed for pre-commit hooks.
I use the utils:tests and utils:pre-commit profiles with the following precommit configuration to have the ruff checks with auto-fix on all the files with a specific profile for the tests.
repos:
- repo: https://github.com/PyCQA/prospector
rev: v<rev>
hooks:
- id: prospector
args:
- --die-on-tool-error
- --output-format=pylint
- --profile=utils:pre-commit
- --profile=.prospector.yaml
additional_dependencies:
- prospector-profile-duplicated==<rev> # pypi
- prospector-profile-utils==<rev> # pypi
- id: prospector
args:
- --die-on-tool-error
- --output-format=pylint
- --profile=utils:pre-commit
- --profile=utils:tests
additional_dependencies:
- prospector-profile-utils==<rev> # pypiInstall the pre-commit hooks:
pip install pre-commit
pre-commit install --allow-missing-config