Skip to content

Commit

Permalink
Yapf issue #984 has been fixed in our current version of yapf. Remove…
Browse files Browse the repository at this point in the history
… usage of older YAPF_EXCLUDE_FLAGS work-around
  • Loading branch information
dagardner-nv committed Dec 27, 2023
1 parent c243209 commit 8d531d5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
3 changes: 0 additions & 3 deletions ci/scripts/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ export PY_ROOT="${MORPHEUS_ROOT}"
export PY_CFG="${PY_ROOT}/setup.cfg"
export PY_DIRS="${PY_ROOT} ci/scripts"

# work-around for known yapf issue https://github.com/google/yapf/issues/984
export YAPF_EXCLUDE_FLAGS="-e versioneer.py -e morpheus/_version.py"

# Determine the commits to compare against. If running in CI, these will be set. Otherwise, diff with main
export BASE_SHA=${CHANGE_TARGET:-${BASE_SHA:-$(${SCRIPT_DIR}/gitutils.py get_merge_target)}}
export COMMIT_SHA=${GIT_COMMIT:-${COMMIT_SHA:-HEAD}}
Expand Down
2 changes: 1 addition & 1 deletion ci/scripts/fix_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,5 +105,5 @@ fi
# Run yapf
if [[ "${SKIP_YAPF}" == "" ]]; then
echo "Running yapf..."
python3 -m yapf -i --style ${PY_CFG} ${YAPF_EXCLUDE_FLAGS} -r ${PY_MODIFIED_FILES[@]}
python3 -m yapf -i --style ${PY_CFG} -r ${PY_MODIFIED_FILES[@]}
fi
2 changes: 1 addition & 1 deletion ci/scripts/python_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ if [[ -n "${MORPHEUS_MODIFIED_FILES}" ]]; then

if [[ "${SKIP_YAPF}" == "" ]]; then
# Run yapf. Will return 1 if there are any diffs
YAPF_OUTPUT=`python3 -m yapf --style ${PY_CFG} ${YAPF_EXCLUDE_FLAGS} --diff ${MORPHEUS_MODIFIED_FILES[@]} 2>&1`
YAPF_OUTPUT=`python3 -m yapf --style ${PY_CFG} --diff ${MORPHEUS_MODIFIED_FILES[@]} 2>&1`
YAPF_RETVAL=$?
fi

Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ asyncio_mode = "auto"
ignore_patterns = [
"**/*.pyx",
"**/*.pxd",
"versioneer.py",
"morpheus/_version.py",
"examples/external_cpp_stage/morpheus_ex/external_cpp_stage/_version.py",
]

[tool.mypy]
Expand Down

0 comments on commit 8d531d5

Please sign in to comment.