ci: GHA basic format & pre-commit (#2309)
diff --git a/docs/advanced/cast/index.rst b/docs/advanced/cast/index.rst
index 54c1057..724585c 100644
--- a/docs/advanced/cast/index.rst
+++ b/docs/advanced/cast/index.rst
@@ -39,4 +39,3 @@
chrono
eigen
custom
-
diff --git a/docs/advanced/classes.rst b/docs/advanced/classes.rst
index b3da037..031484c 100644
--- a/docs/advanced/classes.rst
+++ b/docs/advanced/classes.rst
@@ -82,7 +82,7 @@
The macro :c:macro:`PYBIND11_OVERLOAD_PURE` should be used for pure virtual
functions, and :c:macro:`PYBIND11_OVERLOAD` should be used for functions which have
-a default implementation. There are also two alternate macros
+a default implementation. There are also two alternate macros
:c:macro:`PYBIND11_OVERLOAD_PURE_NAME` and :c:macro:`PYBIND11_OVERLOAD_NAME` which
take a string-valued name argument between the *Parent class* and *Name of the
function* slots, which defines the name of function in Python. This is required
@@ -1088,7 +1088,7 @@
Some classes may not be appropriate to inherit from. In C++11, classes can
use the ``final`` specifier to ensure that a class cannot be inherited from.
-The ``py::is_final`` attribute can be used to ensure that Python classes
+The ``py::is_final`` attribute can be used to ensure that Python classes
cannot inherit from a specified type. The underlying C++ type does not need
to be declared final.
diff --git a/docs/advanced/misc.rst b/docs/advanced/misc.rst
index 5b38ec7..7798462 100644
--- a/docs/advanced/misc.rst
+++ b/docs/advanced/misc.rst
@@ -218,7 +218,7 @@
Both approaches also expose a potentially dangerous ``_cleanup`` attribute in
Python, which may be undesirable from an API standpoint (a premature explicit
-call from Python might lead to undefined behavior). Yet another approach that
+call from Python might lead to undefined behavior). Yet another approach that
avoids this issue involves weak reference with a cleanup callback:
.. code-block:: cpp
@@ -283,9 +283,9 @@
----------
)mydelimiter");
-By default, pybind11 automatically generates and prepends a signature to the docstring of a function
+By default, pybind11 automatically generates and prepends a signature to the docstring of a function
registered with ``module::def()`` and ``class_::def()``. Sometimes this
-behavior is not desirable, because you want to provide your own signature or remove
+behavior is not desirable, because you want to provide your own signature or remove
the docstring completely to exclude the function from the Sphinx documentation.
The class ``options`` allows you to selectively suppress auto-generated signatures:
@@ -298,8 +298,8 @@
m.def("add", [](int a, int b) { return a + b; }, "A function which adds two numbers");
}
-Note that changes to the settings affect only function bindings created during the
-lifetime of the ``options`` instance. When it goes out of scope at the end of the module's init function,
+Note that changes to the settings affect only function bindings created during the
+lifetime of the ``options`` instance. When it goes out of scope at the end of the module's init function,
the default settings are restored to prevent unwanted side effects.
.. [#f4] http://www.sphinx-doc.org
diff --git a/docs/advanced/pycpp/object.rst b/docs/advanced/pycpp/object.rst
index 117131e..19a226a 100644
--- a/docs/advanced/pycpp/object.rst
+++ b/docs/advanced/pycpp/object.rst
@@ -60,7 +60,7 @@
Calling Python functions
========================
-It is also possible to call Python classes, functions and methods
+It is also possible to call Python classes, functions and methods
via ``operator()``.
.. code-block:: cpp
@@ -75,7 +75,7 @@
py::object makedirs = os.attr("makedirs");
makedirs("/tmp/path/to/somewhere");
-One can convert the result obtained from Python to a pure C++ version
+One can convert the result obtained from Python to a pure C++ version
if a ``py::class_`` or type conversion is defined.
.. code-block:: cpp
@@ -99,8 +99,8 @@
py::print(py::str(exp_pi));
In the example above ``pi.attr("exp")`` is a *bound method*: it will always call
-the method for that same instance of the class. Alternately one can create an
-*unbound method* via the Python class (instead of instance) and pass the ``self``
+the method for that same instance of the class. Alternately one can create an
+*unbound method* via the Python class (instead of instance) and pass the ``self``
object explicitly, followed by other arguments.
.. code-block:: cpp
diff --git a/docs/benchmark.py b/docs/benchmark.py
index 6dc0604..0234772 100644
--- a/docs/benchmark.py
+++ b/docs/benchmark.py
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
import random
import os
import time
diff --git a/docs/benchmark.rst b/docs/benchmark.rst
index 59d533d..02c2ccd 100644
--- a/docs/benchmark.rst
+++ b/docs/benchmark.rst
@@ -93,5 +93,3 @@
.. only:: latex
.. image:: pybind11_vs_boost_python2.png
-
-
diff --git a/docs/conf.py b/docs/conf.py
index 663a816..0946f30 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -130,8 +130,8 @@
else:
html_context = {
'css_files': [
- '//media.readthedocs.org/css/sphinx_rtd_theme.css',
- '//media.readthedocs.org/css/readthedocs-doc-embed.css',
+ '//media.readthedocs.org/css/sphinx_rtd_theme.css',
+ '//media.readthedocs.org/css/readthedocs-doc-embed.css',
'_static/theme_overrides.css'
]
}
diff --git a/docs/limitations.rst b/docs/limitations.rst
index a1a4f1a..59474f8 100644
--- a/docs/limitations.rst
+++ b/docs/limitations.rst
@@ -17,4 +17,3 @@
complexity. I've decided to draw the line here to keep this project simple and
compact. Users who absolutely require these features are encouraged to fork
pybind11.
-