From e156ea4108b2da69e2a833773d876861d058853a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?c=C4=83t=C4=83lin?= Date: Fri, 17 May 2024 18:47:56 +0200 Subject: [PATCH] chore: update linters and replace black with ruff-format --- .pre-commit-config.yaml | 14 ++++---------- halig/commands/base.py | 3 +-- pyproject.toml | 4 +++- 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6ada2b5..7bbf30f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,7 @@ files: ^halig|tests$ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v4.6.0 hooks: - id: trailing-whitespace args: [ --markdown-linebreak-ext=md ] @@ -19,20 +19,14 @@ repos: args: [ --fix=lf ] - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.1.6 + rev: v0.4.4 hooks: - id: ruff args: - --fix - --exit-non-zero-on-fix - - - repo: https://github.com/psf/black - rev: 23.11.0 - hooks: - - id: black - pass_filenames: false - args: - - "halig" + - id: ruff-format + - repo: local hooks: diff --git a/halig/commands/base.py b/halig/commands/base.py index 26db02c..cb935cb 100644 --- a/halig/commands/base.py +++ b/halig/commands/base.py @@ -5,8 +5,7 @@ from halig.settings import Settings class ICommand(ABC): @abstractmethod - def run(self): - ... # pragma: no cover + def run(self): ... # pragma: no cover class BaseCommand(ICommand): diff --git a/pyproject.toml b/pyproject.toml index a30ee1d..7a0f231 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -86,8 +86,9 @@ mock_use_standalone_module = true [tool.pyright] reportMissingImports = false reportMissingTypeStubs = false +reportAttributeAccessIssue = false -[tool.ruff] +[tool.ruff.lint] extend-select = ["W", "C90", "I", "N", "UP", "S", "BLE", "B", "A", "COM", "C4", "DTZ", "T10", "EM", "ISC", "T20", "PT", "RSE", "RET", "SIM", "PTH", "ERA", "PGH", "PL", "TRY", "RUF"] extend-ignore = ["S101", "ISC002"] @@ -95,6 +96,7 @@ extend-ignore = ["S101", "ISC002"] python_version = "3.11" warn_return_any = true warn_unused_configs = true + [[tool.mypy.overrides]] module = [ "pyrage",