chore: also use typos (#5931)

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: Ralf W. Grosse-Kunstleve <rgrossekunst@nvidia.com>
This commit is contained in:
Henry Schreiner
2025-12-13 05:17:08 -05:00
committed by GitHub
parent 41a4d0c4b6
commit 1006933415
7 changed files with 39 additions and 9 deletions

View File

@@ -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

View File

@@ -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"

View File

@@ -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

View File

@@ -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
@@ -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`.

View File

@@ -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"

View File

@@ -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

View File

@@ -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"