Skip to content

Commit

Permalink
Migrate to ruff (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
aazuspan authored Jul 1, 2023
1 parent 1242246 commit 21e1f68
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 27 deletions.
35 changes: 10 additions & 25 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,12 @@
repos:
- repo: https://github.com/asottile/pyupgrade
rev: v3.7.0
hooks:
- id: pyupgrade
args: [--py38-plus]
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
args: [--line-length=100]

- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
args: [--line-length=100]

- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
args: [--profile, black]

- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8
args: [--max-line-length, '100']
exclude: docs|tests|setup.py
additional_dependencies:
- flake8-bugbear
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.275
hooks:
- id: ruff
args: [--fix, --line-length=100]
7 changes: 6 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,9 @@ dependencies = [
[tool.hatch.envs.test.scripts]
all = "pytest . {args}"
coverage = "pytest . --cov=sankee {args}"
view-coverage = "python -m webbrowser -t htmlcov/index.html"
view-coverage = "python -m webbrowser -t htmlcov/index.html"

[tool.ruff]
select = ["E", "F", "I", "UP", "B", "PT", "NPY", "PERF", "RUF"]
exclude = ["docs/"]
target-version = "py38"
2 changes: 1 addition & 1 deletion tests/test_plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from .data import TEST_DATA, TEST_DATASET


@pytest.fixture
@pytest.fixture()
def sankey():
"""Generate a SankeyPlot for testing."""
return sankee.plotting.SankeyPlot(
Expand Down

0 comments on commit 21e1f68

Please sign in to comment.