Skip to content

Commit

Permalink
Merge pull request #161 from vil02/use_xenon
Browse files Browse the repository at this point in the history
chore: monitor code complexity with `xenon`
  • Loading branch information
vil02 authored Dec 6, 2024
2 parents f6658cf + 69c1631 commit 8896a10
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions check_python_file.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ do
printf "Checking with mypy:\n%s\n" "${mypy_output}"
exit_code=1
}

xenon_output=$(poetry run xenon --max-absolute A --max-modules A --max-average A "${cur_file}" 2>&1) || {
printf "Checking \"%s\"\n" "${cur_file}"
printf "Checking with xenon:\n%s\n" "${xenon_output}"
exit_code=1
}
done

if [[ ${exit_code} -eq 0 ]] ; then
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ ruff = "0.8.2"
coverage = "7.6.9"
mypy = "1.13.0"
bandit = "1.8.0"
xenon = "0.9.3"

[build-system]
requires = ["poetry-core"]
Expand Down

0 comments on commit 8896a10

Please sign in to comment.