diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 0fa8c20..110fc78 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -30,12 +30,11 @@ jobs: virtualenvs-in-project: true - name: Install project run: poetry install --without dev # installs main and test groups - - name: Lint with isort - # by default: exit with error if imports are not properly sorted; show diffs - uses: isort/isort-action@master - - name: Lint with black - # by default: exit with error if code is not properly formatted; show diffs - uses: psf/black@stable + - name: Lint format with ruff + # by default: exit with error if rule violations + uses: chartboost/ruff-action@v1 + with: + args: format - name: Lint with ruff # by default: exit with error if rule violations uses: chartboost/ruff-action@v1 diff --git a/pyproject.toml b/pyproject.toml index b7f50c1..bd59351 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,8 +17,6 @@ requests = "^2.23.1" playwright = "^1.39.0" [tool.poetry.group.dev.dependencies] -black = "^24.4.0" -isort = "^5.13.0" ruff = "^0.4.1" [tool.poetry.group.test.dependencies] @@ -43,13 +41,15 @@ disallow_untyped_calls = false [tool.ruff] # Enable rulesets: -# flake8-ANNotations, flake8-COMmas, pyDocstyle, pycodestylE, pyFlakes, +# flake8-ANNotations, flake8-COMmas, pyDocstyle, pycodestylE, pyFlakes, Isort, # flake8-Future-Annotations, flake8-bandit (S) -select = ["ANN", "COM", "D", "E", "F", "FA", "S"] +select = ["ANN", "COM", "D", "E", "F", "I", "FA", "S"] -# Ignore rules: +# Ignore rules that conflict with Ruff formatter: +# COM812 Trailing comma missing +# Ignore other rules: # Missing type annotation for `self` in method -ignore = ["ANN101"] +ignore = ["COM812", "ANN101"] [tool.ruff.per-file-ignores] # Use of `assert` detected