diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 69728af6..b17dc238 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,7 +20,7 @@ repos: - id: sort-simple-yaml - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: 'v0.4.3' + rev: 'v0.4.4' hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] diff --git a/pyproject.toml b/pyproject.toml index 4d5b6251..9f75ea54 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -125,6 +125,10 @@ ignore_missing_imports = true ignore-words-list = "cachable, keypair" [tool.ruff] +output-format = "full" +show-fixes = true + +[tool.ruff.lint] ignore = [ "S101", # assert "PLR2004", # magic-value-comparison @@ -180,10 +184,8 @@ select = [ "W", # pycodestyle - Warning "YTT", # flake8-2020 ] -show-source = true -show-fixes = true -[tool.ruff.per-file-ignores] +[tool.ruff.lint.per-file-ignores] "noxfile.py" = ["D", "PTH"] "tests/**" = ["S", "ARG001", "ARG002", "ANN"] "docs/**" = ["INP"] @@ -199,5 +201,5 @@ strict = true [tool.ruff.lint.isort] known-first-party = ["scmrepo"] -[tool.ruff.pylint] +[tool.ruff.lint.pylint] max-args = 10 diff --git a/src/scmrepo/git/backend/pygit2/__init__.py b/src/scmrepo/git/backend/pygit2/__init__.py index 9f996442..06ac2e7e 100644 --- a/src/scmrepo/git/backend/pygit2/__init__.py +++ b/src/scmrepo/git/backend/pygit2/__init__.py @@ -951,7 +951,7 @@ def status( def iter_remote_refs(self, url: str, base: Optional[str] = None, **kwargs): raise NotImplementedError - def merge( # noqa: C901 + def merge( # noqa: C901, PLR0912 self, rev: str, commit: bool = True,