From d02f219fb9b9012ce7b27f34c5ee9feb55da08ec Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 19 Sep 2022 21:11:57 -0400 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate (#4189) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/asottile/pyupgrade: v2.37.3 → v2.38.0](https://github.com/asottile/pyupgrade/compare/v2.37.3...v2.38.0) - [github.com/PyCQA/pylint: v2.15.2 → v2.15.3](https://github.com/PyCQA/pylint/compare/v2.15.2...v2.15.3) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5d794a749..508b3ea6e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -35,7 +35,7 @@ repos: # Upgrade old Python syntax - repo: https://github.com/asottile/pyupgrade - rev: "v2.37.3" + rev: "v2.38.0" hooks: - id: pyupgrade args: [--py36-plus] @@ -110,7 +110,7 @@ repos: # PyLint has native support - not always usable, but works for us - repo: https://github.com/PyCQA/pylint - rev: "v2.15.2" + rev: "v2.15.3" hooks: - id: pylint files: ^pybind11 From 424ac4fe1bde46894a56775e78a702199a03137b Mon Sep 17 00:00:00 2001 From: Jan Iwaszkiewicz Date: Tue, 20 Sep 2022 19:03:57 +0200 Subject: [PATCH 2/2] fix: Windows compiler, missing object initializer (#4188) * Fix for windows compiler, missing object initializer * Removal of if-else macro for MSVC --- include/pybind11/detail/common.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/include/pybind11/detail/common.h b/include/pybind11/detail/common.h index 9e6947daa..6da7ef859 100644 --- a/include/pybind11/detail/common.h +++ b/include/pybind11/detail/common.h @@ -1033,12 +1033,7 @@ PYBIND11_NAMESPACE_END(detail) /// - regular: static_cast(&Class::func) /// - sweet: overload_cast(&Class::func) template -# if (defined(_MSC_VER) && _MSC_VER < 1920) /* MSVC 2017 */ \ - || (defined(__clang__) && __clang_major__ == 5) -static constexpr detail::overload_cast_impl overload_cast = {}; -# else -static constexpr detail::overload_cast_impl overload_cast; -# endif +static constexpr detail::overload_cast_impl overload_cast{}; #endif /// Const member function selector for overload_cast