codespell fixes and adding .codespell-ignorelines

This commit is contained in:
Ralf W. Grosse-Kunstleve 2021-07-06 14:31:18 -07:00
parent 704daac879
commit 00b0365ca3
5 changed files with 18 additions and 4 deletions

13
.codespell-ignorelines Normal file
View File

@ -0,0 +1,13 @@
assert m.atyp_valu().get_mtxt() == "Valu"
atyp_valu rtrn_valu() { atyp_valu obj{"Valu"}; return obj; }
indestructible_int(int v) : valu{v} {}
int valu;
movable_int(int v) : valu{v} {}
(m.pass_valu, "Valu", "pass_valu:Valu(_MvCtor)*_CpCtor"),
other.valu = 91;
REQUIRE(hld.as_raw_ptr_unowned<zombie>()->valu == 19);
REQUIRE(orig.valu == 91);
REQUIRE(othr.valu == 19);
valu = other.valu;
with pytest.raises(ValueError) as excinfo:
with pytest.raises(ValueError) as exc_info:

View File

@ -92,7 +92,8 @@ repos:
entry: codespell entry: codespell
language: python language: python
types: [text] types: [text]
args: ["-q", "3", "--skip", "*.supp", "-L", "nd,ot,thist,readded"] args: ["-q", "3", "--skip", "*.supp", "-L", "nd,ot,thist,readded",
"--exclude-file", ".codespell-ignorelines"]
# The original pybind11 checks for a few C++ style items # The original pybind11 checks for a few C++ style items
- repo: local - repo: local

View File

@ -32,7 +32,7 @@ Details:
* If created from a raw pointer, or a `unique_ptr` without a custom deleter, * If created from a raw pointer, or a `unique_ptr` without a custom deleter,
`vptr` always uses a custom deleter, to support `unique_ptr`-like disowning. `vptr` always uses a custom deleter, to support `unique_ptr`-like disowning.
The custom deleters could be extended to included life-time managment for The custom deleters could be extended to included life-time management for
external objects (e.g. `PyObject`). external objects (e.g. `PyObject`).
* If created from an external `shared_ptr`, or a `unique_ptr` with a custom * If created from an external `shared_ptr`, or a `unique_ptr` with a custom

View File

@ -278,7 +278,7 @@ struct smart_holder_type_caster_class_hooks : smart_holder_type_caster_base_tag
} }
// Adopting existing approach used by type_caster_base, although it leads to somewhat fuzzy // Adopting existing approach used by type_caster_base, although it leads to somewhat fuzzy
// ownership semantics: if we deteced via shared_from_this that a shared_ptr exists already, it // ownership semantics: if we detected via shared_from_this that a shared_ptr exists already, it
// is reused, irrespective of the return_value_policy in effect. // is reused, irrespective of the return_value_policy in effect.
// "SomeBaseOfWrappedType" is needed because std::enable_shared_from_this is not necessarily a // "SomeBaseOfWrappedType" is needed because std::enable_shared_from_this is not necessarily a
// direct base of WrappedType. // direct base of WrappedType.

View File

@ -95,7 +95,7 @@ def test_release_and_stash_leak():
def test_release_and_stash_via_shared_from_this(): def test_release_and_stash_via_shared_from_this():
# Exercises that the smart_holder vptr is invisible to the shared_from_this mechnism. # Exercises that the smart_holder vptr is invisible to the shared_from_this mechanism.
obj = PySft("PySft") obj = PySft("PySft")
stash1 = m.SftSharedPtrStash(1) stash1 = m.SftSharedPtrStash(1)
with pytest.raises(RuntimeError) as exc_info: with pytest.raises(RuntimeError) as exc_info: