From 7f284d623d2a828f3084978b493507059c1e79ec Mon Sep 17 00:00:00 2001 From: Lin Zhihao <59785146+LinZhihao-723@users.noreply.github.com> Date: Fri, 20 Dec 2024 16:10:07 -0500 Subject: [PATCH 1/2] ci: Add support for building wheels for Python 3.13. (#106) --- .github/workflows/build_wheels.yml | 20 ++++++++++++++++++++ README.md | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 6d1713d..f7b386d 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -93,6 +93,12 @@ jobs: os: "macos-14" - name: "cp312-macosx_x86_64" os: "macos-14" + - name: "cp313-macosx_arm64" + os: "macos-14" + - name: "cp313-macosx_universal2" + os: "macos-14" + - name: "cp313-macosx_x86_64" + os: "macos-14" # Linux builds - name: "cp310-manylinux_aarch64" @@ -131,6 +137,18 @@ jobs: os: "ubuntu-22.04" - name: "cp312-musllinux_x86_64" os: "ubuntu-22.04" + - name: "cp313-manylinux_aarch64" + os: "ubuntu-22.04" + - name: "cp313-manylinux_i686" + os: "ubuntu-22.04" + - name: "cp313-manylinux_x86_64" + os: "ubuntu-22.04" + - name: "cp313-musllinux_aarch64" + os: "ubuntu-22.04" + - name: "cp313-musllinux_i686" + os: "ubuntu-22.04" + - name: "cp313-musllinux_x86_64" + os: "ubuntu-22.04" - name: "cp37-manylinux_aarch64" os: "ubuntu-22.04" - name: "cp37-manylinux_i686" @@ -181,6 +199,8 @@ jobs: os: "windows-2022" - name: "cp312-win_amd64" os: "windows-2022" + - name: "cp313-win_amd64" + os: "windows-2022" steps: - name: "Checkout" diff --git a/README.md b/README.md index 374cdec..9894333 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ project homepage on PyPI [here][7]. ## Compatibility -Tested on Python 3.7, 3.8, 3.11 and 3.12, and it should work on any Python +Tested on Python 3.7, 3.8, 3.11, 3.12, and 3.13, and it should work on any Python version >= 3.7. ## API Reference From 0ace19175c1a002b916ba275750718dce4513ca8 Mon Sep 17 00:00:00 2001 From: Lin Zhihao <59785146+LinZhihao-723@users.noreply.github.com> Date: Sun, 5 Jan 2025 17:46:00 -0500 Subject: [PATCH 2/2] ci(clang-format): Update to clang-format v19 (and the corresponding yscope-dev-utils) and apply the corresponding formatting changes (fixes #71). (#107) --- requirements-dev.txt | 3 +- src/clp_ffi_py/ExceptionFFI.hpp | 2 +- src/clp_ffi_py/Py_utils.hpp | 11 +++--- src/clp_ffi_py/ir/native/Metadata.hpp | 2 +- src/clp_ffi_py/ir/native/PyDeserializer.cpp | 8 ++-- src/clp_ffi_py/ir/native/PyDeserializer.hpp | 15 ++++---- .../ir/native/PyDeserializerBuffer.cpp | 4 +- .../ir/native/PyKeyValuePairLogEvent.cpp | 32 +++++++--------- .../ir/native/PyKeyValuePairLogEvent.hpp | 4 +- src/clp_ffi_py/ir/native/PyMetadata.hpp | 4 +- src/clp_ffi_py/ir/native/PyQuery.cpp | 1 - src/clp_ffi_py/ir/native/PySerializer.cpp | 38 +++++++++---------- src/clp_ffi_py/ir/native/Query.hpp | 4 +- .../ir/native/deserialization_methods.cpp | 7 ++-- src/clp_ffi_py/utils.cpp | 4 +- src/clp_ffi_py/utils.hpp | 16 ++++---- tools/yscope-dev-utils | 2 +- 17 files changed, 73 insertions(+), 84 deletions(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 70faa1b..f0dd622 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,8 +1,7 @@ black>=24.4.2 build>=0.8.0 cibuildwheel>=2.16.2 -# Lock to v18.x until we can upgrade our code to meet v19's formatting standards. -clang-format~=18.1 +clang-format>=19.1.6 clang-tidy>=19.1.0 docformatter>=1.7.5 gersemi>=0.16.2 diff --git a/src/clp_ffi_py/ExceptionFFI.hpp b/src/clp_ffi_py/ExceptionFFI.hpp index 191554a..0790fc9 100644 --- a/src/clp_ffi_py/ExceptionFFI.hpp +++ b/src/clp_ffi_py/ExceptionFFI.hpp @@ -24,7 +24,7 @@ class ExceptionFFI : public clp::TraceableException { std::string message ) : TraceableException{error_code, filename, line_number}, - m_message{std::move(message)} {}; + m_message{std::move(message)} {} [[nodiscard]] auto what() const noexcept -> char const* override { return m_message.c_str(); } diff --git a/src/clp_ffi_py/Py_utils.hpp b/src/clp_ffi_py/Py_utils.hpp index 48f27ca..e0b20fb 100644 --- a/src/clp_ffi_py/Py_utils.hpp +++ b/src/clp_ffi_py/Py_utils.hpp @@ -24,10 +24,9 @@ namespace clp_ffi_py { * @return a new reference of a PyObject string that stores the formatted timestamp. * @return nullptr on failure with the relevant Python exception and error set. */ -[[nodiscard]] auto py_utils_get_formatted_timestamp( - clp::ir::epoch_time_ms_t timestamp, - PyObject* timezone -) -> PyObject*; +[[nodiscard]] auto +py_utils_get_formatted_timestamp(clp::ir::epoch_time_ms_t timestamp, PyObject* timezone) + -> PyObject*; /** * CPython wrapper of `clp_ffi_py.utils.get_timezone_from_timezone_id`. @@ -35,8 +34,8 @@ namespace clp_ffi_py { * @return a new reference of a Python tzinfo object that matches the input timezone id. * @return nullptr on failure with the relevant Python exception and error set. */ -[[nodiscard]] auto py_utils_get_timezone_from_timezone_id(std::string const& timezone_id -) -> PyObject*; +[[nodiscard]] auto py_utils_get_timezone_from_timezone_id(std::string const& timezone_id) + -> PyObject*; /** * CPython wrapper of `clp_ffi_py.utils.serialize_dict_to_msgpack`. diff --git a/src/clp_ffi_py/ir/native/Metadata.hpp b/src/clp_ffi_py/ir/native/Metadata.hpp index aaf9100..2dd1b26 100644 --- a/src/clp_ffi_py/ir/native/Metadata.hpp +++ b/src/clp_ffi_py/ir/native/Metadata.hpp @@ -39,7 +39,7 @@ class Metadata { : m_is_four_byte_encoding{true}, m_ref_timestamp{ref_timestamp}, m_timestamp_format{std::move(timestamp_format)}, - m_timezone_id{std::move(timezone)} {}; + m_timezone_id{std::move(timezone)} {} [[nodiscard]] auto is_using_four_byte_encoding() const -> bool { return m_is_four_byte_encoding; diff --git a/src/clp_ffi_py/ir/native/PyDeserializer.cpp b/src/clp_ffi_py/ir/native/PyDeserializer.cpp index 9b9ca5e..c042dd7 100644 --- a/src/clp_ffi_py/ir/native/PyDeserializer.cpp +++ b/src/clp_ffi_py/ir/native/PyDeserializer.cpp @@ -48,8 +48,8 @@ PyDoc_STRVAR( " treated as an error.\n" ":type allow_incomplete_stream: bool\n" ); -CLP_FFI_PY_METHOD auto -PyDeserializer_init(PyDeserializer* self, PyObject* args, PyObject* keywords) -> int; +CLP_FFI_PY_METHOD auto PyDeserializer_init(PyDeserializer* self, PyObject* args, PyObject* keywords) + -> int; /** * Callback of `PyDeserializer`'s `deserialize_log_event`. @@ -105,8 +105,8 @@ PyType_Spec PyDeserializer_type_spec{ static_cast(PyDeserializer_slots) }; -CLP_FFI_PY_METHOD auto -PyDeserializer_init(PyDeserializer* self, PyObject* args, PyObject* keywords) -> int { +CLP_FFI_PY_METHOD auto PyDeserializer_init(PyDeserializer* self, PyObject* args, PyObject* keywords) + -> int { static char keyword_input_stream[]{"input_stream"}; static char keyword_buffer_capacity[]{"buffer_capacity"}; static char keyword_allow_incomplete_stream[]{"allow_incomplete_stream"}; diff --git a/src/clp_ffi_py/ir/native/PyDeserializer.hpp b/src/clp_ffi_py/ir/native/PyDeserializer.hpp index 847533c..c986e0d 100644 --- a/src/clp_ffi_py/ir/native/PyDeserializer.hpp +++ b/src/clp_ffi_py/ir/native/PyDeserializer.hpp @@ -151,15 +151,14 @@ class PyDeserializer { ~IrUnitHandler() = default; // Implements `clp::ffi::ir_stream::IrUnitHandlerInterface` interface - [[nodiscard]] auto handle_log_event(clp::ffi::KeyValuePairLogEvent&& log_event - ) -> clp::ffi::ir_stream::IRErrorCode { + [[nodiscard]] auto handle_log_event(clp::ffi::KeyValuePairLogEvent&& log_event) + -> clp::ffi::ir_stream::IRErrorCode { return m_log_event_handle(std::move(log_event)); } - [[nodiscard]] auto handle_utc_offset_change( - clp::UtcOffset utc_offset_old, - clp::UtcOffset utc_offset_new - ) -> clp::ffi::ir_stream::IRErrorCode { + [[nodiscard]] auto + handle_utc_offset_change(clp::UtcOffset utc_offset_old, clp::UtcOffset utc_offset_new) + -> clp::ffi::ir_stream::IRErrorCode { return m_utc_offset_change_handle(utc_offset_old, utc_offset_new); } @@ -201,8 +200,8 @@ class PyDeserializer { * @return IRErrorCode::IRErrorCode_Success on success. * */ - [[nodiscard]] auto handle_log_event(clp::ffi::KeyValuePairLogEvent&& log_event - ) -> clp::ffi::ir_stream::IRErrorCode; + [[nodiscard]] auto handle_log_event(clp::ffi::KeyValuePairLogEvent&& log_event) + -> clp::ffi::ir_stream::IRErrorCode; /** * @return Whether `m_deserialized_log_event` has been set. diff --git a/src/clp_ffi_py/ir/native/PyDeserializerBuffer.cpp b/src/clp_ffi_py/ir/native/PyDeserializerBuffer.cpp index ea71fd8..874d2d6 100644 --- a/src/clp_ffi_py/ir/native/PyDeserializerBuffer.cpp +++ b/src/clp_ffi_py/ir/native/PyDeserializerBuffer.cpp @@ -118,8 +118,8 @@ PyDoc_STRVAR( ":return: Total number of messages deserialized so far.\n" ); -auto PyDeserializerBuffer_get_num_deserialized_log_messages(PyDeserializerBuffer* self -) -> PyObject* { +auto PyDeserializerBuffer_get_num_deserialized_log_messages(PyDeserializerBuffer* self) + -> PyObject* { return PyLong_FromLongLong(static_cast(self->get_num_deserialized_message())); } diff --git a/src/clp_ffi_py/ir/native/PyKeyValuePairLogEvent.cpp b/src/clp_ffi_py/ir/native/PyKeyValuePairLogEvent.cpp index 0d5c4b6..c57b79d 100644 --- a/src/clp_ffi_py/ir/native/PyKeyValuePairLogEvent.cpp +++ b/src/clp_ffi_py/ir/native/PyKeyValuePairLogEvent.cpp @@ -51,8 +51,8 @@ namespace { class IrUnitHandler { public: // Methods that implement the `clp::ffi::ir_stream::IrUnitHandlerInterface` interface - [[nodiscard]] auto handle_log_event(clp::ffi::KeyValuePairLogEvent&& deserialized_log_event - ) -> IRErrorCode { + [[nodiscard]] auto handle_log_event(clp::ffi::KeyValuePairLogEvent&& deserialized_log_event) + -> IRErrorCode { log_event.emplace(std::move(deserialized_log_event)); return IRErrorCode::IRErrorCode_Success; } @@ -240,11 +240,9 @@ PyDoc_STRVAR( " must be strings, including keys inside any sub-dictionaries.\n" ":type dictionary: dict[str, Any]\n" ); -CLP_FFI_PY_METHOD auto PyKeyValuePairLogEvent_init( - PyKeyValuePairLogEvent* self, - PyObject* args, - PyObject* keywords -) -> int; +CLP_FFI_PY_METHOD auto +PyKeyValuePairLogEvent_init(PyKeyValuePairLogEvent* self, PyObject* args, PyObject* keywords) + -> int; /** * Callback of `PyKeyValuePairLogEvent`'s `to_dict` method. @@ -310,8 +308,8 @@ PyType_Spec PyKeyValuePairLogEvent_type_spec{ * @return The converted key-value log event of the given dictionary on success. * @return std::nullopt on failure with the relevant Python exception and error set. */ -[[nodiscard]] auto convert_py_dict_to_key_value_pair_log_event(PyDictObject* py_dict -) -> std::optional; +[[nodiscard]] auto convert_py_dict_to_key_value_pair_log_event(PyDictObject* py_dict) + -> std::optional; /** * Serializes the given node id value pairs into a Python dictionary object. @@ -351,11 +349,9 @@ PyType_Spec PyKeyValuePairLogEvent_type_spec{ */ [[nodiscard]] auto decode_as_encoded_text_ast(Value const& val) -> std::optional; -CLP_FFI_PY_METHOD auto PyKeyValuePairLogEvent_init( - PyKeyValuePairLogEvent* self, - PyObject* args, - PyObject* keywords -) -> int { +CLP_FFI_PY_METHOD auto +PyKeyValuePairLogEvent_init(PyKeyValuePairLogEvent* self, PyObject* args, PyObject* keywords) + -> int { static char keyword_dictionary[]{"dictionary"}; static char* keyword_table[]{static_cast(keyword_dictionary), nullptr}; @@ -399,8 +395,8 @@ CLP_FFI_PY_METHOD auto PyKeyValuePairLogEvent_dealloc(PyKeyValuePairLogEvent* se Py_TYPE(self)->tp_free(py_reinterpret_cast(self)); } -auto convert_py_dict_to_key_value_pair_log_event(PyDictObject* py_dict -) -> std::optional { +auto convert_py_dict_to_key_value_pair_log_event(PyDictObject* py_dict) + -> std::optional { PyObjectPtr const serialized_msgpack_byte_sequence{ py_utils_serialize_dict_to_msgpack(py_dict) }; @@ -679,8 +675,8 @@ auto PyKeyValuePairLogEvent::init(clp::ffi::KeyValuePairLogEvent kv_pair_log_eve } } -auto PyKeyValuePairLogEvent::create(clp::ffi::KeyValuePairLogEvent kv_log_event -) -> PyKeyValuePairLogEvent* { +auto PyKeyValuePairLogEvent::create(clp::ffi::KeyValuePairLogEvent kv_log_event) + -> PyKeyValuePairLogEvent* { // NOLINTNEXTLINE(cppcoreguidelines-pro-type-cstyle-cast) PyKeyValuePairLogEvent* self{PyObject_New(PyKeyValuePairLogEvent, get_py_type())}; if (nullptr == self) { diff --git a/src/clp_ffi_py/ir/native/PyKeyValuePairLogEvent.hpp b/src/clp_ffi_py/ir/native/PyKeyValuePairLogEvent.hpp index 09f65be..3e97d07 100644 --- a/src/clp_ffi_py/ir/native/PyKeyValuePairLogEvent.hpp +++ b/src/clp_ffi_py/ir/native/PyKeyValuePairLogEvent.hpp @@ -71,8 +71,8 @@ class PyKeyValuePairLogEvent { * given kv log event. * @return nullptr on failure with the relevant Python exception and error set. */ - [[nodiscard]] static auto create(clp::ffi::KeyValuePairLogEvent kv_log_event - ) -> PyKeyValuePairLogEvent*; + [[nodiscard]] static auto create(clp::ffi::KeyValuePairLogEvent kv_log_event) + -> PyKeyValuePairLogEvent*; /** * Gets the `PyTypeObject` that represents `PyKeyValuePair`'s Python type. This type is diff --git a/src/clp_ffi_py/ir/native/PyMetadata.hpp b/src/clp_ffi_py/ir/native/PyMetadata.hpp index c4fa942..e3c6784 100644 --- a/src/clp_ffi_py/ir/native/PyMetadata.hpp +++ b/src/clp_ffi_py/ir/native/PyMetadata.hpp @@ -40,8 +40,8 @@ class PyMetadata { * @return true on success. * @return false on failure with the relevant Python exception and error set. */ - [[nodiscard]] auto - init(nlohmann::json const& metadata, bool is_four_byte_encoding = true) -> bool; + [[nodiscard]] auto init(nlohmann::json const& metadata, bool is_four_byte_encoding = true) + -> bool; /** * Releases the memory allocated for underlying metadata field and the reference hold for the diff --git a/src/clp_ffi_py/ir/native/PyQuery.cpp b/src/clp_ffi_py/ir/native/PyQuery.cpp index ff51b8d..b77b6bf 100644 --- a/src/clp_ffi_py/ir/native/PyQuery.cpp +++ b/src/clp_ffi_py/ir/native/PyQuery.cpp @@ -1,4 +1,3 @@ - #include // Must be included before any other header files #include "PyQuery.hpp" diff --git a/src/clp_ffi_py/ir/native/PySerializer.cpp b/src/clp_ffi_py/ir/native/PySerializer.cpp index e09924e..b6878da 100644 --- a/src/clp_ffi_py/ir/native/PySerializer.cpp +++ b/src/clp_ffi_py/ir/native/PySerializer.cpp @@ -42,8 +42,8 @@ PyDoc_STRVAR( " it to `output_stream`. Defaults to 64 KiB.\n" ":type buffer_size_limit: int\n" ); -CLP_FFI_PY_METHOD auto -PySerializer_init(PySerializer* self, PyObject* args, PyObject* keywords) -> int; +CLP_FFI_PY_METHOD auto PySerializer_init(PySerializer* self, PyObject* args, PyObject* keywords) + -> int; /** * Callback of `PySerializer`'s `serialize_msgpack` method. @@ -64,10 +64,9 @@ PyDoc_STRVAR( ":raise RuntimeError: If `msgpack_map` couldn't be unpacked or serialization into the IR" " stream failed.\n" ); -CLP_FFI_PY_METHOD auto PySerializer_serialize_log_event_from_msgpack_map( - PySerializer* self, - PyObject* msgpack_map -) -> PyObject*; +CLP_FFI_PY_METHOD auto +PySerializer_serialize_log_event_from_msgpack_map(PySerializer* self, PyObject* msgpack_map) + -> PyObject*; /** * Callback of `PySerializer`'s `get_num_bytes_serialized` method. @@ -140,8 +139,8 @@ PyDoc_STRVAR( ":param exc_value: The value of the exception that caused the exit. Unused.\n" ":param exc_traceable: The traceback. Unused.\n" ); -CLP_FFI_PY_METHOD auto -PySerializer_exit(PySerializer* self, PyObject* args, PyObject* keywords) -> PyObject*; +CLP_FFI_PY_METHOD auto PySerializer_exit(PySerializer* self, PyObject* args, PyObject* keywords) + -> PyObject*; /** * Callback of `PySerializer`'s deallocator. @@ -206,8 +205,8 @@ PyType_Spec PySerializer_type_spec{ static_cast(PySerializer_slots) }; -CLP_FFI_PY_METHOD auto -PySerializer_init(PySerializer* self, PyObject* args, PyObject* keywords) -> int { +CLP_FFI_PY_METHOD auto PySerializer_init(PySerializer* self, PyObject* args, PyObject* keywords) + -> int { static char keyword_output_stream[]{"output_stream"}; static char keyword_buffer_size_limit[]{"buffer_size_limit"}; static char* keyword_table[]{ @@ -286,10 +285,9 @@ PySerializer_init(PySerializer* self, PyObject* args, PyObject* keywords) -> int return 0; } -CLP_FFI_PY_METHOD auto PySerializer_serialize_log_event_from_msgpack_map( - PySerializer* self, - PyObject* msgpack_map -) -> PyObject* { +CLP_FFI_PY_METHOD auto +PySerializer_serialize_log_event_from_msgpack_map(PySerializer* self, PyObject* msgpack_map) + -> PyObject* { if (false == static_cast(PyBytes_Check(msgpack_map))) { PyErr_SetString( PyExc_TypeError, @@ -334,8 +332,8 @@ CLP_FFI_PY_METHOD auto PySerializer_enter(PySerializer* self) -> PyObject* { return py_reinterpret_cast(self); } -CLP_FFI_PY_METHOD auto -PySerializer_exit(PySerializer* self, PyObject* args, PyObject* keywords) -> PyObject* { +CLP_FFI_PY_METHOD auto PySerializer_exit(PySerializer* self, PyObject* args, PyObject* keywords) + -> PyObject* { static char keyword_exc_type[]{"exc_type"}; static char keyword_exc_value[]{"exc_value"}; static char keyword_traceback[]{"traceback"}; @@ -426,8 +424,8 @@ auto PySerializer::assert_is_not_closed() const -> bool { return true; } -auto PySerializer::serialize_log_event_from_msgpack_map(std::span msgpack_byte_sequence -) -> std::optional { +auto PySerializer::serialize_log_event_from_msgpack_map(std::span msgpack_byte_sequence) + -> std::optional { if (false == assert_is_not_closed()) { return std::nullopt; } @@ -529,8 +527,8 @@ auto PySerializer::write_ir_buf_to_output_stream() -> bool { return true; } -auto PySerializer::write_to_output_stream(PySerializer::BufferView buf -) -> std::optional { +auto PySerializer::write_to_output_stream(PySerializer::BufferView buf) + -> std::optional { if (buf.empty()) { return 0; } diff --git a/src/clp_ffi_py/ir/native/Query.hpp b/src/clp_ffi_py/ir/native/Query.hpp index c7b9d76..9295b7e 100644 --- a/src/clp_ffi_py/ir/native/Query.hpp +++ b/src/clp_ffi_py/ir/native/Query.hpp @@ -26,7 +26,7 @@ class WildcardQuery { */ WildcardQuery(std::string wildcard_query, bool case_sensitive) : m_wildcard_query(std::move(wildcard_query)), - m_case_sensitive(case_sensitive) {}; + m_case_sensitive(case_sensitive) {} [[nodiscard]] auto get_wildcard_query() const -> std::string const& { return m_wildcard_query; } @@ -69,7 +69,7 @@ class Query { explicit Query() : m_lower_bound_ts{cTimestampMin}, m_upper_bound_ts{cTimestampMax}, - m_search_termination_ts{cTimestampMax} {}; + m_search_termination_ts{cTimestampMax} {} /** * Constructs a new query object with the given timestamp range with an empty wildcard list. diff --git a/src/clp_ffi_py/ir/native/deserialization_methods.cpp b/src/clp_ffi_py/ir/native/deserialization_methods.cpp index 99da0ad..0600421 100644 --- a/src/clp_ffi_py/ir/native/deserialization_methods.cpp +++ b/src/clp_ffi_py/ir/native/deserialization_methods.cpp @@ -59,10 +59,9 @@ concept TerminateHandlerSignature = requires(TerminateHandler handler) { * @param nullptr if the IR stream is incomplete not allowed, with the relevant Python exceptions * and error set. */ -[[nodiscard]] auto handle_incomplete_ir_error( - PyDeserializerBuffer* deserializer_buffer, - bool allow_incomplete_stream -) -> std::optional { +[[nodiscard]] auto +handle_incomplete_ir_error(PyDeserializerBuffer* deserializer_buffer, bool allow_incomplete_stream) + -> std::optional { if (deserializer_buffer->try_read()) { return std::nullopt; } diff --git a/src/clp_ffi_py/utils.cpp b/src/clp_ffi_py/utils.cpp index 0bdd549..c57d72b 100644 --- a/src/clp_ffi_py/utils.cpp +++ b/src/clp_ffi_py/utils.cpp @@ -66,8 +66,8 @@ auto get_py_bool(bool is_true) -> PyObject* { Py_RETURN_FALSE; } -auto unpack_msgpack(std::span msgpack_byte_sequence -) -> outcome_v2::std_result { +auto unpack_msgpack(std::span msgpack_byte_sequence) + -> outcome_v2::std_result { msgpack::object_handle handle; try { msgpack::unpack(handle, msgpack_byte_sequence.data(), msgpack_byte_sequence.size()); diff --git a/src/clp_ffi_py/utils.hpp b/src/clp_ffi_py/utils.hpp index bde772c..816a13f 100644 --- a/src/clp_ffi_py/utils.hpp +++ b/src/clp_ffi_py/utils.hpp @@ -26,8 +26,8 @@ namespace clp_ffi_py { * @return true on success. * @return false on failure with the relevant Python exception and error set. */ -[[nodiscard]] auto -add_python_type(PyTypeObject* new_type, char const* type_name, PyObject* module) -> bool; +[[nodiscard]] auto add_python_type(PyTypeObject* new_type, char const* type_name, PyObject* module) + -> bool; /** * Parses a Python string into std::string. @@ -47,8 +47,8 @@ add_python_type(PyTypeObject* new_type, char const* type_name, PyObject* module) * @return true on success. * @return false on failure with the relevant Python exception and error set. */ -[[nodiscard]] auto -parse_py_string_as_string_view(PyObject* py_string, std::string_view& view) -> bool; +[[nodiscard]] auto parse_py_string_as_string_view(PyObject* py_string, std::string_view& view) + -> bool; /** * Gets the Python True/False object from a given `bool` value/expression. @@ -75,8 +75,8 @@ template * @return A result containing the unpacked msgpack object handle on success or an error string * indicating the unpack failure (forwarded from the thrown `msgpack::unpack_error`). */ -[[nodiscard]] auto unpack_msgpack(std::span msgpack_byte_sequence -) -> outcome_v2::std_result; +[[nodiscard]] auto unpack_msgpack(std::span msgpack_byte_sequence) + -> outcome_v2::std_result; /* * Handles a `clp::TraceableException` by setting a Python exception accordingly. @@ -94,8 +94,8 @@ template * @param sv * @return The underlying C-string of the given constexpr string view. */ -[[nodiscard]] consteval auto get_c_str_from_constexpr_string_view(std::string_view const& sv -) -> char const*; +[[nodiscard]] consteval auto get_c_str_from_constexpr_string_view(std::string_view const& sv) + -> char const*; template auto parse_py_int(PyObject* py_int, IntType& val) -> bool { diff --git a/tools/yscope-dev-utils b/tools/yscope-dev-utils index ad576e4..c1593f7 160000 --- a/tools/yscope-dev-utils +++ b/tools/yscope-dev-utils @@ -1 +1 @@ -Subproject commit ad576e43c1a43d7a6afde79fc9c3c952b7bf28bd +Subproject commit c1593f7414112f2b6e0bf46595126c8edeffe106