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:
3333 - id : requirements-txt-fixer
3434 - id : trailing-whitespace
3535
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-
4336# Lints code
4437- repo : https://github.com/astral-sh/ruff-pre-commit
45- rev : " v0.0.292 "
38+ rev : " v0.1.3 "
4639 hooks :
4740 - id : ruff
4841 args : ["--fix", "--show-fixes"]
42+ - id : ruff-format
4943
5044# Changes tabs to spaces
5145- repo : https://github.com/Lucas-C/pre-commit-hooks
Original file line number Diff line number Diff line change @@ -5,19 +5,20 @@ requires = [
55]
66build-backend = " setuptools.build_meta"
77
8+
89[tool .cibuildwheel ]
910test-command = " python {project}/tests/test.py"
1011test-skip = " *universal2:arm64"
1112
13+
1214[tool .ruff ]
15+ target-version = " py37"
16+
17+ [tool .ruff .lint ]
1318extend-select = [
1419 " B" , # flake8-bugbear
1520 " I" , # isort
1621 " PGH" , # pygrep-hooks
1722 " RUF" , # Ruff-specific
1823 " UP" , # pyupgrade
1924]
20- extend-ignore = [
21- " E501" , # Line too long
22- ]
23- target-version = " py37"
Original file line number Diff line number Diff line change 1414# reproducible builds (https://github.com/pybind/python_example/pull/53)
1515
1616ext_modules = [
17- Pybind11Extension ("python_example" ,
17+ Pybind11Extension (
18+ "python_example" ,
1819 ["src/main.cpp" ],
1920 # Example: passing in the version to the compiled code
20- define_macros = [( ' VERSION_INFO' , __version__ )],
21- ),
21+ define_macros = [( " VERSION_INFO" , __version__ )],
22+ ),
2223]
2324
2425setup (
Original file line number Diff line number Diff line change 11import python_example as m
22
3- assert m .__version__ == ' 0.0.1'
3+ assert m .__version__ == " 0.0.1"
44assert m .add (1 , 2 ) == 3
55assert m .subtract (1 , 2 ) == - 1
You can’t perform that action at this time.
0 commit comments