Seamless operability between C++11 and Python
590 matches across 11 categories. Click a row to expand file-level details.
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tests/test_stl_binders.py | 198 | def test_map_string_double_const(): |
| LOW | tests/test_stl_binders.py | 211 | def test_noncopyable_containers(): |
| LOW | tests/test_methods_and_attributes.py | 29 | def test_methods_and_attributes(): |
| LOW | tests/test_methods_and_attributes.py | 274 | def test_property_return_value_policies(access): |
| LOW | tests/test_methods_and_attributes.py | 294 | def test_property_rvalue_policy(): |
| LOW | tests/test_methods_and_attributes.py | 388 | def test_dynamic_attr_dealloc_frees_dict_contents(): |
| LOW | tests/test_methods_and_attributes.py | 519 | def test_unregistered_base_implementations(): |
| LOW | tests/test_methods_and_attributes.py | 565 | def test_rvalue_ref_qualified_methods(): |
| LOW | tests/test_methods_and_attributes.py | 589 | def test_noexcept_rvalue_ref_qualified_methods(): |
| LOW | tests/test_methods_and_attributes.py | 603 | def test_noexcept_overload_cast(): |
| LOW | tests/test_methods_and_attributes.py | 621 | def test_ref_qualified_overload_cast(): |
| LOW | tests/test_methods_and_attributes.py | 645 | def test_noexcept_ref_qualified_overload_cast(): |
| LOW | tests/test_sequences_and_iterators.py | 19 | def test_slice_constructors_explicit_optional(): |
| LOW | tests/test_sequences_and_iterators.py | 24 | def test_generalized_iterators(): |
| LOW | tests/test_sequences_and_iterators.py | 56 | def test_generalized_iterators_simple(): |
| LOW | tests/test_sequences_and_iterators.py | 66 | def test_iterator_doc_annotations(): |
| LOW | tests/test_sequences_and_iterators.py | 83 | def test_iterator_referencing(): |
| LOW | tests/test_sequences_and_iterators.py | 235 | def test_python_iterator_in_cpp(): |
| LOW | tests/test_sequences_and_iterators.py | 267 | def test_iterator_passthrough(): |
| LOW | tests/test_sequences_and_iterators.py | 288 | def test_generated_dunder_methods_pos_only(): |
| LOW | tests/test_numpy_vectorize.py | 159 | def test_trivial_broadcasting(): |
| LOW | tests/test_numpy_vectorize.py | 210 | def test_passthrough_arguments(doc): |
| LOW | tests/test_numpy_vectorize.py | 243 | def test_method_vectorization(): |
| LOW | tests/test_numpy_vectorize.py | 250 | def test_ref_qualified_method_vectorization(): |
| LOW | tests/test_numpy_vectorize.py | 270 | def test_noexcept_ref_qualified_method_vectorization(): |
| LOW | tests/test_numpy_vectorize.py | 284 | def test_noexcept_method_vectorization(): |
| LOW | tests/test_class_release_gil_before_calling_cpp_dtor.py | 17 | def test_gil_state_check_results(probe_type, unique_key, expected_result): |
| LOW | tests/test_chrono.py | 32 | def test_chrono_system_clock_roundtrip(): |
| LOW | tests/test_chrono.py | 46 | def test_chrono_system_clock_roundtrip_date(): |
| LOW | tests/test_chrono.py | 102 | def test_chrono_system_clock_roundtrip_time(time1, tz, monkeypatch): |
| LOW | tests/test_chrono.py | 125 | def test_chrono_duration_roundtrip(): |
| LOW | tests/test_chrono.py | 145 | def test_chrono_duration_subtraction_equivalence(): |
| LOW | tests/test_chrono.py | 155 | def test_chrono_duration_subtraction_equivalence_date(): |
| LOW | tests/test_chrono.py | 170 | def test_chrono_steady_clock_roundtrip(): |
| LOW | tests/test_chrono.py | 180 | def test_floating_point_duration(): |
| LOW | tests/test_chrono.py | 200 | def test_chrono_different_resolutions(): |
| LOW | tests/conftest.py | 34 | def use_multiprocessing_forkserver_on_linux(): |
| LOW | tests/conftest.py | 205 | def pytest_assertrepr_compare(op, left, right): # noqa: ARG001 |
| LOW | tests/conftest.py | 228 | def delattr_and_ensure_destroyed(*specs): |
| LOW | tests/test_callbacks.py | 38 | def test_bound_method_callback(): |
| LOW | tests/test_callbacks.py | 51 | def test_keyword_args_and_generalized_unpacking(): |
| LOW | tests/test_callbacks.py | 94 | def test_lambda_closure_cleanup(): |
| LOW | tests/test_callbacks.py | 103 | def test_cpp_callable_cleanup(): |
| LOW | tests/test_callbacks.py | 108 | def test_cpp_function_roundtrip(): |
| LOW | tests/test_callbacks.py | 191 | def test_async_async_callbacks(): |
| LOW | tests/test_callbacks.py | 239 | def test_boost_histogram_apply_custom_transform(): |
| LOW | tests/test_warnings.py | 30 | def test_warning_wrong_subclass_fail(): |
| LOW | tests/test_warnings.py | 41 | def test_warning_double_register_fail(): |
| LOW | tests/test_pytypes.py | 473 | def test_non_converting_constructors(): |
| LOW | tests/test_pytypes.py | 661 | def test_memoryview_from_buffer_empty_shape(): |
| LOW | tests/test_pytypes.py | 668 | def test_test_memoryview_from_buffer_invalid_strides(): |
| LOW | tests/test_pytypes.py | 673 | def test_test_memoryview_from_buffer_nullptr(): |
| LOW | tests/test_pytypes.py | 678 | def test_memoryview_from_memory(): |
| LOW | tests/test_pytypes.py | 924 | def test_tuple_nonempty_annotations(doc): |
| LOW | tests/test_pytypes.py | 931 | def test_tuple_empty_annotations(doc): |
| LOW | tests/test_pytypes.py | 937 | def test_tuple_variable_length_annotations(doc): |
| LOW | tests/test_pytypes.py | 1008 | def test_union_object_annotations(doc): |
| LOW | tests/test_pytypes.py | 1015 | def test_optional_annotations(doc): |
| LOW | tests/test_pytypes.py | 1021 | def test_type_guard_annotations(doc, backport_typehints): |
| LOW | tests/test_pytypes.py | 208 | def test_unhashable_exceptions(arg, func): |
| 277 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | noxfile.py | 7 | |
| LOW | tools/libsize.py | 1 | |
| LOW | tools/make_changelog.py | 7 | |
| LOW | tools/make_global.py | 6 | |
| LOW | tools/codespell_ignore_lines_from_errors.py | 12 | |
| LOW | pybind11/setup_helpers.py | 39 | |
| LOW | pybind11/_version.py | 5 | |
| LOW | pybind11/__init__.py | 1 | |
| LOW | pybind11/__init__.py | 10 | |
| LOW | pybind11/__init__.py | 11 | |
| LOW | pybind11/__init__.py | 11 | |
| LOW | pybind11/__init__.py | 11 | |
| LOW | pybind11/commands.py | 1 | |
| LOW | pybind11/__main__.py | 2 | |
| LOW | tests/test_stl_binders.py | 1 | |
| LOW | tests/test_methods_and_attributes.py | 1 | |
| LOW | tests/test_sequences_and_iterators.py | 1 | |
| LOW | tests/test_vector_unique_ptr_member.py | 1 | |
| LOW | tests/test_numpy_vectorize.py | 1 | |
| LOW | tests/test_class_release_gil_before_calling_cpp_dtor.py | 1 | |
| LOW | tests/test_chrono.py | 1 | |
| LOW | tests/test_chrono.py | 7 | |
| LOW | tests/conftest.py | 7 | |
| LOW | tests/test_python_multiple_inheritance.py | 3 | |
| LOW | tests/test_callbacks.py | 1 | |
| LOW | tests/test_callbacks.py | 9 | |
| LOW | tests/test_warnings.py | 1 | |
| LOW | tests/test_warnings.py | 7 | |
| LOW | tests/test_pytypes.py | 1 | |
| LOW | tests/test_class.py | 1 | |
| LOW | tests/env.py | 1 | |
| LOW | tests/test_class_sh_trampoline_self_life_support.py | 1 | |
| LOW | tests/test_class_sh_property_non_owning.py | 1 | |
| LOW | tests/test_docs_advanced_cast_custom.py | 1 | |
| LOW | tests/test_eigen_tensor.py | 1 | |
| LOW | tests/test_eigen_tensor.py | 7 | |
| LOW | tests/test_class_sh_trampoline_shared_from_this.py | 1 | |
| LOW | tests/test_docstring_options.py | 1 | |
| LOW | tests/test_cpp_conduit.py | 3 | |
| LOW | tests/test_class_sh_disowning_mi.py | 1 | |
| LOW | tests/test_class_sh_disowning_mi.py | 5 | |
| LOW | tests/test_async.py | 1 | |
| LOW | tests/test_unnamed_namespace_a.py | 1 | |
| LOW | tests/test_class_sh_basic.py | 2 | |
| LOW | tests/test_class_sh_trampoline_basic.py | 1 | |
| LOW | tests/test_local_bindings.py | 1 | |
| LOW | tests/test_class_sh_factory_constructors.py | 1 | |
| LOW | tests/test_smart_ptr.py | 1 | |
| LOW | tests/test_smart_ptr.py | 5 | |
| LOW | tests/test_numpy_array.py | 1 | |
| LOW | tests/test_numpy_array.py | 5 | |
| LOW | tests/test_builtin_casters.py | 1 | |
| LOW | tests/test_constants_and_functions.py | 1 | |
| LOW | tests/test_exceptions.py | 1 | |
| LOW | tests/test_factory_constructors.py | 1 | |
| LOW | tests/test_factory_constructors.py | 7 | |
| LOW | tests/test_iostream.py | 1 | |
| LOW | tests/test_operator_overloading.py | 1 | |
| LOW | tests/test_union.py | 1 | |
| LOW | tests/test_kwargs_and_defaults.py | 1 | |
| 59 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | .pre-commit-config.yaml | 1 | # To use: |
| LOW | .cmake-format.yaml | 21 | # arguments, then force it to a vertical layout. |
| LOW | tools/check-style.sh | 1 | #!/bin/bash |
| LOW | include/pybind11/numpy.h | 21 | #include <cstdlib> |
| LOW | include/pybind11/numpy.h | 461 | PYBIND11_NUMPY_SCALAR_IMPL(std::complex<double>, NPY_CDOUBLE); |
| LOW | include/pybind11/numpy.h | 921 | // Note: The signature, `dtype::char_` follows the naming of NumPy's |
| LOW | include/pybind11/numpy.h | 1801 | |
| LOW | include/pybind11/numpy.h | 1821 | # define PYBIND11_MAP_END(...) |
| LOW | include/pybind11/pybind11.h | 21 | #include "gil.h" |
| LOW | include/pybind11/pybind11.h | 261 | #else |
| LOW | include/pybind11/pybind11.h | 701 | |
| LOW | include/pybind11/iostream.h | 21 | |
| LOW | include/pybind11/subinterpreter.h | 21 | |
| LOW | include/pybind11/subinterpreter.h | 261 | /// A single OS thread can hold one of these per subinterpreter and alternate between them via |
| LOW | include/pybind11/native_enum.h | 1 | // Copyright (c) 2022-2025 The pybind Community. |
| LOW | include/pybind11/stl.h | 21 | #include <memory> |
| LOW | include/pybind11/common.h | 1 | #include "detail/common.h" |
| LOW | include/pybind11/cast.h | 21 | |
| LOW | include/pybind11/cast.h | 1121 | /// Specialize for the common std::shared_ptr, so users don't need to |
| LOW | include/pybind11/cast.h | 1141 | /// (see issue #5623). An easy solution is to use py::potentially_slicing_weak_ptr<>(obj), |
| LOW | include/pybind11/trampoline_self_life_support.h | 1 | // Copyright (c) 2021 The Pybind Development Team. |
| LOW | include/pybind11/gil_safe_call_once.h | 1 | // Copyright (c) 2023 The pybind Community. |
| LOW | include/pybind11/gil_safe_call_once.h | 21 | PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE) |
| LOW | include/pybind11/gil_safe_call_once.h | 41 | // |
| LOW | include/pybind11/gil_safe_call_once.h | 61 | // normal Python code. However, this will be unnoticeable for quick call-once |
| LOW | include/pybind11/gil_safe_call_once.h | 261 | // Fast local cache to avoid repeated lookups when there are no multiple interpreters. |
| LOW | include/pybind11/pytypes.h | 761 | |
| LOW | include/pybind11/conduit/pybind11_platform_abi_id.h | 1 | #pragma once |
| LOW | include/pybind11/conduit/pybind11_platform_abi_id.h | 21 | # define PYBIND11_COMPILER_TYPE "mingw" |
| LOW | include/pybind11/conduit/pybind11_platform_abi_id.h | 41 | # if defined(_MT) && defined(_DLL) // Corresponding to CL command line options /MD or /MDd. |
| LOW | include/pybind11/conduit/pybind11_platform_abi_id.h | 61 | // // Assume that NVHPC is in the 1xxx ABI family. |
| LOW | include/pybind11/conduit/pybind11_platform_abi_id.h | 81 | # define PYBIND11_BUILD_TYPE "_debug" |
| LOW | include/pybind11/conduit/wrap_include_python_h.h | 1 | #pragma once |
| LOW | include/pybind11/conduit/wrap_include_python_h.h | 21 | // See https://github.com/pybind/pybind11/pull/3497 for full context. |
| LOW | include/pybind11/conduit/wrap_include_python_h.h | 41 | // C4505: 'PySlice_GetIndicesEx': unreferenced local function has been removed |
| LOW | include/pybind11/conduit/wrap_include_python_h.h | 61 | # undef isalnum |
| LOW | include/pybind11/stl/filesystem.h | 1 | // Copyright (c) 2021 The Pybind Development Team. |
| LOW | include/pybind11/detail/type_caster_base.h | 21 | #include "typeid.h" |
| LOW | include/pybind11/detail/type_caster_base.h | 41 | /// A life support system for temporary objects created by `type_caster::load()`. |
| LOW | include/pybind11/detail/type_caster_base.h | 1561 | template <> |
| LOW | include/pybind11/detail/function_ref.h | 1 | /* |
| LOW | include/pybind11/detail/function_ref.h | 21 | //===----------------------------------------------------------------------===// |
| LOW | include/pybind11/detail/function_record_pyobject.h | 1 | // Copyright (c) 2024-2025 The Pybind Development Team. |
| LOW | include/pybind11/detail/function_record_pyobject.h | 41 | // unhelpful compiler warnings. |
| LOW | include/pybind11/detail/internals.h | 21 | #include <cstdint> |
| LOW | include/pybind11/detail/internals.h | 41 | #ifndef PYBIND11_INTERNALS_VERSION |
| LOW | include/pybind11/detail/internals.h | 61 | _Pragma("clang diagnostic ignored \"-Wmissing-field-initializers\"") /**/ \ |
| LOW | include/pybind11/detail/internals.h | 301 | /// `PYBIND11_INTERNALS_VERSION` must be incremented. |
| LOW | include/pybind11/detail/internals.h | 581 | |
| LOW | include/pybind11/detail/internals.h | 621 | } |
| LOW | include/pybind11/detail/internals.h | 821 | on_fetch_function *on_fetch_ = nullptr; |
| LOW | include/pybind11/detail/argument_vector.h | 21 | #include <cstring> |
| LOW | include/pybind11/detail/common.h | 21 | #define PYBIND11_VERSION_MINOR 1 |
| LOW | include/pybind11/detail/common.h | 41 | Py_PACK_FULL_VERSION(PYBIND11_VERSION_MAJOR, \ |
| LOW | include/pybind11/detail/common.h | 61 | // MSVC sets _MSVC_LANG rather than __cplusplus (supposedly until the standard is fully |
| LOW | include/pybind11/detail/common.h | 81 | |
| LOW | include/pybind11/detail/common.h | 101 | #else |
| LOW | include/pybind11/detail/common.h | 121 | # if __clang_major__ < 3 || (__clang_major__ == 3 && __clang_minor__ < 3) |
| LOW | include/pybind11/detail/common.h | 141 | # if defined(WIN32) || defined(_WIN32) |
| LOW | include/pybind11/detail/common.h | 161 | // https://stackoverflow.com/questions/9317473/forward-declaration-of-inline-functions |
| 50 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | tests/test_methods_and_attributes.py | 594 | - Return (Class::*)(Args...) const && noexcept (peek_noexcept) |
| HIGH | tests/test_methods_and_attributes.py | 632 | - overload_cast_impl::operator()(Return (Class::*)(Args...) const && noexcept, true_type) |
| HIGH | tests/test_methods_and_attributes.py | 652 | - overload_cast_impl::operator()(Return (Class::*)(Args...) const && noexcept, true_type) |
| HIGH | tests/test_methods_and_attributes.py | 658 | assert obj.method_const_rref_noexcept(1.0) == "(double) const && noexcept" |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | tests/test_eval_call.py | 1 | # This file is called from 'test_eval.py' |
| MEDIUM | tests/test_custom_type_setup.py | 69 | # Create a self-referential cycle that will be collected during shutdown. |
| MEDIUM | docs/conf.py | 6 | # This file is execfile()d with the current directory set to its |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | pybind11/__main__.py | 28 | # about nuanced counting here. |
| MEDIUM | tests/test_numpy_array.py | 651 | # HINT: An easy and robust way (although only manual unfortunately) to check for |
| LOW | tests/test_modules.py | 138 | # changes in future Python versions, simply add the new expected exception types here. |
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | include/pybind11/detail/class.h | 662 | // Fill in all the information, and then downgrade as requested by the caller, or raise an |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tools/codespell_ignore_lines_from_errors.py | 17 | |
| LOW | pybind11/setup_helpers.py | 290 | |
| LOW | tests/test_numpy_array.py | 591 | |
| LOW | tests/test_factory_constructors.py | 481 | |
| LOW | tests/test_factory_constructors.py | 499 | |
| LOW | tests/test_numpy_dtypes.py | 374 | |
| LOW | tests/test_gil_scoped.py | 170 |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tests/conftest.py | 27 | except Exception: |
| LOW | tests/test_thread.py | 22 | except Exception as e: |
| MEDIUM | tests/test_thread.py | 18 | def run(self): |
| LOW | tests/test_multiple_interpreters.py | 115 | except Exception as e: |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tools/libsize.py | 7 | # Usage: |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tests/test_numpy_array.py | 658 | # value increases without bounds. (Don't forget to Ctrl-C the test!) |