-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add pre-commit hook for McCabe max complexity check and fix errors (#629
) Reduce Cosmos code complexity from 18 to 10, automating checks as part of the CI. ```shell ❯ pre-commit run flake8 --all-files flake8...................................................................Failed - hook id: flake8 - exit code: 1 cosmos/dbt/graph.py:134:5: C901 'DbtGraph.load_via_dbt_ls' is too complex (16) cosmos/dbt/parser/project.py:136:5: C901 'DbtModel.__post_init__' is too complex (18) cosmos/dbt/parser/project.py:346:5: C901 'LegacyDbtProject._handle_config_file' is too complex (15) cosmos/dbt/selector.py:87:1: C901 'select_nodes_ids_by_intersection' is too complex (16) ``` Closes: #525
- Loading branch information
Showing
6 changed files
with
361 additions
and
234 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.