Skip to content

Commit bc9bf7f

Browse files
Skylion007henryiii
authored andcommitted
Ban smartquotes
1 parent b421420 commit bc9bf7f

File tree

7 files changed

+33
-27
lines changed

7 files changed

+33
-27
lines changed

.github/CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,15 @@ Tips:
9696
* You can use `virtualenv` (faster, from PyPI) instead of `venv`
9797
* You can select any name for your environment folder; if it contains "env" it
9898
will be ignored by git.
99-
* If you dont have CMake 3.14+, just add "cmake" to the pip install command.
99+
* If you don't have CMake 3.14+, just add "cmake" to the pip install command.
100100
* You can use `-DPYBIND11_FINDPYTHON=ON` to use FindPython on CMake 3.12+
101101
* In classic mode, you may need to set `-DPYTHON_EXECUTABLE=/path/to/python`.
102102
FindPython uses `-DPython_ROOT_DIR=/path/to` or
103103
`-DPython_EXECUTABLE=/path/to/python`.
104104

105105
### Configuration options
106106

107-
In CMake, configuration options are given with “-D”. Options are stored in the
107+
In CMake, configuration options are given with "-D". Options are stored in the
108108
build directory, in the `CMakeCache.txt` file, so they are remembered for each
109109
build directory. Two selections are special - the generator, given with `-G`,
110110
and the compiler, which is selected based on environment variables `CXX` and
@@ -114,7 +114,7 @@ after the initial run.
114114
The valid options are:
115115

116116
* `-DCMAKE_BUILD_TYPE`: Release, Debug, MinSizeRel, RelWithDebInfo
117-
* `-DPYBIND11_FINDPYTHON=ON`: Use CMake 3.12+s FindPython instead of the
117+
* `-DPYBIND11_FINDPYTHON=ON`: Use CMake 3.12+'s FindPython instead of the
118118
classic, deprecated, custom FindPythonLibs
119119
* `-DPYBIND11_NOPYTHON=ON`: Disable all Python searching (disables tests)
120120
* `-DBUILD_TESTING=ON`: Enable the tests

.pre-commit-config.yaml

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
repos:
1616
# Standard hooks
1717
- repo: https://github.com/pre-commit/pre-commit-hooks
18-
rev: v4.1.0
18+
rev: "v4.1.0"
1919
hooks:
2020
- id: check-added-large-files
2121
- id: check-case-conflict
@@ -32,46 +32,52 @@ repos:
3232

3333
# Upgrade old Python syntax
3434
- repo: https://github.com/asottile/pyupgrade
35-
rev: v2.31.0
35+
rev: "v2.31.0"
3636
hooks:
3737
- id: pyupgrade
3838
args: [--py36-plus]
3939

4040
# Nicely sort includes
4141
- repo: https://github.com/PyCQA/isort
42-
rev: 5.10.1
42+
rev: "5.10.1"
4343
hooks:
4444
- id: isort
4545

4646
# Black, the code formatter, natively supports pre-commit
4747
- repo: https://github.com/psf/black
48-
rev: 22.1.0 # Keep in sync with blacken-docs
48+
rev: "22.1.0" # Keep in sync with blacken-docs
4949
hooks:
5050
- id: black
5151

5252
# Also code format the docs
5353
- repo: https://github.com/asottile/blacken-docs
54-
rev: v1.12.1
54+
rev: "v1.12.1"
5555
hooks:
5656
- id: blacken-docs
5757
additional_dependencies:
5858
- black==22.1.0 # keep in sync with black hook
5959

6060
# Changes tabs to spaces
6161
- repo: https://github.com/Lucas-C/pre-commit-hooks
62-
rev: v1.1.11
62+
rev: "v1.1.11"
6363
hooks:
6464
- id: remove-tabs
6565

66+
- repo: https://github.com/sirosen/texthooks
67+
rev: "0.2.2"
68+
hooks:
69+
- id: fix-ligatures
70+
- id: fix-smartquotes
71+
6672
# Autoremoves unused imports
6773
- repo: https://github.com/hadialqattan/pycln
68-
rev: v1.1.0
74+
rev: "v1.1.0"
6975
hooks:
7076
- id: pycln
7177

7278
# Checking for common mistakes
7379
- repo: https://github.com/pre-commit/pygrep-hooks
74-
rev: v1.9.0
80+
rev: "v1.9.0"
7581
hooks:
7682
- id: python-check-blanket-noqa
7783
- id: python-check-blanket-type-ignore
@@ -83,7 +89,7 @@ repos:
8389

8490
# Flake8 also supports pre-commit natively (same author)
8591
- repo: https://github.com/PyCQA/flake8
86-
rev: 4.0.1
92+
rev: "4.0.1"
8793
hooks:
8894
- id: flake8
8995
additional_dependencies: &flake8_dependencies
@@ -93,14 +99,14 @@ repos:
9399

94100
# Automatically remove noqa that are not used
95101
- repo: https://github.com/asottile/yesqa
96-
rev: v1.3.0
102+
rev: "v1.3.0"
97103
hooks:
98104
- id: yesqa
99105
additional_dependencies: *flake8_dependencies
100106

101107
# CMake formatting
102108
- repo: https://github.com/cheshirekow/cmake-format-precommit
103-
rev: v0.6.13
109+
rev: "v0.6.13"
104110
hooks:
105111
- id: cmake-format
106112
additional_dependencies: [pyyaml]
@@ -109,7 +115,7 @@ repos:
109115

110116
# Check static types with mypy
111117
- repo: https://github.com/pre-commit/mirrors-mypy
112-
rev: v0.931
118+
rev: "v0.931"
113119
hooks:
114120
- id: mypy
115121
args: [--show-error-codes]
@@ -127,15 +133,15 @@ repos:
127133

128134
# Check for spelling
129135
- repo: https://github.com/codespell-project/codespell
130-
rev: v2.1.0
136+
rev: "v2.1.0"
131137
hooks:
132138
- id: codespell
133139
exclude: ".supp$"
134140
args: ["-L", "nd,ot,thist"]
135141

136142
# Check for common shell mistakes
137143
- repo: https://github.com/shellcheck-py/shellcheck-py
138-
rev: v0.8.0.4
144+
rev: "v0.8.0.4"
139145
hooks:
140146
- id: shellcheck
141147

README.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ this heavy machinery has become an excessively large and unnecessary
3232
dependency.
3333

3434
Think of this library as a tiny self-contained version of Boost.Python
35-
with everything stripped away that isnt relevant for binding
35+
with everything stripped away that isn't relevant for binding
3636
generation. Without comments, the core header files only require ~4K
3737
lines of code and depend on Python (3.6+, or PyPy) and the C++
3838
standard library. This compact implementation was possible thanks to
@@ -88,8 +88,8 @@ goodies:
8888
- pybind11 uses C++11 move constructors and move assignment operators
8989
whenever possible to efficiently transfer custom data types.
9090

91-
- Its easy to expose the internal storage of custom data types through
92-
Pythons buffer protocols. This is handy e.g. for fast conversion
91+
- It's easy to expose the internal storage of custom data types through
92+
Pythons' buffer protocols. This is handy e.g. for fast conversion
9393
between C++ matrix classes like Eigen and NumPy without expensive
9494
copy operations.
9595

@@ -119,7 +119,7 @@ goodies:
119119
Supported compilers
120120
-------------------
121121

122-
1. Clang/LLVM 3.3 or newer (for Apple Xcodes clang, this is 5.0.0 or
122+
1. Clang/LLVM 3.3 or newer (for Apple Xcode's clang, this is 5.0.0 or
123123
newer)
124124
2. GCC 4.8 or newer
125125
3. Microsoft Visual Studio 2015 Update 3 or newer

docs/changelog.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ Packaging / building improvements:
800800
`#2338 <https://github.com/pybind/pybind11/pull/2338>`_ and
801801
`#2370 <https://github.com/pybind/pybind11/pull/2370>`_
802802

803-
* Full integration with CMakes C++ standard system and compile features
803+
* Full integration with CMake's C++ standard system and compile features
804804
replaces ``PYBIND11_CPP_STANDARD``.
805805

806806
* Generated config file is now portable to different Python/compiler/CMake

docs/faq.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ using C++14 template metaprogramming.
145145

146146
.. _`faq:hidden_visibility`:
147147

148-
"SomeClass declared with greater visibility than the type of its field SomeClass::member [-Wattributes]"
148+
"'SomeClass' declared with greater visibility than the type of its field 'SomeClass::member' [-Wattributes]"
149149
============================================================================================================
150150

151151
This error typically indicates that you are compiling without the required

docs/upgrade.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ include a declaration of the form:
524524
525525
PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr<T>)
526526
527-
Continuing to do so wont cause an error or even a deprecation warning,
527+
Continuing to do so won't cause an error or even a deprecation warning,
528528
but it's completely redundant.
529529

530530

include/pybind11/detail/common.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ enum class return_value_policy : uint8_t {
430430

431431
/** Reference an existing object (i.e. do not create a new copy) and take
432432
ownership. Python will call the destructor and delete operator when the
433-
objects reference count reaches zero. Undefined behavior ensues when
433+
object's reference count reaches zero. Undefined behavior ensues when
434434
the C++ side does the same.. */
435435
take_ownership,
436436

@@ -446,7 +446,7 @@ enum class return_value_policy : uint8_t {
446446
move,
447447

448448
/** Reference an existing object, but do not take ownership. The C++ side
449-
is responsible for managing the objects lifetime and deallocating it
449+
is responsible for managing the object's lifetime and deallocating it
450450
when it is no longer used. Warning: undefined behavior will ensue when
451451
the C++ side deletes an object that is still referenced and used by
452452
Python. */
@@ -455,7 +455,7 @@ enum class return_value_policy : uint8_t {
455455
/** This policy only applies to methods and properties. It references the
456456
object without taking ownership similar to the above
457457
return_value_policy::reference policy. In contrast to that policy, the
458-
function or propertys implicit this argument (called the parent) is
458+
function or property's implicit this argument (called the parent) is
459459
considered to be the the owner of the return value (the child).
460460
pybind11 then couples the lifetime of the parent to the child via a
461461
reference relationship that ensures that the parent cannot be garbage

0 commit comments

Comments
 (0)