mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-22 18:57:59 -05:00
[V3 JSON] Drivers deepcopy input/output data (#1855)
* [V3 JSON] Return deepcopy in JSON driver * Add a test * foo not bar * Add a test for setting and then mutating * Resolve issue for setting and mutating as well * Reformat
This commit is contained in:
@@ -335,7 +335,7 @@ class Group(Value):
|
||||
default = poss_default
|
||||
|
||||
try:
|
||||
return deepcopy(await self.driver.get(*self.identifiers, *path))
|
||||
return await self.driver.get(*self.identifiers, *path)
|
||||
except KeyError:
|
||||
if default is not ...:
|
||||
return default
|
||||
@@ -365,7 +365,7 @@ class Group(Value):
|
||||
|
||||
"""
|
||||
if not defaults:
|
||||
defaults = deepcopy(self.defaults)
|
||||
defaults = self.defaults
|
||||
|
||||
for key, value in current.items():
|
||||
if isinstance(value, collections.Mapping):
|
||||
|
||||
Reference in New Issue
Block a user