File tree Expand file tree Collapse file tree 4 files changed +18
-18
lines changed Expand file tree Collapse file tree 4 files changed +18
-18
lines changed Original file line number Diff line number Diff line change @@ -25,27 +25,27 @@ repos:
25
25
26
26
# Clang format the codebase automatically
27
27
- repo : https://github.com/pre-commit/mirrors-clang-format
28
- rev : " v16 .0.6 "
28
+ rev : " v17 .0.3 "
29
29
hooks :
30
30
- id : clang-format
31
31
types_or : [c++, c, cuda]
32
32
33
33
# Black, the code formatter, natively supports pre-commit
34
34
- repo : https://github.com/psf/black-pre-commit-mirror
35
- rev : " 23.9 .1" # Keep in sync with blacken-docs
35
+ rev : " 23.10 .1" # Keep in sync with blacken-docs
36
36
hooks :
37
37
- id : black
38
38
39
39
# Ruff, the Python auto-correcting linter written in Rust
40
40
- repo : https://github.com/astral-sh/ruff-pre-commit
41
- rev : v0.0.292
41
+ rev : v0.1.2
42
42
hooks :
43
43
- id : ruff
44
44
args : ["--fix", "--show-fixes"]
45
45
46
46
# Check static types with mypy
47
47
- repo : https://github.com/pre-commit/mirrors-mypy
48
- rev : " v1.5 .1"
48
+ rev : " v1.6 .1"
49
49
hooks :
50
50
- id : mypy
51
51
args : []
67
67
68
68
# Standard hooks
69
69
- repo : https://github.com/pre-commit/pre-commit-hooks
70
- rev : " v4.4 .0"
70
+ rev : " v4.5 .0"
71
71
hooks :
72
72
- id : check-added-large-files
73
73
- id : check-case-conflict
98
98
99
99
# Avoid directional quotes
100
100
- repo : https://github.com/sirosen/texthooks
101
- rev : " 0.5.0 "
101
+ rev : " 0.6.2 "
102
102
hooks :
103
103
- id : fix-ligatures
104
104
- id : fix-smartquotes
@@ -147,7 +147,7 @@ repos:
147
147
148
148
# PyLint has native support - not always usable, but works for us
149
149
- repo : https://github.com/PyCQA/pylint
150
- rev : " v3.0.0 "
150
+ rev : " v3.0.1 "
151
151
hooks :
152
152
- id : pylint
153
153
files : ^pybind11
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ ignore = [
19
19
20
20
[tool .mypy ]
21
21
files = [" pybind11" ]
22
- python_version = " 3.6 "
22
+ python_version = " 3.7 "
23
23
strict = true
24
24
show_error_codes = true
25
25
enable_error_code = [" ignore-without-code" , " redundant-expr" , " truthy-bool" ]
@@ -57,10 +57,13 @@ messages_control.disable = [
57
57
" unused-argument" , # covered by Ruff ARG
58
58
]
59
59
60
-
61
60
[tool .ruff ]
62
- select = [
63
- " E" , " F" , " W" , # flake8
61
+ target-version = " py37"
62
+ src = [" src" ]
63
+ line-length = 120
64
+
65
+ [tool .ruff .lint ]
66
+ extend-select = [
64
67
" B" , # flake8-bugbear
65
68
" I" , # isort
66
69
" N" , # pep8-naming
@@ -86,13 +89,10 @@ ignore = [
86
89
" PT004" , # Fixture that doesn't return needs underscore (no, it is fine)
87
90
" SIM118" , # iter(x) is not always the same as iter(x.keys())
88
91
]
89
- target-version = " py37"
90
- src = [" src" ]
91
92
unfixable = [" T20" ]
92
93
exclude = []
93
- line-length = 120
94
94
isort.known-first-party = [" env" , " pybind11_cross_module_tests" , " pybind11_tests" ]
95
95
96
- [tool .ruff .per-file-ignores ]
96
+ [tool .ruff .lint . per-file-ignores ]
97
97
"tests/**" = [" EM" , " N" , " E721" ]
98
98
"tests/test_call_policies.py" = [" PLC1901" ]
Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ py::array mkarray_via_buffer(size_t n) {
157
157
do { \
158
158
(s).bool_ = (i) % 2 != 0 ; \
159
159
(s).uint_ = (uint32_t ) (i); \
160
- (s).float_ = (float ) (i) *1 .5f ; \
160
+ (s).float_ = (float ) (i) * 1 .5f ; \
161
161
(s).ldbl_ = (long double ) (i) * -2 .5L ; \
162
162
} while (0 )
163
163
Original file line number Diff line number Diff line change @@ -662,8 +662,8 @@ TEST_SUBMODULE(pytypes, m) {
662
662
// This is "most correct" and enforced on these platforms.
663
663
# define PYBIND11_AUTO_IT auto it
664
664
#else
665
- // This works on many platforms and is (unfortunately) reflective of existing user code.
666
- // NOLINTNEXTLINE(bugprone-macro-parentheses)
665
+ // This works on many platforms and is (unfortunately) reflective of existing user code.
666
+ // NOLINTNEXTLINE(bugprone-macro-parentheses)
667
667
# define PYBIND11_AUTO_IT auto &it
668
668
#endif
669
669
You can’t perform that action at this time.
0 commit comments