From dce723e6e3732bbf1c7bb6480b5708d4e2bc427f Mon Sep 17 00:00:00 2001 From: Adam Shapiro Date: Tue, 14 May 2024 10:50:51 -0400 Subject: [PATCH 1/2] Reset CSV-style command line arg default value if user specified a value. Previously, if the user set --arg value, it would append it to the existing defaults unexpectedly. --- python/fusion_engine_client/utils/argument_parser.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/fusion_engine_client/utils/argument_parser.py b/python/fusion_engine_client/utils/argument_parser.py index 2db5adf3..a5812cac 100644 --- a/python/fusion_engine_client/utils/argument_parser.py +++ b/python/fusion_engine_client/utils/argument_parser.py @@ -176,6 +176,8 @@ def __call__(self, parser, namespace, values, option_string=None): result = getattr(namespace, self.dest) if result is None: result = [] + elif result is self.default: + result = [] result.extend(flattened_values) setattr(namespace, self.dest, result) From 4fe1f4d23739c5f0c9f20370b80b5cbbc78e99ee Mon Sep 17 00:00:00 2001 From: Adam Shapiro Date: Tue, 14 May 2024 10:51:37 -0400 Subject: [PATCH 2/2] Added a str() operator for DataVersion. repr() will still appear as "DataVersion(major=6, minor=7)". --- python/fusion_engine_client/messages/configuration.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/fusion_engine_client/messages/configuration.py b/python/fusion_engine_client/messages/configuration.py index 1743e2b9..376e815d 100644 --- a/python/fusion_engine_client/messages/configuration.py +++ b/python/fusion_engine_client/messages/configuration.py @@ -1601,6 +1601,9 @@ class DataVersion(NamedTuple): major: int minor: int + def __str__(self): + return f'{self.major}.{self.minor}' + _DataVersionConstructRaw = Struct( Padding(1),