From 3006389412739a0b9aefdb37da8ee3752367d34f Mon Sep 17 00:00:00 2001 From: Kyle King Date: Mon, 19 Feb 2024 12:58:26 -0500 Subject: [PATCH] ci: update ruff --- .pre-commit-config.yaml | 2 +- .ruff.toml | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c4193c7..2d44b46 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -31,7 +31,7 @@ repos: hooks: - id: python-check-blanket-noqa - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.14 + rev: v0.2.2 hooks: - id: ruff args: [--fix] diff --git a/.ruff.toml b/.ruff.toml index 247c060..cd71df3 100644 --- a/.ruff.toml +++ b/.ruff.toml @@ -1,6 +1,10 @@ # Docs: https://github.com/charliermarsh/ruff # Tip: run python -m ruff --explain RUF100 +line-length = 88 +target-version = 'py38' + +[lint] ignore = [ 'ANN002', # Missing type annotation for `*args` 'ANN003', # Missing type annotation for `**kwargs` @@ -31,21 +35,19 @@ ignore = [ 'TID252', # Relative imports from parent modules are banned 'TRY003', # Avoid specifying long messages outside the exception class ] -line-length = 88 preview = true select = ['ALL'] -target-version = 'py38' unfixable = [ 'ERA001', # Commented out code ] -[flake8-quotes] +[lint.flake8-quotes] inline-quotes = 'double' -[isort] +[lint.isort] known-first-party = ['mdformat_mkdocs'] -[per-file-ignores] +[lint.per-file-ignores] '__init__.py' = [ 'D104', # Missing docstring in public package 'F401', # imported but unused; consider adding to __all__ or using a redundant alias @@ -63,5 +65,5 @@ known-first-party = ['mdformat_mkdocs'] 'T201', # `print` found' ] -[pylint] +[lint.pylint] max-args = 6