Skip to content

Commit

Permalink
run pylint AND ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
Kakadus committed Oct 23, 2023
1 parent 493cd34 commit 6b19d4f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,10 @@ jobs:
- name: Setup python
uses: ./.github/setup_python

- name: Run linter
run: ruff evap
- name: Run linters
run: |
ruff evap
pylint evap -j0
formatter:
Expand Down
3 changes: 2 additions & 1 deletion evap/evaluation/management/commands/lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ class Command(BaseCommand):
requires_migrations_checks = False

def handle(self, *args, **options):
subprocess.run(["ruff", "evap/"], check=False) # nosec
subprocess.run(["pylint", "evap"], check=False) # nosec
subprocess.run(["ruff", "evap"], check=False) # nosec
1 change: 1 addition & 0 deletions evap/evaluation/tests/test_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@ class TestLintCommand(TestCase):
def test_pylint_called(mock_subprocess_run):
management.call_command("lint")
mock_subprocess_run.assert_called_once_with(["pylint", "evap"], check=False)
mock_subprocess_run.assert_called_once_with(["ruff", "evap"], check=False)


class TestFormatCommand(TestCase):
Expand Down

0 comments on commit 6b19d4f

Please sign in to comment.