File tree Expand file tree Collapse file tree 4 files changed +18
-16
lines changed
Expand file tree Collapse file tree 4 files changed +18
-16
lines changed Original file line number Diff line number Diff line change @@ -40,18 +40,12 @@ repos:
4040 - id : black
4141 files : ^(docs)
4242
43- # Sort your imports in a standard form
44- - repo : https://github.com/PyCQA/isort
45- rev : 5.12.0
43+ # Lints code
44+ - repo : https://github.com/charliermarsh/ruff-pre-commit
45+ rev : " v0.0.252 "
4646 hooks :
47- - id : isort
48-
49- # Upgrade older Python syntax
50- - repo : https://github.com/asottile/pyupgrade
51- rev : v3.3.1
52- hooks :
53- - id : pyupgrade
54- args : ["--py36-plus"]
47+ - id : ruff
48+ args : ["--fix", "--show-fixes"]
5549
5650# Changes tabs to spaces
5751- repo : https://github.com/Lucas-C/pre-commit-hooks
Original file line number Diff line number Diff line change 1111# All configuration values have a default; values that are commented out
1212# serve to show the default.
1313
14- import os
15- import sys
1614
1715# If extensions (or modules to document with autodoc) are in another directory,
1816# add these directories to sys.path here. If the directory is relative to the
Original file line number Diff line number Diff line change @@ -8,3 +8,16 @@ build-backend = "setuptools.build_meta"
88[tool .cibuildwheel ]
99test-command = " python {project}/tests/test.py"
1010test-skip = " *universal2:arm64"
11+
12+ [tool .ruff ]
13+ extend-select = [
14+ " B" , # flake8-bugbear
15+ " I" , # isort
16+ " PGH" , # pygrep-hooks
17+ " RUF" , # Ruff-specific
18+ " UP" , # pyupgrade
19+ ]
20+ extend-ignore = [
21+ " E501" , # Line too long
22+ ]
23+ target-version = " py37"
Original file line number Diff line number Diff line change 1- import sys
2-
31# Available at setup time due to pyproject.toml
4- from pybind11 import get_cmake_dir
52from pybind11 .setup_helpers import Pybind11Extension , build_ext
63from setuptools import setup
74
You can’t perform that action at this time.
0 commit comments