Skip to content

Commit

Permalink
ci: Fix pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
gmuloc committed Oct 29, 2024
1 parent f16e258 commit 4ed8924
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,13 @@ repos:
- id: examples-test
name: Generate examples/tests.yaml
entry: >-
docs/scripts/generate_examples_tests.py
language: system
sh -c "docs/scripts/generate_examples_tests.py"
language: python
types: [python]
files: anta/
verbose: true
pass_filenames: false
additional_dependencies:
- anta[cli]
# TODO: next can go once we have it added to anta properly
- numpydoc
4 changes: 4 additions & 0 deletions docs/scripts/generate_examples_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
import os
from contextlib import redirect_stdout
from pathlib import Path
from sys import path

# Override global path to load pyavd from pwd instead of any installed version.
path.insert(0, str(Path(__file__).parents[2]))

examples_tests_path = Path(__file__).parents[2] / "examples" / "tests.yaml"

Expand Down

0 comments on commit 4ed8924

Please sign in to comment.