From 72eede12fe9ea2d6be325f0a24bec17890982165 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Mon, 30 Oct 2023 18:06:24 -0400 Subject: [PATCH] chore: move to ruff-format Signed-off-by: Henry Schreiner --- .pre-commit-config.yaml | 9 ++------- pyproject.toml | 9 +++++---- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ef080fe..53b7a6d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -33,19 +33,14 @@ repos: - id: requirements-txt-fixer - id: trailing-whitespace -# Black, the code formatter, natively supports pre-commit -- repo: https://github.com/psf/black-pre-commit-mirror - rev: 23.10.1 - hooks: - - id: black - files: ^(docs) - # Lints code - repo: https://github.com/astral-sh/ruff-pre-commit rev: "v0.1.3" hooks: - id: ruff args: ["--fix", "--show-fixes"] + - id: ruff-format + files: ^(docs) # Changes tabs to spaces - repo: https://github.com/Lucas-C/pre-commit-hooks diff --git a/pyproject.toml b/pyproject.toml index 013e25d..2b3ce52 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,11 +5,16 @@ requires = [ ] build-backend = "setuptools.build_meta" + [tool.cibuildwheel] test-command = "python {project}/tests/test.py" test-skip = "*universal2:arm64" + [tool.ruff] +target-version = "py37" + +[tool.ruff.lint] extend-select = [ "B", # flake8-bugbear "I", # isort @@ -17,7 +22,3 @@ extend-select = [ "RUF", # Ruff-specific "UP", # pyupgrade ] -extend-ignore = [ - "E501", # Line too long -] -target-version = "py37"