lint: address ruff deprecation warnings and regen config
This commit is contained in:
parent
65d85e1efd
commit
a6e64cef92
3 changed files with 10 additions and 5 deletions
|
|
@ -44,8 +44,8 @@ def lint(session: nox.Session):
|
|||
|
||||
@nox.session
|
||||
def static(session: nox.Session):
|
||||
install(session, "ruff", "reuse", "yamllint")
|
||||
session.run("ruff", *session.posargs, *PY_FILES)
|
||||
install(session, "ruff >= 0.2.0", "reuse", "yamllint")
|
||||
session.run("ruff", "check", *session.posargs, *PY_FILES)
|
||||
session.run("yamllint", *YAML_FILES)
|
||||
session.run("reuse", "lint")
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,17 @@
|
|||
# Copyright (C) 2023 Maxwell G <maxwell@gtmx.me>
|
||||
# Copyright (C) 2024 Maxwell G <maxwell@gtmx.me>
|
||||
# SPDX-License-Identifier: GPL-1.0-or-later
|
||||
|
||||
[lint]
|
||||
select = [
|
||||
"A", # flake8-builtins
|
||||
"ARG", # unused-arguments
|
||||
"B", # flake8-bugbear
|
||||
"DTZ", # flake8-datetimez
|
||||
"E", # pycodestyle errors
|
||||
"F", # pyflakes
|
||||
"PERF", # Perflint
|
||||
"PL", # pylint
|
||||
"RUF", # Ruff's own rules
|
||||
"SIM", # flake8-simplify
|
||||
"W", # pycodestyle warnings
|
||||
]
|
||||
|
|
@ -27,5 +32,5 @@ ignore = [
|
|||
"PLR0913",
|
||||
]
|
||||
|
||||
[extend-per-file-ignores]
|
||||
[lint.extend-per-file-ignores]
|
||||
"tests/*" = ["ARG"]
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ SENTINEL = "*-*" * 20
|
|||
@dataclasses.dataclass()
|
||||
class _TestVector:
|
||||
# Test id
|
||||
id: str # noqa: A003
|
||||
id: str
|
||||
# Longer description
|
||||
description: str | None = None
|
||||
# Macros to %define
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue