Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 17, 2024
1 parent 95be76f commit 4881d19
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions buildtest/cli/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,12 @@ def discover_buildspecs(
)

cache = load_json(BUILDSPEC_CACHE_FILE)

# get file_traversal_limit from the config
if site_config and site_config.target_config:
file_traversal_limit = site_config.target_config.get("file_traversal_limit", 1000)
file_traversal_limit = site_config.target_config.get(
"file_traversal_limit", 1000
)
else:
file_traversal_limit = 1000

Check warning on line 163 in buildtest/cli/build.py

View check run for this annotation

Codecov / codecov/patch

buildtest/cli/build.py#L163

Added line #L163 was not covered by tests

Expand Down Expand Up @@ -556,7 +558,9 @@ def discover_by_buildspecs(buildspec: str, file_traversal_limit: int) -> list:
logger.debug(
f"Buildspec File: {buildspec} is a directory so traversing directory tree to find all Buildspec files with .yml extension"
)
buildspecs = walk_tree(buildspec, ".yml", file_traverse_limit=file_traversal_limit)
buildspecs = walk_tree(

Check warning on line 561 in buildtest/cli/build.py

View check run for this annotation

Codecov / codecov/patch

buildtest/cli/build.py#L561

Added line #L561 was not covered by tests
buildspec, ".yml", file_traverse_limit=file_traversal_limit
)
elif os.path.isfile(buildspec):
# if buildspec doesn't end in .yml extension we print message and return None
if not re.search(".yml$", buildspec):
Expand Down

0 comments on commit 4881d19

Please sign in to comment.