Skip to content

Commit 7347285

Browse files
committed
chore: adding style checking
Signed-off-by: Henry Schreiner <[email protected]>
1 parent 1f22a34 commit 7347285

File tree

4 files changed

+42
-8
lines changed

4 files changed

+42
-8
lines changed

.flake8

Lines changed: 0 additions & 2 deletions
This file was deleted.

.pre-commit-config.yaml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,18 @@ repos:
1313
- id: requirements-txt-fixer
1414
- id: trailing-whitespace
1515

16-
- repo: https://github.com/PyCQA/flake8
17-
rev: 6.0.0
16+
- repo: https://github.com/charliermarsh/ruff-pre-commit
17+
rev: "v0.0.253"
1818
hooks:
19-
- id: flake8
20-
additional_dependencies: [flake8-bugbear]
19+
- id: ruff
20+
args: ["--fix", "--show-fixes"]
21+
22+
- repo: https://github.com/psf/black
23+
rev: "23.1.0"
24+
hooks:
25+
- id: black
26+
27+
- repo: https://github.com/codespell-project/codespell
28+
rev: "v2.2.2"
29+
hooks:
30+
- id: codespell

.ruff.toml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
select = [
2+
"E", "F", "W", # flake8
3+
"B", # flake8-bugbear
4+
"I", # isort
5+
"ARG", # flake8-unused-arguments
6+
"C4", # flake8-comprehensions
7+
"ICN", # flake8-import-conventions
8+
"ISC", # flake8-implicit-str-concat
9+
"G", # flake8-logging-format
10+
"PGH", # pygrep-hooks
11+
"PIE", # flake8-pie
12+
"PL", # pylint
13+
"PTH", # flake8-use-pathlib
14+
"RET", # flake8-return
15+
"RUF", # Ruff-specific
16+
"SIM", # flake8-simplify
17+
"UP", # pyupgrade
18+
"YTT", # flake8-2020
19+
"EXE", # flake8-executable
20+
"NPY", # NumPy specific rules
21+
"PD", # pandas-vet
22+
]
23+
extend-ignore = [
24+
"PLR", # Design related pylint codes
25+
]
26+
line-length = 120
27+
flake8-unused-arguments.ignore-variadic-names = true

noxfile.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22

33
import nox
44

5-
65
hello_list = ["hello-pure", "hello-cpp", "hello-pybind11", "hello-cython"]
76
if not sys.platform.startswith("win"):
87
hello_list.append("hello-cmake-package")
9-
long_hello_list = hello_list + ["pen2-cython", "core-c-hello", "core-pybind11-hello"]
8+
long_hello_list = [*hello_list, "pen2-cython", "core-c-hello", "core-pybind11-hello"]
109

1110

1211
@nox.session

0 commit comments

Comments
 (0)