Skip to content

Commit 64d3a4d

Browse files
committed
change TypeConfig.update to updated
1 parent 77e0af3 commit 64d3a4d

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

Diff for: jsonobject/base.py

+9-2
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,14 @@ def replace(self, properties=None, string_conversions=None):
642642
else self._string_conversions)
643643
)
644644

645-
def update(self, properties=None, string_conversions=None):
645+
def updated(self, properties=None, string_conversions=None):
646+
"""
647+
update properties and string_conversions with the paramenters
648+
keeping all non-mentioned items the same as before
649+
returns a new TypeConfig with these changes
650+
(does not modify original)
651+
652+
"""
646653
_properties = self._properties.copy()
647654
_string_conversions = self.string_conversions[:]
648655
if properties:
@@ -719,7 +726,7 @@ def __configure(cls, properties=None, string_conversions=None,
719726
"{} {}".format(properties, update_properties)
720727
type_config = super_settings.type_config
721728
if update_properties is not None:
722-
type_config = type_config.update(properties=update_properties)
729+
type_config = type_config.updated(properties=update_properties)
723730
elif properties is not None:
724731
type_config = type_config.replace(properties=properties)
725732
if string_conversions is not None:

0 commit comments

Comments
 (0)