Fixing merge conflict.

This commit is contained in:
Ralf W. Grosse-Kunstleve 2021-07-15 06:23:06 -07:00
commit 88546fff7d
5 changed files with 15 additions and 13 deletions

2
.gitignore vendored
View File

@ -41,3 +41,5 @@ pybind11Targets.cmake
/.vscode
/pybind11/include/*
/pybind11/share/*
/docs/_build/*
.ipynb_checkpoints/

View File

@ -94,13 +94,13 @@ repos:
rev: v2.1.0
hooks:
- id: codespell
name: codespell
description: Checks for common misspellings in text files.
entry: codespell
language: python
types: [text]
args: ["-q", "3", "--skip", "*.supp", "-L", "nd,ot,thist,readded",
"--exclude-file", ".codespell-ignorelines"]
exclude: ".supp$"
args: ["-L", "nd,ot,thist", "--exclude-file", ".codespell-ignorelines"]
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.7.2.1
hooks:
- id: shellcheck
# The original pybind11 checks for a few C++ style items
- repo: local
@ -108,7 +108,7 @@ repos:
- id: disallow-caps
name: Disallow improper capitalization
language: pygrep
entry: PyBind|Numpy|Cmake|CCache
entry: PyBind|Numpy|Cmake|CCache|PyTest
exclude: .pre-commit-config.yaml
- repo: local

View File

@ -226,7 +226,7 @@ Bug fixes:
* Fix ``py::gil_scoped_acquire`` assert with CPython 3.9 debug build.
`#2683 <https://github.com/pybind/pybind11/pull/2683>`_
* Fix issue with a test failing on PyTest 6.2.
* Fix issue with a test failing on pytest 6.2.
`#2741 <https://github.com/pybind/pybind11/pull/2741>`_
Warning fixes:

View File

@ -333,7 +333,7 @@ function(pybind11_enable_warnings target_name)
endif()
endif()
# Needs to be readded since the ordering requires these to be after the ones above
# Needs to be re-added since the ordering requires these to be after the ones above
if(CMAKE_CXX_STANDARD
AND CMAKE_CXX_COMPILER_ID MATCHES "Clang"
AND PYTHON_VERSION VERSION_LESS 3.0)

View File

@ -16,11 +16,11 @@ check_style_errors=0
IFS=$'\n'
found="$(grep '\<\(if\|for\|while\|catch\)(\|){' $@ -rn --color=always)"
found="$(grep '\<\(if\|for\|while\|catch\)(\|){' "$@" -rn --color=always)"
if [ -n "$found" ]; then
echo -e '\033[31;01mError: found the following coding style problems:\033[0m'
check_style_errors=1
echo "$found" | sed -e 's/^/ /'
echo "${found//^/ /}"
fi
found="$(awk '
@ -34,7 +34,7 @@ last && /^\s*{/ {
last=""
}
{ last = /(if|for|while|catch|switch)\s*\(.*\)\s*$/ ? $0 : "" }
' $(find include -type f) $@)"
' "$(find include -type f)" "$@")"
if [ -n "$found" ]; then
check_style_errors=1
echo -e '\033[31;01mError: braces should occur on the same line as the if/while/.. statement. Found issues in the following files:\033[0m'