From 5366b051d7e4a750d2035c03b12f0ff1f06e61b3 Mon Sep 17 00:00:00 2001 From: Xuehai Pan Date: Sun, 10 Nov 2024 14:01:42 +0800 Subject: [PATCH] style: fix nit suggestions --- include/pybind11/pybind11.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/pybind11/pybind11.h b/include/pybind11/pybind11.h index 8eb23c6b92..f6ce716529 100644 --- a/include/pybind11/pybind11.h +++ b/include/pybind11/pybind11.h @@ -302,7 +302,7 @@ class cpp_function : public function { has_pos_only_args = any_of...>::value, has_arg_annotations = any_of...>::value; constexpr bool has_is_method = any_of...>::value; - // The implicit `self` argument is not present and counted in method definitions. + // The implicit `self` argument is not present and not counted in method definitions. constexpr bool has_args = cast_in::args_pos >= 0; constexpr bool is_method_with_self_arg_only = has_is_method && !has_args; static_assert(has_arg_annotations || !has_kw_only_args, @@ -312,7 +312,7 @@ class cpp_function : public function { || (/* Allow methods with no arguments `def method(self, /): ...`. * A method has at least one argument `self`. There can be no * `py::arg` annotation. E.g. `class.def("method", py::pos_only())`. - * */ + */ is_method_with_self_arg_only)) || !has_pos_only_args, "py::pos_only requires the use of argument annotations (for docstrings "