Skip to content

Commit 374e476

Browse files
committed
fix unbound monty_decode
1 parent 7763736 commit 374e476

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

mp_api/client/mprester.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,8 @@ def __init__(
255255
endpoint=self.endpoint,
256256
include_user_agent=include_user_agent,
257257
session=self.session,
258-
monty_decode=monty_decode,
259-
use_document_model=use_document_model,
258+
monty_decode=self.monty_decode,
259+
use_document_model=self.use_document_model,
260260
headers=self.headers,
261261
mute_progress_bars=self.mute_progress_bars,
262262
)
@@ -275,14 +275,14 @@ def __init__(
275275
if len(suffix_split) == 1:
276276
# Disable monty decode on nested data which may give errors
277277
monty_disable = cls in [TaskRester, ProvenanceRester]
278-
monty_decode = False if monty_disable else monty_decode
278+
monty_decode = False if monty_disable else self.monty_decode
279279
rester = cls(
280280
api_key=api_key,
281281
endpoint=self.endpoint,
282282
include_user_agent=include_user_agent,
283283
session=self.session,
284284
monty_decode=monty_decode,
285-
use_document_model=use_document_model,
285+
use_document_model=self.use_document_model,
286286
headers=self.headers,
287287
mute_progress_bars=self.mute_progress_bars,
288288
) # type: BaseRester
@@ -305,14 +305,14 @@ def __core_custom_getattr(_self, _attr, _rester_map):
305305
if _attr in _rester_map:
306306
cls = _rester_map[_attr]
307307
monty_disable = cls in [TaskRester, ProvenanceRester]
308-
monty_decode = False if monty_disable else monty_decode
308+
monty_decode = False if monty_disable else self.monty_decode
309309
rester = cls(
310310
api_key=api_key,
311311
endpoint=self.endpoint,
312312
include_user_agent=include_user_agent,
313313
session=self.session,
314314
monty_decode=monty_decode,
315-
use_document_model=use_document_model,
315+
use_document_model=self.use_document_model,
316316
headers=self.headers,
317317
mute_progress_bars=self.mute_progress_bars,
318318
) # type: BaseRester

0 commit comments

Comments
 (0)