From 1f75afa1de344ca19f9d6820a92d97a75fbe1733 Mon Sep 17 00:00:00 2001 From: Christian Ledermann Date: Sat, 5 Oct 2024 11:41:35 +0100 Subject: [PATCH] #216 add default values for features --- fastkml/features.py | 6 +++++- tests/geometries/geometry_test.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/fastkml/features.py b/fastkml/features.py index 4f809f0f..3261316f 100644 --- a/fastkml/features.py +++ b/fastkml/features.py @@ -353,6 +353,7 @@ def __repr__(self) -> str: classes=(bool,), get_kwarg=subelement_bool_kwarg, set_element=bool_subelement, + default=True, ), ) registry.register( @@ -364,6 +365,7 @@ def __repr__(self) -> str: classes=(bool,), get_kwarg=subelement_bool_kwarg, set_element=bool_subelement, + default=False, ), ) registry.register( @@ -745,7 +747,7 @@ class NetworkLink(_Feature): For example, Google Earth would fly to the view of the parent Document, not the of the Placemarks contained within the Document. (required) - https://developers.google.com/kml/documentation/kmlreference#link + https://developers.google.com/kml/documentation/kmlreference#networklink """ refresh_visibility: Optional[bool] @@ -921,6 +923,7 @@ def __bool__(self) -> bool: classes=(bool,), get_kwarg=subelement_bool_kwarg, set_element=bool_subelement, + default=False, ), ) registry.register( @@ -932,6 +935,7 @@ def __bool__(self) -> bool: classes=(bool,), get_kwarg=subelement_bool_kwarg, set_element=bool_subelement, + default=False, ), ) registry.register( diff --git a/tests/geometries/geometry_test.py b/tests/geometries/geometry_test.py index 83c59cdd..472e3bf5 100644 --- a/tests/geometries/geometry_test.py +++ b/tests/geometries/geometry_test.py @@ -1,4 +1,4 @@ -# Copyright (C) 2021 - 2023 Christian Ledermann +# Copyright (C) 2021 - 2024 Christian Ledermann # # This library is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free