chore: move to using Ruff (#140)

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
This commit is contained in:
Henry Schreiner 2023-02-23 05:23:57 -08:00 committed by GitHub
parent 9617a2b3f6
commit fae6ade894
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 16 deletions

View file

@ -40,18 +40,12 @@ repos:
- id: black
files: ^(docs)
# Sort your imports in a standard form
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
# Lints code
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.0.252"
hooks:
- id: isort
# Upgrade older Python syntax
- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
hooks:
- id: pyupgrade
args: ["--py36-plus"]
- id: ruff
args: ["--fix", "--show-fixes"]
# Changes tabs to spaces
- repo: https://github.com/Lucas-C/pre-commit-hooks

View file

@ -11,8 +11,6 @@
# All configuration values have a default; values that are commented out
# serve to show the default.
import os
import sys
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the

View file

@ -8,3 +8,16 @@ build-backend = "setuptools.build_meta"
[tool.cibuildwheel]
test-command = "python {project}/tests/test.py"
test-skip = "*universal2:arm64"
[tool.ruff]
extend-select = [
"B", # flake8-bugbear
"I", # isort
"PGH", # pygrep-hooks
"RUF", # Ruff-specific
"UP", # pyupgrade
]
extend-ignore = [
"E501", # Line too long
]
target-version = "py37"

View file

@ -1,7 +1,4 @@
import sys
# Available at setup time due to pyproject.toml
from pybind11 import get_cmake_dir
from pybind11.setup_helpers import Pybind11Extension, build_ext
from setuptools import setup