Skip to content

Commit

Permalink
pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
vchudnov-g committed Sep 2, 2022
1 parent 1c9f830 commit 3ec9927
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions google/api_core/rest_helpers.py
Expand Up @@ -40,7 +40,8 @@ def flatten_query_params(obj, strict=False):
Args:
obj: a possibly nested dictionary (from json), or None
strict: a bool, defaulting to False, to enforce that all values in the result tuples be strings and, if boolean, lower-cased.
strict: a bool, defaulting to False, to enforce that all values in the
result tuples be strings and, if boolean, lower-cased.
Returns: a list of tuples, with each tuple having a (possibly) multi-part name
and a scalar value.
Expand Down Expand Up @@ -81,7 +82,10 @@ def _flatten_value(obj, key_path, strict=False):


def _flatten_dict(obj, key_path, strict=False):
items = (_flatten(value, key_path=key_path + [key], strict=strict) for key, value in obj.items())
items = (
_flatten(value, key_path=key_path + [key], strict=strict)
for key, value in obj.items()
)
return functools.reduce(operator.concat, items, [])


Expand Down

0 comments on commit 3ec9927

Please sign in to comment.