Skip to content

Commit a79bb96

Browse files
authored
Merge pull request #10 from JJ11teen/dev
add new params to wrappers
2 parents d41c894 + 83df1f2 commit a79bb96

File tree

3 files changed

+10
-14
lines changed

3 files changed

+10
-14
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2021 Lucas Sargent, Eliiza
3+
Copyright (c) 2022 Lucas Sargent
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = cloud-mappings
33
version = 1.0.0
44
author = Lucas Sargent
5-
author_email = lucas.sargent@eliiza.com.au
5+
author_email = lucas.sargent@outlook.com
66
description = MutableMapping interfaces for common cloud storage providers
77
keywords = mutable dict aws s3 azure gcp
88
long_description = file: README.md

src/cloudmappings/wrappers.py

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
11
from .cloudstoragemapping import CloudMapping
22

33

4-
def _parse_cloud_mapping_kwargs(kwargs):
5-
cloud_mapping_kwargs = {}
6-
7-
try:
8-
cloud_mapping_kwargs["sync_initially"] = kwargs.pop("sync_initially")
9-
except KeyError:
10-
pass
11-
try:
12-
cloud_mapping_kwargs["read_blindly"] = kwargs.pop("read_blindly")
13-
except KeyError:
14-
pass
15-
4+
def _parse_cloud_mapping_kwargs(kwargs: dict):
5+
cloud_mapping_kwargs = dict(
6+
sync_initially=kwargs.pop("sync_initially", True),
7+
read_blindly=kwargs.pop("read_blindly", False),
8+
read_blindly_default=kwargs.pop("read_blindly_default", None),
9+
ordered_dumps_funcs=kwargs.pop("ordered_dumps_funcs", None),
10+
ordered_loads_funcs=kwargs.pop("ordered_loads_funcs", None),
11+
)
1612
return cloud_mapping_kwargs, kwargs
1713

1814

0 commit comments

Comments
 (0)