check-model-has-description
raises IsADirectoryError
intermittently
#221
Labels
bug
Something isn't working
Describe the bug
When running the pre-commit hook
check-model-has-description
with non-standard directory and target locations (greybox_conversion/transform
andgreybox_conversion/.meltano
) errors out with aIsADirectoryError
because it somehow picks up the target location for a source of YAML files, and then it's surprised when the target directory YAML file actually is a directory that contains the SQL for the tests defined in the project directory YAML file.To Reproduce
Steps to reproduce the behavior:
meltano_pipeline/transform
meltano_pipeline/.meltano
viaDBT_TARGET_PATH
models/base/model.sql
withmodels/base/model.yml
file that contains at least one model testpre-commit
Expected behavior
This hook should only check against YAML files in the project directory.
Version:
v2.0.1
Additional context
Here's what the traceback looks like - most other hooks don't have this problem:
I tested whether including an
exclude: ^meltano_pipeline/.meltano/.*
would do anything, since my reading of the related hook suggested it might, but either I'm using an incorrect format or it doesn't work.The text was updated successfully, but these errors were encountered: