From 0b3f44ebdfd9bdb8dface02ffa0dbde0e29ad542 Mon Sep 17 00:00:00 2001 From: Unknown Date: Wed, 1 Nov 2017 21:08:06 -0400 Subject: [PATCH] Trivial typos Non-user facing. Found using `codespell -q 3` --- docs/advanced/cast/eigen.rst | 6 +++--- docs/advanced/functions.rst | 2 +- include/pybind11/detail/common.h | 2 +- setup.cfg | 2 +- tests/test_factory_constructors.cpp | 2 +- tests/test_virtual_functions.cpp | 2 +- tests/test_virtual_functions.py | 2 +- tools/check-style.sh | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/advanced/cast/eigen.rst b/docs/advanced/cast/eigen.rst index acdb51de6..9c7cbd22c 100644 --- a/docs/advanced/cast/eigen.rst +++ b/docs/advanced/cast/eigen.rst @@ -41,7 +41,7 @@ consideration: by default, numpy matrices and eigen matrices are *not* storage compatible. If the numpy matrix cannot be used as is (either because its types differ, e.g. -passing an array of integers to an Eigen paramater requiring doubles, or +passing an array of integers to an Eigen parameter requiring doubles, or because the storage is incompatible), pybind11 makes a temporary copy and passes the copy instead. @@ -89,7 +89,7 @@ as dictated by the binding function's return value policy (see the documentation on :ref:`return_value_policies` for full details). That means, without an explicit return value policy, lvalue references will be copied and pointers will be managed by pybind11. In order to avoid copying, you should -explictly specify an appropriate return value policy, as in the following +explicitly specify an appropriate return value policy, as in the following example: .. code-block:: cpp @@ -287,7 +287,7 @@ On the other hand, pybind11 allows you to pass 1-dimensional arrays of length N as Eigen parameters. If the Eigen type can hold a column vector of length N it will be passed as such a column vector. If not, but the Eigen type constraints will accept a row vector, it will be passed as a row vector. (The column -vector takes precendence when both are supported, for example, when passing a +vector takes precedence when both are supported, for example, when passing a 1D numpy array to a MatrixXd argument). Note that the type need not be expicitly a vector: it is permitted to pass a 1D numpy array of size 5 to an Eigen ``Matrix``: you would end up with a 1x5 Eigen matrix. diff --git a/docs/advanced/functions.rst b/docs/advanced/functions.rst index c7892b5d3..3420c5ec3 100644 --- a/docs/advanced/functions.rst +++ b/docs/advanced/functions.rst @@ -473,7 +473,7 @@ Overload resolution order When a function or method with multiple overloads is called from Python, pybind11 determines which overload to call in two passes. The first pass attempts to call each overload without allowing argument conversion (as if -every argument had been specified as ``py::arg().noconvert()`` as decribed +every argument had been specified as ``py::arg().noconvert()`` as described above). If no overload succeeds in the no-conversion first pass, a second pass is diff --git a/include/pybind11/detail/common.h b/include/pybind11/detail/common.h index 784bfbac6..1da36bf32 100644 --- a/include/pybind11/detail/common.h +++ b/include/pybind11/detail/common.h @@ -471,7 +471,7 @@ template struct select_indices_i : select_indices_impl, index_sequence>, I + 1, Bs...> {}; template using select_indices = typename select_indices_impl, 0, Bs...>::type; -/// Backports of std::bool_constant and std::negation to accomodate older compilers +/// Backports of std::bool_constant and std::negation to accommodate older compilers template using bool_constant = std::integral_constant; template struct negation : bool_constant { }; diff --git a/setup.cfg b/setup.cfg index 9e5e88d82..369788b28 100644 --- a/setup.cfg +++ b/setup.cfg @@ -6,5 +6,5 @@ max-line-length = 99 show_source = True exclude = .git, __pycache__, build, dist, docs, tools, venv ignore = - # required for pretty matrix formating: multiple spaces after `,` and `[` + # required for pretty matrix formatting: multiple spaces after `,` and `[` E201, E241 diff --git a/tests/test_factory_constructors.cpp b/tests/test_factory_constructors.cpp index fb33377b2..687a5bf43 100644 --- a/tests/test_factory_constructors.cpp +++ b/tests/test_factory_constructors.cpp @@ -13,7 +13,7 @@ #include // Classes for testing python construction via C++ factory function: -// Not publically constructible, copyable, or movable: +// Not publicly constructible, copyable, or movable: class TestFactory1 { friend class TestFactoryHelper; TestFactory1() : value("(empty)") { print_default_created(this); } diff --git a/tests/test_virtual_functions.cpp b/tests/test_virtual_functions.cpp index 953b390b8..336f5e45c 100644 --- a/tests/test_virtual_functions.cpp +++ b/tests/test_virtual_functions.cpp @@ -249,7 +249,7 @@ TEST_SUBMODULE(virtual_functions, m) { m.def("dispatch_issue_go", [](const Base * b) { return b->dispatch(); }); // test_override_ref - // #392/397: overridding reference-returning functions + // #392/397: overriding reference-returning functions class OverrideTest { public: struct A { std::string value = "hi"; }; diff --git a/tests/test_virtual_functions.py b/tests/test_virtual_functions.py index b91ebfa3e..2a92476f9 100644 --- a/tests/test_virtual_functions.py +++ b/tests/test_virtual_functions.py @@ -227,7 +227,7 @@ def test_dispatch_issue(msg): def test_override_ref(): - """#392/397: overridding reference-returning functions""" + """#392/397: overriding reference-returning functions""" o = m.OverrideTest("asdf") # Not allowed (see associated .cpp comment) diff --git a/tools/check-style.sh b/tools/check-style.sh index a9eeb170b..0a9f7d24f 100755 --- a/tools/check-style.sh +++ b/tools/check-style.sh @@ -10,7 +10,7 @@ # 4. missing space between keyword and parenthesis, e.g.: for(, if(, while( # 5. Missing space between right parenthesis and brace, e.g. 'for (...){' # 6. opening brace on its own line. It should always be on the same line as the -# if/while/for/do statment. +# if/while/for/do statement. # # Invoke as: tools/check-style.sh #