From eadff4b3162794beadf42f92a4861bb4879d2716 Mon Sep 17 00:00:00 2001 From: PJ Reiniger Date: Mon, 31 Aug 2026 03:08:03 -0400 Subject: [PATCH 1/3] Update wpiformat to better match allwpilib --- .github/workflows/dist.yml | 2 +- .wpiformat | 10 +++++++ .../telemetry/src/rpy/PyTelemetryTable.h | 7 +++-- .../src/rpy/MockTunableBackendFunctions.h | 25 +++++++----------- .../src/rpy/PyComplexTunableAdapter.h | 3 +-- .../tunables/src/rpy/PyTunable.h | 26 +++++++++---------- .../tunables/src/rpy/PyTunableTable.h | 18 ++++++------- 7 files changed, 45 insertions(+), 46 deletions(-) diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index e20bf347c..27e1a18ba 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -88,7 +88,7 @@ jobs: ./rdev.sh ci check-tag - name: Install wpiformat - run: python -m pip install wpiformat==2026.64 + run: python -m pip install wpiformat==2026.71 - name: Run wpiformat run: wpiformat diff --git a/.wpiformat b/.wpiformat index 3aefecb3e..04d7ef4f7 100644 --- a/.wpiformat +++ b/.wpiformat @@ -1,3 +1,13 @@ +cHeaderFileInclude { + _c\.h$ +} + +cppHeaderFileInclude { + (?>> m_values; - std::vector< - std::pair>> + std::vector>> m_complex; std::vector> m_nativeComplex; }; diff --git a/subprojects/robotpy-tunables/tunables/src/rpy/PyTunable.h b/subprojects/robotpy-tunables/tunables/src/rpy/PyTunable.h index bb63e718c..daa1d6c4c 100644 --- a/subprojects/robotpy-tunables/tunables/src/rpy/PyTunable.h +++ b/subprojects/robotpy-tunables/tunables/src/rpy/PyTunable.h @@ -19,15 +19,13 @@ namespace wpi::tunables::python { using TunableVariant = std::variant, - wpi::tunables::Tunable, - WPyStructInfo>>; + wpi::tunables::Tunable, WPyStructInfo>>; class PyTunable : public std::enable_shared_from_this { public: @@ -52,8 +50,7 @@ class PyTunable : public std::enable_shared_from_this { template static constexpr bool IsStructCachedValue = - std::same_as || - std::same_as>; + std::same_as || std::same_as>; static std::vector PackStructValue(const WPyStruct& value, const WPyStructInfo& info); @@ -71,14 +68,15 @@ class PyTunable : public std::enable_shared_from_this { void SetCached(pybind11::handle value); void SetCachedIfChanged(pybind11::handle value); std::optional> PackCachedStructData() const; - wpi::tunables::TunableConfig MakeConfig( - bool robust, bool isMutable, pybind11::handle properties, - std::string typeString, bool alwaysGet); - TunableVariant MakeValue(pybind11::handle value, bool robust, - bool isMutable, pybind11::object valueType, + wpi::tunables::TunableConfig MakeConfig(bool robust, bool isMutable, + pybind11::handle properties, + std::string typeString, + bool alwaysGet); + TunableVariant MakeValue(pybind11::handle value, bool robust, bool isMutable, + pybind11::object valueType, pybind11::object elementType, - pybind11::object properties, - std::string typeString, bool alwaysGet); + pybind11::object properties, std::string typeString, + bool alwaysGet); pybind11::object m_getter; pybind11::object m_setter; diff --git a/subprojects/robotpy-tunables/tunables/src/rpy/PyTunableTable.h b/subprojects/robotpy-tunables/tunables/src/rpy/PyTunableTable.h index 610fd1112..532c5df87 100644 --- a/subprojects/robotpy-tunables/tunables/src/rpy/PyTunableTable.h +++ b/subprojects/robotpy-tunables/tunables/src/rpy/PyTunableTable.h @@ -19,16 +19,16 @@ class PyTunableTable { std::string GetPath() const; PyTunableTable GetTable(std::string_view name); bool Publish(std::string_view name, pybind11::object value); - std::shared_ptr Add( - std::string_view name, pybind11::object value, - pybind11::object valueType, pybind11::object elementType, bool robust, - bool isMutable, pybind11::object onTune, pybind11::object properties, - std::string typeString); + std::shared_ptr Add(std::string_view name, pybind11::object value, + pybind11::object valueType, + pybind11::object elementType, bool robust, + bool isMutable, pybind11::object onTune, + pybind11::object properties, + std::string typeString); std::shared_ptr PublishValue( - std::string_view name, pybind11::object getter, - pybind11::object setter, pybind11::object valueType, - pybind11::object elementType, bool robust, bool isMutable, - pybind11::object properties, std::string typeString); + std::string_view name, pybind11::object getter, pybind11::object setter, + pybind11::object valueType, pybind11::object elementType, bool robust, + bool isMutable, pybind11::object properties, std::string typeString); void Remove(std::string_view name); private: From 57b1579dbb1f15a91ec528e41083944d8c1926f9 Mon Sep 17 00:00:00 2001 From: PJ Reiniger Date: Sat, 12 Sep 2026 23:11:46 -0400 Subject: [PATCH 2/3] Run formatter --- .../src/rpy/MockTelemetryBackendFunctions.h | 9 +-- .../rpy/MockTelemetryBackendValueCasters.h | 26 +++----- .../telemetry/src/rpy/PyTelemetryTable.h | 9 ++- .../telemetry/src/rpy/TelemetryFunctions.h | 9 ++- .../src/rpy/MockTunableBackendFunctions.h | 54 ++++++++-------- .../tunables/src/rpy/PyTunable.h | 63 ++++++++----------- .../tunables/src/rpy/PyTunableTable.h | 45 ++++++------- .../tunables/src/rpy/TunableFunctions.h | 3 +- .../src/rpy/TunableRegistryFunctions.h | 3 +- .../tunables/src/rpy/TunableStorage.h | 4 +- 10 files changed, 99 insertions(+), 126 deletions(-) diff --git a/subprojects/robotpy-telemetry/telemetry/src/rpy/MockTelemetryBackendFunctions.h b/subprojects/robotpy-telemetry/telemetry/src/rpy/MockTelemetryBackendFunctions.h index 669d4ba7e..27ba6075a 100644 --- a/subprojects/robotpy-telemetry/telemetry/src/rpy/MockTelemetryBackendFunctions.h +++ b/subprojects/robotpy-telemetry/telemetry/src/rpy/MockTelemetryBackendFunctions.h @@ -15,8 +15,7 @@ class ActionValue : public pybind11::object { public: using pybind11::object::object; - ActionValue(pybind11::object&& value) - : pybind11::object{std::move(value)} {} + ActionValue(pybind11::object&& value) : pybind11::object{std::move(value)} {} }; using ObjectDict = pybind11::typing::Dict; @@ -34,8 +33,7 @@ void InitializeMockBackendValueTypes(pybind11::module_& module); pybind11::object GetMockBackendValueType(MockBackendValueType type); std::optional GetLastValue( - const wpi::telemetry::MockTelemetryBackend& backend, - std::string_view path); + const wpi::telemetry::MockTelemetryBackend& backend, std::string_view path); std::optional GetSchema( const wpi::telemetry::MockTelemetryBackend& backend, @@ -47,8 +45,7 @@ namespace pybind11::detail { template <> struct handle_type_name { - static constexpr auto name = - const_name("telemetry.mock_backend.ActionValue"); + static constexpr auto name = const_name("telemetry.mock_backend.ActionValue"); }; } // namespace pybind11::detail diff --git a/subprojects/robotpy-telemetry/telemetry/src/rpy/MockTelemetryBackendValueCasters.h b/subprojects/robotpy-telemetry/telemetry/src/rpy/MockTelemetryBackendValueCasters.h index ca550500b..4f99cdc28 100644 --- a/subprojects/robotpy-telemetry/telemetry/src/rpy/MockTelemetryBackendValueCasters.h +++ b/subprojects/robotpy-telemetry/telemetry/src/rpy/MockTelemetryBackendValueCasters.h @@ -12,13 +12,11 @@ namespace pybind11::detail { template <> -struct type_caster< - wpi::telemetry::MockTelemetryBackend::KeepDuplicatesValue> { +struct type_caster { using Type = wpi::telemetry::MockTelemetryBackend::KeepDuplicatesValue; PYBIND11_TYPE_CASTER( - Type, - const_name("telemetry.mock_backend.KeepDuplicatesValue")); + Type, const_name("telemetry.mock_backend.KeepDuplicatesValue")); bool load(handle src, bool) { if (!src) { @@ -53,8 +51,8 @@ template <> struct type_caster { using Type = wpi::telemetry::MockTelemetryBackend::SetPropertyValue; - PYBIND11_TYPE_CASTER( - Type, const_name("telemetry.mock_backend.SetPropertyValue")); + PYBIND11_TYPE_CASTER(Type, + const_name("telemetry.mock_backend.SetPropertyValue")); bool load(handle src, bool) { if (!src) { @@ -91,8 +89,8 @@ template <> struct type_caster { using Type = wpi::telemetry::MockTelemetryBackend::LogStringValue; - PYBIND11_TYPE_CASTER( - Type, const_name("telemetry.mock_backend.LogStringValue")); + PYBIND11_TYPE_CASTER(Type, + const_name("telemetry.mock_backend.LogStringValue")); bool load(handle src, bool) { if (!src) { @@ -126,13 +124,11 @@ struct type_caster { }; template <> -struct type_caster< - wpi::telemetry::MockTelemetryBackend::LogBooleanArrayValue> { +struct type_caster { using Type = wpi::telemetry::MockTelemetryBackend::LogBooleanArrayValue; PYBIND11_TYPE_CASTER( - Type, - const_name("telemetry.mock_backend.LogBooleanArrayValue")); + Type, const_name("telemetry.mock_backend.LogBooleanArrayValue")); bool load(handle src, bool) { if (!src) { @@ -176,8 +172,7 @@ template <> struct type_caster { using Type = wpi::telemetry::MockTelemetryBackend::LogRawValue; - PYBIND11_TYPE_CASTER( - Type, const_name("telemetry.mock_backend.LogRawValue")); + PYBIND11_TYPE_CASTER(Type, const_name("telemetry.mock_backend.LogRawValue")); bool load(handle src, bool) { if (!src) { @@ -220,8 +215,7 @@ template <> struct type_caster { using Type = wpi::telemetry::MockTelemetryBackend::Action; - static constexpr auto name = - const_name("telemetry.mock_backend.Action"); + static constexpr auto name = const_name("telemetry.mock_backend.Action"); static handle cast(const Type& src, return_value_policy, handle) { object cls = wpi::telemetry::python::GetMockBackendValueType( diff --git a/subprojects/robotpy-telemetry/telemetry/src/rpy/PyTelemetryTable.h b/subprojects/robotpy-telemetry/telemetry/src/rpy/PyTelemetryTable.h index 00abae467..e6a5fdcd4 100644 --- a/subprojects/robotpy-telemetry/telemetry/src/rpy/PyTelemetryTable.h +++ b/subprojects/robotpy-telemetry/telemetry/src/rpy/PyTelemetryTable.h @@ -88,11 +88,10 @@ class PyTelemetryTable { * bytearray, and memoryview). Wrap other buffer exporters in memoryview to * explicitly log their raw bytes in C order. */ - void Log( - std::string_view name, pybind11::object value, - pybind11::typing::Optional> - elementType = pybind11::none(), - std::string_view typeString = "") const; + void Log(std::string_view name, pybind11::object value, + pybind11::typing::Optional> + elementType = pybind11::none(), + std::string_view typeString = "") const; private: using ElementType = pybind11::typing::Type; diff --git a/subprojects/robotpy-telemetry/telemetry/src/rpy/TelemetryFunctions.h b/subprojects/robotpy-telemetry/telemetry/src/rpy/TelemetryFunctions.h index 530d2f192..3b49c6f93 100644 --- a/subprojects/robotpy-telemetry/telemetry/src/rpy/TelemetryFunctions.h +++ b/subprojects/robotpy-telemetry/telemetry/src/rpy/TelemetryFunctions.h @@ -27,11 +27,10 @@ PyTelemetryTable GetTable(std::string_view name = ""); * bytearray, and memoryview). Wrap other buffer exporters in memoryview to * explicitly log their raw bytes in C order. */ -void Log( - std::string_view name, pybind11::object value, - pybind11::typing::Optional> - elementType = pybind11::none(), - std::string_view typeString = ""); +void Log(std::string_view name, pybind11::object value, + pybind11::typing::Optional> + elementType = pybind11::none(), + std::string_view typeString = ""); /** * Indicates duplicate values should be preserved. Normally duplicate values diff --git a/subprojects/robotpy-tunables/tunables/src/rpy/MockTunableBackendFunctions.h b/subprojects/robotpy-tunables/tunables/src/rpy/MockTunableBackendFunctions.h index 556e7bf1a..d997cb702 100644 --- a/subprojects/robotpy-tunables/tunables/src/rpy/MockTunableBackendFunctions.h +++ b/subprojects/robotpy-tunables/tunables/src/rpy/MockTunableBackendFunctions.h @@ -13,9 +13,9 @@ namespace wpi::tunables::python { -using RawValue = pybind11::typing::Union< - pybind11::bytes, pybind11::bytearray, pybind11::memoryview, - pybind11::typing::Iterable>; +using RawValue = pybind11::typing::Union>; using StructIterable = pybind11::typing::Iterable; void SetRaw(wpi::tunables::MockTunableBackend& self, std::string_view path, @@ -24,29 +24,29 @@ void SetStruct(wpi::tunables::MockTunableBackend& self, std::string_view path, pybind11::handle value); void SetStructVector(wpi::tunables::MockTunableBackend& self, std::string_view path, StructIterable value); -void SetBoolVector( - wpi::tunables::MockTunableBackend& self, std::string_view path, - pybind11::typing::Iterable value); -void SetInt32Vector( - wpi::tunables::MockTunableBackend& self, std::string_view path, - pybind11::typing::Iterable value); -void SetInt64Vector( - wpi::tunables::MockTunableBackend& self, std::string_view path, - pybind11::typing::Iterable value); -void SetFloatVector( - wpi::tunables::MockTunableBackend& self, std::string_view path, - pybind11::typing::Iterable value); -void SetDoubleVector( - wpi::tunables::MockTunableBackend& self, std::string_view path, - pybind11::typing::Iterable value); -void SetStringVector( - wpi::tunables::MockTunableBackend& self, std::string_view path, - pybind11::typing::Iterable value); - -std::optional GetUid( - const wpi::tunables::MockTunableBackend& self, std::string_view path); - -pybind11::object GetTunableValue( - const wpi::tunables::MockTunableBackend& self, std::string_view path); +void SetBoolVector(wpi::tunables::MockTunableBackend& self, + std::string_view path, + pybind11::typing::Iterable value); +void SetInt32Vector(wpi::tunables::MockTunableBackend& self, + std::string_view path, + pybind11::typing::Iterable value); +void SetInt64Vector(wpi::tunables::MockTunableBackend& self, + std::string_view path, + pybind11::typing::Iterable value); +void SetFloatVector(wpi::tunables::MockTunableBackend& self, + std::string_view path, + pybind11::typing::Iterable value); +void SetDoubleVector(wpi::tunables::MockTunableBackend& self, + std::string_view path, + pybind11::typing::Iterable value); +void SetStringVector(wpi::tunables::MockTunableBackend& self, + std::string_view path, + pybind11::typing::Iterable value); + +std::optional GetUid(const wpi::tunables::MockTunableBackend& self, + std::string_view path); + +pybind11::object GetTunableValue(const wpi::tunables::MockTunableBackend& self, + std::string_view path); } // namespace wpi::tunables::python diff --git a/subprojects/robotpy-tunables/tunables/src/rpy/PyTunable.h b/subprojects/robotpy-tunables/tunables/src/rpy/PyTunable.h index 8ba2d26c4..b6d97384a 100644 --- a/subprojects/robotpy-tunables/tunables/src/rpy/PyTunable.h +++ b/subprojects/robotpy-tunables/tunables/src/rpy/PyTunable.h @@ -27,13 +27,10 @@ namespace wpi::tunables::python { class PyTunable : public std::enable_shared_from_this { public: using Getter = pybind11::typing::Callable; - using Setter = - pybind11::typing::Callable; - using TuneCallback = - pybind11::typing::Callable; + using Setter = pybind11::typing::Callable; + using TuneCallback = pybind11::typing::Callable; using PythonType = pybind11::typing::Type; - using Properties = - pybind11::typing::Dict; + using Properties = pybind11::typing::Dict; /** * Creates an unpublished tunable. The tunable type is inferred from value @@ -43,7 +40,8 @@ class PyTunable : public std::enable_shared_from_this { * * @param value initial value * @param getter optional function that supplies the current local value - * @param setter optional function that receives values set locally or remotely + * @param setter optional function that receives values set locally or + * remotely * @param onTune callback that receives the value after a remote update * @param robust whether to separately echo a remotely set value * @param isMutable whether remote updates may change the tunable @@ -53,16 +51,16 @@ class PyTunable : public std::enable_shared_from_this { * @param typeString custom tunable type string * @param alwaysGet whether to call getter on every backend update */ - PyTunable(pybind11::object value, - std::optional getter = std::nullopt, - std::optional setter = std::nullopt, - std::optional onTune = std::nullopt, - bool robust = false, bool isMutable = true, - pybind11::typing::Optional valueType = pybind11::none(), - pybind11::typing::Optional elementType = pybind11::none(), - std::optional properties = std::nullopt, - std::string typeString = "", bool alwaysGet = false, - bool narrowScalar = false); + PyTunable( + pybind11::object value, std::optional getter = std::nullopt, + std::optional setter = std::nullopt, + std::optional onTune = std::nullopt, bool robust = false, + bool isMutable = true, + pybind11::typing::Optional valueType = pybind11::none(), + pybind11::typing::Optional elementType = pybind11::none(), + std::optional properties = std::nullopt, + std::string typeString = "", bool alwaysGet = false, + bool narrowScalar = false); wpi::tunables::detail::TunableBase& GetBase(); @@ -102,21 +100,15 @@ class PyTunable : public std::enable_shared_from_this { private: class CallbackOwner; - using TunableVariant = - std::variant, - wpi::tunables::Tunable, - WPyStructInfo>>; + using TunableVariant = std::variant< + wpi::tunables::TunableBool, wpi::tunables::TunableInt32, + wpi::tunables::TunableInt64, wpi::tunables::TunableFloat, + wpi::tunables::TunableDouble, wpi::tunables::TunableString, + wpi::tunables::TunableRaw, wpi::tunables::TunableBoolVector, + wpi::tunables::TunableInt64Vector, wpi::tunables::TunableDoubleVector, + wpi::tunables::TunableStringVector, + wpi::tunables::Tunable, + wpi::tunables::Tunable, WPyStructInfo>>; template static bool CachedValuesEqual(const T& lhs, const T& rhs); @@ -126,7 +118,7 @@ class PyTunable : public std::enable_shared_from_this { std::same_as || std::same_as>; static std::vector PackStructValue(const WPyStruct& value, - const WPyStructInfo& info); + const WPyStructInfo& info); template static std::optional> PackStructData(const T&); @@ -145,9 +137,8 @@ class PyTunable : public std::enable_shared_from_this { std::optional> PackCachedStructData() const; wpi::tunables::TunableConfig MakeConfig( - bool robust, bool isMutable, - const std::optional& properties, std::string typeString, - bool alwaysGet); + bool robust, bool isMutable, const std::optional& properties, + std::string typeString, bool alwaysGet); TunableVariant MakeValue( pybind11::handle value, bool robust, bool isMutable, const pybind11::typing::Optional& valueType, diff --git a/subprojects/robotpy-tunables/tunables/src/rpy/PyTunableTable.h b/subprojects/robotpy-tunables/tunables/src/rpy/PyTunableTable.h index a699c14b3..6185aa6a0 100644 --- a/subprojects/robotpy-tunables/tunables/src/rpy/PyTunableTable.h +++ b/subprojects/robotpy-tunables/tunables/src/rpy/PyTunableTable.h @@ -56,8 +56,8 @@ std::shared_ptr Add( wpi::tunables::TunableTable& table, std::string_view name, pybind11::object value, pybind11::typing::Optional valueType = pybind11::none(), - pybind11::typing::Optional elementType = pybind11::none(), bool robust = false, - bool isMutable = true, + pybind11::typing::Optional elementType = pybind11::none(), + bool robust = false, bool isMutable = true, std::optional onTune = std::nullopt, std::optional properties = std::nullopt, std::string typeString = ""); @@ -93,17 +93,17 @@ std::shared_ptr AddDouble( std::string typeString = ""); std::shared_ptr PublishValue( wpi::tunables::TunableTable& table, std::string_view name, Getter getter, - Setter setter, pybind11::typing::Optional valueType = pybind11::none(), - pybind11::typing::Optional elementType = pybind11::none(), bool robust = false, - bool isMutable = true, + Setter setter, + pybind11::typing::Optional valueType = pybind11::none(), + pybind11::typing::Optional elementType = pybind11::none(), + bool robust = false, bool isMutable = true, std::optional properties = std::nullopt, std::string typeString = ""); std::shared_ptr PublishBoolean( wpi::tunables::TunableTable& table, std::string_view name, TypedGetter getter, TypedSetter setter, bool robust = false, - bool isMutable = true, - std::optional properties = std::nullopt, + bool isMutable = true, std::optional properties = std::nullopt, std::string typeString = ""); std::shared_ptr PublishInt( wpi::tunables::TunableTable& table, std::string_view name, @@ -121,29 +121,25 @@ std::shared_ptr PublishFloat( wpi::tunables::TunableTable& table, std::string_view name, TypedGetter getter, TypedSetter setter, bool robust = false, - bool isMutable = true, - std::optional properties = std::nullopt, + bool isMutable = true, std::optional properties = std::nullopt, std::string typeString = ""); std::shared_ptr PublishDouble( wpi::tunables::TunableTable& table, std::string_view name, TypedGetter getter, - TypedSetter setter, - bool robust = false, bool isMutable = true, - std::optional properties = std::nullopt, + TypedSetter setter, bool robust = false, + bool isMutable = true, std::optional properties = std::nullopt, std::string typeString = ""); std::shared_ptr PublishString( wpi::tunables::TunableTable& table, std::string_view name, TypedGetter getter, - TypedSetter setter, - bool robust = false, bool isMutable = true, - std::optional properties = std::nullopt, + TypedSetter setter, bool robust = false, + bool isMutable = true, std::optional properties = std::nullopt, std::string typeString = ""); std::shared_ptr PublishBooleanArray( wpi::tunables::TunableTable& table, std::string_view name, ArrayGetter getter, ArraySetter setter, bool robust = false, - bool isMutable = true, - std::optional properties = std::nullopt, + bool isMutable = true, std::optional properties = std::nullopt, std::string typeString = ""); std::shared_ptr PublishIntegerArray( wpi::tunables::TunableTable& table, std::string_view name, @@ -154,23 +150,20 @@ std::shared_ptr PublishIntegerArray( std::shared_ptr PublishDoubleArray( wpi::tunables::TunableTable& table, std::string_view name, ArrayGetter getter, - ArraySetter setter, - bool robust = false, bool isMutable = true, - std::optional properties = std::nullopt, + ArraySetter setter, bool robust = false, + bool isMutable = true, std::optional properties = std::nullopt, std::string typeString = ""); std::shared_ptr PublishStringArray( wpi::tunables::TunableTable& table, std::string_view name, ArrayGetter getter, - ArraySetter setter, - bool robust = false, bool isMutable = true, - std::optional properties = std::nullopt, + ArraySetter setter, bool robust = false, + bool isMutable = true, std::optional properties = std::nullopt, std::string typeString = ""); std::shared_ptr PublishRaw( wpi::tunables::TunableTable& table, std::string_view name, TypedGetter getter, - TypedSetter setter, - bool robust = false, bool isMutable = true, - std::optional properties = std::nullopt, + TypedSetter setter, bool robust = false, + bool isMutable = true, std::optional properties = std::nullopt, std::string typeString = ""); void Remove(wpi::tunables::TunableTable& table, std::string_view name); void InvalidatePendingPublications(std::string_view path); diff --git a/subprojects/robotpy-tunables/tunables/src/rpy/TunableFunctions.h b/subprojects/robotpy-tunables/tunables/src/rpy/TunableFunctions.h index 4a7f308cf..019b86dad 100644 --- a/subprojects/robotpy-tunables/tunables/src/rpy/TunableFunctions.h +++ b/subprojects/robotpy-tunables/tunables/src/rpy/TunableFunctions.h @@ -49,7 +49,8 @@ bool Publish(std::string_view name, pybind11::object value); std::shared_ptr Add( std::string_view name, pybind11::object value, pybind11::typing::Optional valueType = pybind11::none(), - pybind11::typing::Optional elementType = pybind11::none(), + pybind11::typing::Optional elementType = + pybind11::none(), bool robust = false, bool isMutable = true, std::optional onTune = std::nullopt, std::optional properties = std::nullopt, diff --git a/subprojects/robotpy-tunables/tunables/src/rpy/TunableRegistryFunctions.h b/subprojects/robotpy-tunables/tunables/src/rpy/TunableRegistryFunctions.h index ed438df84..6e33f25ce 100644 --- a/subprojects/robotpy-tunables/tunables/src/rpy/TunableRegistryFunctions.h +++ b/subprojects/robotpy-tunables/tunables/src/rpy/TunableRegistryFunctions.h @@ -18,8 +18,7 @@ namespace wpi::tunables::python { using ReportWarningCallback = pybind11::typing::Callable; -using RemovableValue = - pybind11::typing::Union; +using RemovableValue = pybind11::typing::Union; class UpdateMutexContext final { public: diff --git a/subprojects/robotpy-tunables/tunables/src/rpy/TunableStorage.h b/subprojects/robotpy-tunables/tunables/src/rpy/TunableStorage.h index fe73a05b2..bf2b7d5d1 100644 --- a/subprojects/robotpy-tunables/tunables/src/rpy/TunableStorage.h +++ b/subprojects/robotpy-tunables/tunables/src/rpy/TunableStorage.h @@ -19,10 +19,10 @@ namespace detail { void StoreValue(std::string path, std::shared_ptr value); void StoreComplex(std::string path, - std::shared_ptr value); + std::shared_ptr value); void StoreNativeComplexValue(std::string path, pybind11::object value); -}; // namespace detail +} // namespace detail void StoreRefreshValue(std::string_view path, const std::shared_ptr& tunable); From 28c7216af2c6f16ba98748574d529e849f8a3b71 Mon Sep 17 00:00:00 2001 From: PJ Reiniger Date: Mon, 14 Sep 2026 20:01:25 -0400 Subject: [PATCH 3/3] Fixup --- .../telemetry/src/rpy/MockTelemetryBackendFunctions.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/subprojects/robotpy-telemetry/telemetry/src/rpy/MockTelemetryBackendFunctions.h b/subprojects/robotpy-telemetry/telemetry/src/rpy/MockTelemetryBackendFunctions.h index 27ba6075a..d9a500b28 100644 --- a/subprojects/robotpy-telemetry/telemetry/src/rpy/MockTelemetryBackendFunctions.h +++ b/subprojects/robotpy-telemetry/telemetry/src/rpy/MockTelemetryBackendFunctions.h @@ -15,7 +15,8 @@ class ActionValue : public pybind11::object { public: using pybind11::object::object; - ActionValue(pybind11::object&& value) : pybind11::object{std::move(value)} {} + explicit ActionValue(pybind11::object&& value) + : pybind11::object{std::move(value)} {} }; using ObjectDict = pybind11::typing::Dict;