Skip to content
This repository was archived by the owner on Aug 26, 2024. It is now read-only.

Commit 2f87f28

Browse files
Merge pull request #7 from danballance/align-with-current-basecodec
Convert HALCodec.load to use kwargs for additional parameters.
2 parents 2a3df8f + 2a0be83 commit 2f87f28

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

hal_codec/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import uritemplate
99

1010

11-
__version__ = "1.0.0"
11+
__version__ = "1.0.1"
1212

1313

1414
def _get_string(item, key):
@@ -214,10 +214,11 @@ def dump(self, document, indent=False, **kwargs):
214214
data = _document_to_primative(document)
215215
return force_bytes(json.dumps(data, **options))
216216

217-
def load(self, bytes, base_url=None):
217+
def load(self, bytes, **kwargs):
218218
"""
219219
Takes a bytestring and returns a document.
220220
"""
221+
base_url = kwargs.get('base_url', None)
221222
try:
222223
data = json.loads(bytes.decode('utf-8'))
223224
except ValueError as exc:

0 commit comments

Comments
 (0)