File tree Expand file tree Collapse file tree 4 files changed +12
-16
lines changed Expand file tree Collapse file tree 4 files changed +12
-16
lines changed Original file line number Diff line number Diff line change @@ -33,19 +33,13 @@ repos:
33
33
- id : requirements-txt-fixer
34
34
- id : trailing-whitespace
35
35
36
- # Black, the code formatter, natively supports pre-commit
37
- - repo : https://github.com/psf/black-pre-commit-mirror
38
- rev : 23.9.1
39
- hooks :
40
- - id : black
41
- files : ^(docs)
42
-
43
36
# Lints code
44
37
- repo : https://github.com/astral-sh/ruff-pre-commit
45
- rev : " v0.0.292 "
38
+ rev : " v0.1.3 "
46
39
hooks :
47
40
- id : ruff
48
41
args : ["--fix", "--show-fixes"]
42
+ - id : ruff-format
49
43
50
44
# Changes tabs to spaces
51
45
- repo : https://github.com/Lucas-C/pre-commit-hooks
Original file line number Diff line number Diff line change @@ -5,19 +5,20 @@ requires = [
5
5
]
6
6
build-backend = " setuptools.build_meta"
7
7
8
+
8
9
[tool .cibuildwheel ]
9
10
test-command = " python {project}/tests/test.py"
10
11
test-skip = " *universal2:arm64"
11
12
13
+
12
14
[tool .ruff ]
15
+ target-version = " py37"
16
+
17
+ [tool .ruff .lint ]
13
18
extend-select = [
14
19
" B" , # flake8-bugbear
15
20
" I" , # isort
16
21
" PGH" , # pygrep-hooks
17
22
" RUF" , # Ruff-specific
18
23
" UP" , # pyupgrade
19
24
]
20
- extend-ignore = [
21
- " E501" , # Line too long
22
- ]
23
- target-version = " py37"
Original file line number Diff line number Diff line change 14
14
# reproducible builds (https://github.com/pybind/python_example/pull/53)
15
15
16
16
ext_modules = [
17
- Pybind11Extension ("python_example" ,
17
+ Pybind11Extension (
18
+ "python_example" ,
18
19
["src/main.cpp" ],
19
20
# Example: passing in the version to the compiled code
20
- define_macros = [( ' VERSION_INFO' , __version__ )],
21
- ),
21
+ define_macros = [( " VERSION_INFO" , __version__ )],
22
+ ),
22
23
]
23
24
24
25
setup (
Original file line number Diff line number Diff line change 1
1
import python_example as m
2
2
3
- assert m .__version__ == ' 0.0.1'
3
+ assert m .__version__ == " 0.0.1"
4
4
assert m .add (1 , 2 ) == 3
5
5
assert m .subtract (1 , 2 ) == - 1
You can’t perform that action at this time.
0 commit comments