Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ The valid options are:
* Use `cmake --build build -j12` to build with 12 cores (for example).
* Use `-G` and the name of a generator to use something different. `cmake
--help` lists the generators available.
- On Unix, setting `CMAKE_GENERATER=Ninja` in your environment will give
- On Unix, setting `CMAKE_GENERATOR=Ninja` in your environment will give
you automatic multithreading on all your CMake projects!
* Open the `CMakeLists.txt` with QtCreator to generate for that IDE.
* You can use `-DCMAKE_EXPORT_COMPILE_COMMANDS=ON` to generate the `.json` file
Expand Down
9 changes: 8 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,16 @@ repos:
rev: "v2.4.1"
hooks:
- id: codespell
exclude: ".supp$"
exclude: "(.supp|^pyproject.toml)$"
args: ["-x.codespell-ignore-lines", "-Lccompiler,intstruct"]

# Also check spelling
- repo: https://github.com/crate-ci/typos
rev: v1.40.0
hooks:
- id: typos
args: []

# Check for common shell mistakes
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: "v0.11.0.1"
Expand Down
2 changes: 1 addition & 1 deletion docs/advanced/embedding.rst
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ Activating a Sub-interpreter

Once a sub-interpreter is created, you can "activate" it on a thread (and
acquire its GIL) by creating a :class:`subinterpreter_scoped_activate`
instance and passing it the sub-intepreter to be activated. The function
instance and passing it the sub-interpreter to be activated. The function
will acquire the sub-interpreter's GIL and make the sub-interpreter the
current active interpreter on the current thread for the lifetime of the
instance. When the :class:`subinterpreter_scoped_activate` instance goes out
Expand Down
4 changes: 2 additions & 2 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ New Features:
[#5665](https://github.com/pybind/pybind11/pull/5665) and consolidate code
[#5670](https://github.com/pybind/pybind11/pull/5670).

- Added API in `pybind11/subinterpreter.h` for embedding sub-intepreters (requires Python 3.12+).
- Added API in `pybind11/subinterpreter.h` for embedding sub-interpreters (requires Python 3.12+).
[#5666](https://github.com/pybind/pybind11/pull/5666)

- `py::native_enum` was added, for conversions between Python's native
Expand Down Expand Up @@ -1213,7 +1213,7 @@ Performance and style:
- Optimize Eigen sparse matrix casting by removing unnecessary
temporary. [#4064](https://github.com/pybind/pybind11/pull/4064)
- Avoid potential implicit copy/assignment constructors causing double
free in `strdup_gaurd`.
free in `strdup_guard`.
[#3905](https://github.com/pybind/pybind11/pull/3905)
- Enable clang-tidy checks `misc-definitions-in-headers`,
`modernize-loop-convert`, and `modernize-use-nullptr`.
Expand Down
23 changes: 23 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -184,3 +184,26 @@ isort.required-imports = ["from __future__ import annotations"]

[tool.repo-review]
ignore = ["PP"]

[tool.typos]
files.extend-exclude = ["/cpython"]

[tool.typos.default.extend-identifiers]
ser_no = "ser_no"
SerNo = "SerNo"
StrLits = "StrLits"

[tool.typos.default.extend-words]
nd = "nd"
valu = "valu"
fo = "fo"
quater = "quater"
optin = "optin"
othr = "othr"

#[tool.typos.type.cpp.extend-words]
setp = "setp"
ot = "ot"

[tool.typos.type.json.extend-words]
ba = "ba"
6 changes: 3 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,10 +304,10 @@ def backport_typehints() -> Callable[[SanitizedString], SanitizedString]:
if sys.version_info < (3, 10):
d["typing_extensions.TypeGuard"] = "typing.TypeGuard"

def backport(sanatized_string: SanitizedString) -> SanitizedString:
def backport(sanitized_string: SanitizedString) -> SanitizedString:
for old, new in d.items():
sanatized_string.string = sanatized_string.string.replace(old, new)
sanitized_string.string = sanitized_string.string.replace(old, new)

return sanatized_string
return sanitized_string

return backport
2 changes: 1 addition & 1 deletion tests/test_docstring_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def test_docstring_options():
assert not m.DocstringTestFoo.__doc__
assert not m.DocstringTestFoo.value_prop.__doc__

# Check existig behaviour of enum docstings
# Check existing behaviour of enum docstings
assert (
m.DocstringTestEnum1.__doc__
== "Enum docstring\n\nMembers:\n\n Member1\n\n Member2"
Expand Down
Loading