From d94317b17ef1354e4098f157112549e2da1e1b20 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Wed, 4 Mar 2020 17:46:35 +0100 Subject: [PATCH] Enable function signatures in documentation by default --- CMakeLists.txt | 2 +- src/mod_core.cpp | 2 +- src/mod_info.cpp | 5 +++++ src/mod_utility.cpp | 5 +++++ 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cbe6851..c1f8bff 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ project(pystorm) find_package(storm REQUIRED) add_subdirectory(resources/pybind11) -option(STORMPY_DISABLE_SIGNATURE_DOC "disables the signature in the documentation" ON) +option(STORMPY_DISABLE_SIGNATURE_DOC "Disable the signature in the documentation" OFF) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/src/generated/config.h) diff --git a/src/mod_core.cpp b/src/mod_core.cpp index 1c351f0..84467ef 100644 --- a/src/mod_core.cpp +++ b/src/mod_core.cpp @@ -15,7 +15,7 @@ PYBIND11_MODULE(core, m) { #ifdef STORMPY_DISABLE_SIGNATURE_DOC py::options options; -// options.disable_function_signatures(); + options.disable_function_signatures(); #endif define_environment(m); diff --git a/src/mod_info.cpp b/src/mod_info.cpp index be4bb0a..f342d2b 100644 --- a/src/mod_info.cpp +++ b/src/mod_info.cpp @@ -4,6 +4,11 @@ PYBIND11_MODULE(info, m) { m.doc() = "Storm information"; +#ifdef STORMPY_DISABLE_SIGNATURE_DOC + py::options options; + options.disable_function_signatures(); +#endif + py::class_(m, "Version", "Version information for Storm") // static properties are still called with self as argument (which we ignore), see // https://pybind11.readthedocs.io/en/master/advanced/classes.html#static-properties diff --git a/src/mod_utility.cpp b/src/mod_utility.cpp index 777e80a..57b122d 100644 --- a/src/mod_utility.cpp +++ b/src/mod_utility.cpp @@ -8,6 +8,11 @@ PYBIND11_MODULE(utility, m) { m.doc() = "Utilities for Storm"; +#ifdef STORMPY_DISABLE_SIGNATURE_DOC + py::options options; + options.disable_function_signatures(); +#endif + define_ksp(m); define_smt(m); define_chrono(m);