chore: move to using Ruff (#140)
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
This commit is contained in:
parent
9617a2b3f6
commit
fae6ade894
4 changed files with 18 additions and 16 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
3
setup.py
3
setup.py
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue