Skip to content

Commit

Permalink
Merge pull request #456 from sebp/upgrade-ruff
Browse files Browse the repository at this point in the history
Upgrade ruff to 0.4.3
  • Loading branch information
sebp committed May 5, 2024
2 parents fc3d7f4 + fdce16d commit 037595c
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 11 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/tox-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jobs:
- name: Install Tox
run: python -m pip install tox
- name: Run Tox
env:
RUFF_OUTPUT_FORMAT: github
run: |
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
tox run -e ${{ matrix.tox_env }}
Expand Down
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: trailing-whitespace
exclude: '^\.gitignore$'
Expand All @@ -26,23 +26,23 @@ repos:
- id: rst-directive-colons
- id: rst-inline-touching-normal
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.27.3
rev: 0.28.2
hooks:
- id: check-dependabot
- id: check-github-workflows
- id: check-readthedocs
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.4
rev: v1.5.5
hooks:
- id: forbid-crlf
exclude: '^\.gitignore$'
- id: forbid-tabs
types: [python]
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.12.1
rev: 24.4.2
hooks:
- id: black-jupyter
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.9
rev: v0.4.3
hooks:
- id: ruff
12 changes: 7 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,12 @@ extend-exclude = [
]
# Group violations by containing file.
output-format = "grouped"
line-length = 120
target-version = "py39"

[tool.ruff.lint]
ignore = ["C408"]
ignore-init-module-imports = true
line-length = 120
select = [
"C4",
"C9",
Expand All @@ -190,15 +193,14 @@ select = [
"PT",
"W",
]
target-version = "py39"

[tool.ruff.flake8-pytest-style]
[tool.ruff.lint.flake8-pytest-style]
parametrize-names-type = "csv"

[tool.ruff.mccabe]
[tool.ruff.lint.mccabe]
max-complexity = 10

[tool.ruff.isort]
[tool.ruff.lint.isort]
force-sort-within-sections = true
known-first-party = ["sksurv"]

Expand Down
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ deps =
description = Run linters
skip_install = true
deps =
ruff~=0.1.0
ruff~=0.4.3
commands = ruff check sksurv/ tests/ setup.py
pass_env = RUFF_*

# Documentation
[testenv:docs]
Expand Down

0 comments on commit 037595c

Please sign in to comment.