-
Notifications
You must be signed in to change notification settings - Fork 11
Pre commit linting
Eric Ford edited this page Nov 30, 2021
·
2 revisions
dbt-firebolt requires linting be done before commits can be merged. This linting involves:
- Check for merge conflicts
- setup-cfg-fmt to check .cfg file
- autoflake to remove unused imports
- isort to correctly order imports
- black
- flake8
All of these checks can be run locally by installing isort>=5.10 flake8>=4.0 black>=21.10 pre-commit==2.15.0
Support for running mypy and Pydantic is coming.
Specific setting can be found in setup.cfg, but the current dbt-firebolt specs are as follows:
- isort uses default settings
- Flake8, per Black suggestions:
- Ignores E203, dealing with
:
in list slices. - Ignores W503, which deals with operator alignment.
- Ignores F401—ignore unused imports—on
__init__.py
files. - Sets line length = 88.
- Ignores E203, dealing with
- Black: prefer single quotes