Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jackdewinter authored Jan 11, 2025
1 parent 9e5b364 commit 929207b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pre-commit = "==3.5.0"
project-summarizer = "==0.5.0"
py = "==1.11.0"
pylint = "==3.2.7"
pylint-utils = "==0.5.0"
pylint-utils = "==0.5.1"
pyroma = "==4.2"
pytest = "==8.3.3"
pytest-cov = "==5.0.0"
Expand Down
14 changes: 7 additions & 7 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions clean.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,9 @@ if not defined MY_SOURCERY (
)
)

@REM TODO Make this repeatable in GitHub
echo {Executing pylint utils analyzer on Python source code to verify suppressions and document them.}
pipenv run python ..\pylint_utils\main.py --config setup.cfg --recurse -r publish\pylint_suppression.json %PYTHON_MODULE_NAME%
echo pipenv run pylint_utils --config setup.cfg --recurse -r publish\pylint_suppression.json %PYTHON_MODULE_NAME%
pipenv run pylint_utils --config setup.cfg --recurse -r publish\pylint_suppression.json %PYTHON_MODULE_NAME%
if ERRORLEVEL 1 (
echo.
echo {Executing reporting of pylint suppressions in Python source code failed.}
Expand Down Expand Up @@ -230,7 +230,7 @@ if "%ALL_FILES%" == "" (
echo {Not executing pylint suppression checker on Python source code. No eligible Python files staged.}
) else (
echo {Executing pylint suppression checker on Python source code.}
pipenv run python ..\pylint_utils\main.py -s %ALL_FILES%
pipenv run pylint_utils -s %ALL_FILES%
if ERRORLEVEL 1 (
echo.
echo {Executing reporting of unused pylint suppressions in modified Python source code failed.}
Expand Down
6 changes: 2 additions & 4 deletions clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,6 @@ execute_sourcery() {

find_unused_pylint_suppressions() {

# TODO: Make this repeatable in GitHub
SCAN_FILES=
git diff --name-only --staged > "$TEMP_FILE"
while IFS= read -r line; do
Expand All @@ -343,7 +342,7 @@ find_unused_pylint_suppressions() {
verbose_echo "{Not executing pylint suppression checker on Python source code. No eligible Python files staged.}"
else
verbose_echo "{Executing pylint suppression checker on Python source code.}"
if ! pipenv run python $SCRIPT_DIR/../pylint_utils/main.py -s $SCAN_FILES ; then
if ! pipenv run pylint_utils -s $SCAN_FILES ; then
complete_process 1 "{Executing reporting of unused pylint suppressions in modified Python source code failed.}"
fi
fi
Expand All @@ -366,10 +365,9 @@ publish_analysis_results_if_requested() {

analyze_pylint_suppressions() {

# TODO: Make this repeatable in GitHub
echo ""
verbose_echo "{Executing pylint utils analyzer on Python source code to verify suppressions and document them.}"
if ! pipenv run python $SCRIPT_DIR/../pylint_utils/main.py --config $SCRIPT_DIR/setup.cfg --recurse -r $SCRIPT_DIR/publish/pylint_suppression.json $PYTHON_MODULE_NAME ; then
if ! pipenv run pylint_utils --recurse -r $SCRIPT_DIR/publish/pylint_suppression.json $PYTHON_MODULE_NAME ; then
complete_process 1 "{Executing reporting of pylint suppressions in Python source code failed.}"
fi
}
Expand Down

0 comments on commit 929207b

Please sign in to comment.