From 51b2f3b55e748c1ae2df9bbbd153c15c3fac6b00 Mon Sep 17 00:00:00 2001 From: Patrick Huck Date: Mon, 8 Apr 2024 14:57:44 -0700 Subject: [PATCH] minor linting fixes --- mpcontribs-client/mpcontribs/client/__init__.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mpcontribs-client/mpcontribs/client/__init__.py b/mpcontribs-client/mpcontribs/client/__init__.py index 501616fa3..dc414f295 100644 --- a/mpcontribs-client/mpcontribs/client/__init__.py +++ b/mpcontribs-client/mpcontribs/client/__init__.py @@ -288,7 +288,7 @@ def _response_hook(resp, *args, **kwargs): resp.count = 0 -def _chunk_by_size(items, max_size=0.95*MAX_BYTES): +def _chunk_by_size(items, max_size=0.95 * MAX_BYTES): buffer, buffer_size = [], 0 for idx, item in enumerate(items): @@ -1732,10 +1732,10 @@ def get_all_ids( raise MPContribsClientError(f"`op` has to be one of {ops}") unique_identifiers = self.get_unique_identifiers_flags() - data_id_fields = { - k: v for k, v in data_id_fields.items() - if k in unique_identifiers and isinstance(v, str) - } if data_id_fields else {} + data_id_fields = data_id_fields or {} + for k, v in data_id_fields.items(): + if k in unique_identifiers and isinstance(v, str): + data_id_fields[k] = v ret = {} query = query or {}