From feb031c8a52859c2514ef91e0d173f27679be38b Mon Sep 17 00:00:00 2001 From: Tim Jenness Date: Mon, 15 Jul 2024 09:42:27 -0700 Subject: [PATCH 1/2] Modernize ruff config --- pyproject.toml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 918f8d5..6bd2ec1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -64,10 +64,14 @@ line_length = 110 write_to = "python/lsst/daf/butler_migrate/version.py" [tool.ruff] +target-version = "py311" +line-length = 110 exclude = [ "__init__.py", "migrations/*/*.py", ] + +[tool.ruff.lint] ignore = [ "N802", "N803", @@ -85,7 +89,6 @@ ignore = [ "D205", "D400", ] -line-length = 110 select = [ "E", # pycodestyle "F", # pycodestyle @@ -95,15 +98,14 @@ select = [ "UP", "C4", ] -target-version = "py311" extend-select = [ "RUF100", # Warn about unused noqa ] -[tool.ruff.pycodestyle] +[tool.ruff.lint.pycodestyle] max-doc-length = 79 -[tool.ruff.pydocstyle] +[tool.ruff.lint.pydocstyle] convention = "numpy" [tool.pytest.ini_options] From cdc96520657f65c10d5ab257881cfb6a57fdeb92 Mon Sep 17 00:00:00 2001 From: Tim Jenness Date: Mon, 15 Jul 2024 09:42:59 -0700 Subject: [PATCH 2/2] Refresh pre-commit --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4d00dab..cbb8b8b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,7 +6,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/psf/black - rev: 24.4.0 + rev: 24.4.2 hooks: - id: black # It is recommended to specify the latest version of Python @@ -21,6 +21,6 @@ repos: name: isort (python) - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.4.1 + rev: v0.5.2 hooks: - id: ruff