Skip to content

Commit

Permalink
Move to ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
JB Lovland committed Feb 8, 2024
1 parent 484be8a commit 2a36371
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 19 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/fmu-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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() }}
Expand Down
40 changes: 29 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]

Expand All @@ -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

Expand All @@ -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

0 comments on commit 2a36371

Please sign in to comment.