Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade ruff to 0.4.3 #456

Merged
merged 2 commits into from
May 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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