From 49799237fb75c695274670c3f9b221c5b5945af3 Mon Sep 17 00:00:00 2001 From: Christoph Ladurner Date: Fri, 31 Jan 2025 21:48:53 +0100 Subject: [PATCH] tests: add linter and check black * ruff rules: I .. isort T20 .. p(p)rint statements F401 .. unused imports F841 .. unused variable F811 .. redefined while unused --- .github/workflows/tests-python.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/tests-python.yml b/.github/workflows/tests-python.yml index 2e0ef14..1873085 100644 --- a/.github/workflows/tests-python.yml +++ b/.github/workflows/tests-python.yml @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # # Copyright (C) 2024 CERN. +# Copyright (C) 2025 Graz University of Technology. name: Python CI @@ -55,6 +56,15 @@ jobs: uses: ./.github/actions/pre-install if: ${{ hashFiles('.github/actions/pre-install/action.yml') != '' }} + - uses: psf/black@stable + with: + options: "--check --verbose" + + - name: Linter + uses: astral-sh/ruff-action@v3 + with: + args: "check --select I,T20,F401,F841,F811" + - name: Install dependencies run: | pip install ".[$EXTRAS]"