Skip to content

Commit

Permalink
Style Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
benedikt-schesch committed Oct 10, 2023
1 parent 4900fb2 commit f9eec73
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ style: shell-script-style python-style java-style

SH_SCRIPTS = $(shell grep --exclude-dir=build --exclude-dir=repos --exclude-dir=cache -r -l '^\#! \?\(/bin/\|/usr/bin/env \)sh' * | grep -v 'git-hires-merge' | grep -v /.git/ | grep -v '~$$' | grep -v '\.tar$$' | grep -v gradlew)
BASH_SCRIPTS = $(shell grep --exclude-dir=build --exclude-dir=repos --exclude-dir=cache -r -l '^\#! \?\(/bin/\|/usr/bin/env \)bash' * | grep -v /.git/ | grep -v '~$$' | grep -v '\.tar$$' | grep -v gradlew)
PYTHON_FILES = $(shell find . -name '*.py' ! -path './repos/*' | grep -v '/__pycache__/' | grep -v '/.git/' | grep -v gradlew)
PYTHON_FILES = $(shell find . -name '*.py' ! -path './repos/*' -not -path "./.workdir/*" | grep -v '/__pycache__/' | grep -v '/.git/' | grep -v gradlew)

shell-script-style:
shellcheck -e SC2153 -x -P SCRIPTDIR --format=gcc ${SH_SCRIPTS} ${BASH_SCRIPTS}
Expand Down
2 changes: 1 addition & 1 deletion src/python/cache_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def set_in_cache(
f.write(output)
f.flush()
if acquire_lock:
lock.release_write_lock() # type: ignore
lock.release_write_lock() # type: ignore


def lookup_in_cache(
Expand Down
8 changes: 6 additions & 2 deletions src/python/merge_tester.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ def merge_tester(args: Tuple[str, pd.Series, Path]) -> pd.Series:
for branch in ["left", "right"]:
commit_sha = merge_data[branch]
repo = Repository(repo_slug, cache_directory=cache_directory)
test_result, tree_fingerprint = repo.checkout_and_test(commit_sha, TIMEOUT_TESTING_PARENT, N_TESTS)
test_result, tree_fingerprint = repo.checkout_and_test(
commit_sha, TIMEOUT_TESTING_PARENT, N_TESTS
)
if tree_fingerprint != merge_data[f"{branch}_tree_fingerprint"]:
raise Exception(
"merge_tester: Tree fingerprint mismatch",
Expand All @@ -73,7 +75,9 @@ def merge_tester(args: Tuple[str, pd.Series, Path]) -> pd.Series:
if test_result != TEST_STATE.Tests_passed:
return merge_data

print("merge_tester: Parents pass", repo_slug, merge_data["left"], merge_data["right"])
print(
"merge_tester: Parents pass", repo_slug, merge_data["left"], merge_data["right"]
)
merge_data["parents pass"] = True

for merge_tool in MERGE_TOOL:
Expand Down
4 changes: 2 additions & 2 deletions src/python/repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ def _checkout_and_test(
commit: str,
timeout: int,
n_tests: int,
) -> Tuple[TEST_STATE,Union[str,None]]:
) -> Tuple[TEST_STATE, Union[str, None]]:
"""Helper function for `checkout_and_test`,
which checks out the given commit and tests the repository.
This function does not check the cache.
Expand All @@ -484,7 +484,7 @@ def checkout_and_test(
commit: str,
timeout: int,
n_tests: int,
) -> Tuple[TEST_STATE,Union[str,None]]:
) -> Tuple[TEST_STATE, Union[str, None]]:
"""Checks out the given commit and tests the repository.
Args:
commit (str): The commit to checkout.
Expand Down

0 comments on commit f9eec73

Please sign in to comment.