Skip to content

Commit

Permalink
Sync ruff invocations
Browse files Browse the repository at this point in the history
* by using "find-python-files" we actually test different files then ruff would choose
* format-python and test-format-python are now in sync again

Change-Id: I7aba52589b04c933faac458bd8ca58777fe6e1cf
  • Loading branch information
TimotheusBachinger committed Sep 25, 2024
1 parent 11ccf2a commit 33fae72
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 16 deletions.
14 changes: 3 additions & 11 deletions tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -197,17 +197,9 @@ test-docker:
shellcheck -x $(SHELLCHECK_OUTPUT_ARGS) ../docker_image/docker-entrypoint.sh
$(PYTEST) -x -T docker --log-cli-level=INFO docker

test-format-python: test-format-python-sort test-format-python-format

test-format-python-sort: ../pyproject.toml
if test -z "$$PYTHON_FILES"; then $(FIND_PYTHON_FILES); else echo "$$PYTHON_FILES"; fi | \
xargs -n 1500 ../scripts/run-pipenv run ruff check --select I --diff;\
exit $${PIPESTATUS[1]}

test-format-python-format: ../pyproject.toml
if test -z "$$PYTHON_FILES"; then $(FIND_PYTHON_FILES); else echo "$$PYTHON_FILES"; fi | \
xargs -n 1500 ../scripts/run-pipenv run ruff format --check --diff;\
exit $${PIPESTATUS[1]}
test-format-python: ../pyproject.toml
$(PIPENV) run ruff check --select I --diff
../.venv/bin/ruff format --diff

test-format-python-docker:
../scripts/run-in-docker.sh make --quiet test-format-python
Expand Down
9 changes: 4 additions & 5 deletions tests/plugins_integration/test_plugin_piggyback.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
import logging
import re
import time

import pytest

from tests.testlib.site import Site
from tests.testlib.utils import get_services_with_status
from tests.testlib.utils import get_services_with_status, write_file

from tests.plugins_integration.checks import (
dump_path_site,
get_host_names,
get_piggyback_hosts,
read_cmk_dump,
read_disk_dump,
setup_source_host_piggyback,
dump_path_site,
)
import logging
import time
from tests.testlib.utils import write_file

logger = logging.getLogger(__name__)

Expand Down

0 comments on commit 33fae72

Please sign in to comment.