Skip to content

Commit 0a08801

Browse files
committed
Fix pre-commit issues
1 parent d88a14b commit 0a08801

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

include/pybind11/detail/internals.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ struct pymb_binding;
2828
struct pymb_framework;
2929
struct pymb_registry;
3030

31+
3132
/// Tracks the `internals` and `type_info` ABI version independent of the main library version.
3233
///
3334
/// Some portions of the code use an ABI that is conditional depending on this

include/pybind11/detail/type_caster_base.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1372,7 +1372,7 @@ class type_caster_generic {
13721372
if (convert) {
13731373
for (const auto &converter : typeinfo->implicit_conversions) {
13741374
auto temp = reinterpret_steal<object>(converter(src.ptr(), typeinfo->type));
1375-
if (load_impl<ThisT>(temp, false)) {
1375+
if (load_impl<ThisT>(temp, false)) { // codespell:ignore ThisT
13761376
loader_life_support::add_patient(temp);
13771377
return true;
13781378
}

tests/test_interop.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
# Copyright (c) 2025 The pybind Community.
2-
from __future__ import annotations
1+
# Copyright (c) 2025 The pybind from __future__ import annotations
32

43
import collections
54
import gc
@@ -40,7 +39,7 @@ def delattr_and_ensure_destroyed(*specs):
4039
wrs.append(weakref.ref(getattr(mod, name)))
4140
delattr(mod, name)
4241

43-
for attempt in range(5):
42+
for _ in range(5):
4443
gc.collect()
4544
if all(wr() is None for wr in wrs):
4645
break
@@ -141,7 +140,7 @@ def expect(from_mod, to_mod, pattern, **extra):
141140
elif pattern == "none":
142141
expected = {"value": None, "sp": None, "up": None, "enum": None}
143142
else:
144-
assert False, "unknown pattern"
143+
pytest.fail("unknown pattern")
145144
expected.update(extra)
146145
assert outcomes == expected
147146

0 commit comments

Comments
 (0)