chore: update linters and replace black with ruff-format

This commit is contained in:
cătălin 2024-05-17 18:47:56 +02:00
commit e156ea4108
No known key found for this signature in database
3 changed files with 8 additions and 13 deletions

View file

@ -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:

View file

@ -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):

View file

@ -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",