From 9bdee227b35572b3b0468e6adaca3d4de872f0e0 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sat, 8 May 2021 09:26:10 -0700 Subject: [PATCH] Replace dotdict init by dict with init by kwargs. --- voussoirkit/spinal.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/voussoirkit/spinal.py b/voussoirkit/spinal.py index 42f14c8..6ae16b9 100644 --- a/voussoirkit/spinal.py +++ b/voussoirkit/spinal.py @@ -301,11 +301,12 @@ def copy_dir( if files_per_second is not None: files_per_second.limit(1) - results = dotdict.DotDict({ - 'source': source, - 'destination': destination, - 'written_bytes': written_bytes, - }) + results = dotdict.DotDict( + source=source, + destination=destination, + written_bytes=written_bytes, + default=None, + ) return results def copy_file( @@ -415,11 +416,12 @@ def copy_file( bytes_per_second = limiter_or_none(bytes_per_second) - results = dotdict.DotDict({ - 'source': source, - 'destination': destination, - 'written_bytes': 0, - }, default=None) + results = dotdict.DotDict( + source=source, + destination=destination, + written_bytes=0, + default=None, + ) # Determine overwrite if destination.exists: