diff --git a/.github/workflows/fmu-config.yml b/.github/workflows/fmu-config.yml index 5b2e803..3270334 100644 --- a/.github/workflows/fmu-config.yml +++ b/.github/workflows/fmu-config.yml @@ -39,17 +39,13 @@ jobs: - name: List all installed packages run: pip freeze - - name: Lint with isort + - name: Ruff check if: ${{ always() }} - run: isort --check-only --profile black src tests + run: ruff check . - - name: Lint with black + - name: Ruff format check if: ${{ always() }} - run: black --check src tests - - - name: Lint with flake8 - if: ${{ always() }} - run: flake8 src tests + run: ruff format . --check - name: Check typing with mypy if: ${{ always() }} diff --git a/pyproject.toml b/pyproject.toml index 458c4c8..4c1c43d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,18 +35,16 @@ dependencies = ["pyyaml"] dev = [ "astroid", "autoapi", - "black", "coverage", - "flake8", - "isort", "mypy", "myst-parser", "pylint", - "pytest", "pytest-runner", + "pytest", "rstcheck", - "Sphinx", + "ruff", "sphinx_rtd_theme", + "Sphinx", "types-PyYAML", ] @@ -57,12 +55,6 @@ Repository = "https://github.com/equinor/fmu-config" [project.scripts] fmuconfig = "fmu.config.fmuconfigrunner:main" -[tool.black] -line-length = 88 - -[tool.isort] -profile = "black" - [tool.mypy] ignore_missing_imports = true @@ -84,3 +76,29 @@ markers = [ [tool.rstcheck] ignore_directives = ["argparse", "automodule"] + +[tool.ruff] +line-length = 88 + +[tool.ruff.lint] +ignore = [ + "C901", +] +select = [ + "C", + "E", + "F", + "I", + "PIE", + "Q", + "RET", + "RSE", + "SIM", + "W", + # "C90", + # "NPY", + # "PD", + # "PL", +] +[tool.ruff.lint.isort] +combine-as-imports = true