mirror of https://github.com/zulip/zulip.git
Change len(obj.keys()) to len(obj) in tools/get-handlebar-vars.
This prevents libmodernize.fixes.fix_dict_six from reporting this on running tools/travis/py3k.
This commit is contained in:
parent
0af154a301
commit
ab02ab31e3
|
@ -90,7 +90,7 @@ def parse_file(fn):
|
||||||
if isinstance(obj, list):
|
if isinstance(obj, list):
|
||||||
return [clean_this(item) for item in obj]
|
return [clean_this(item) for item in obj]
|
||||||
if isinstance(obj, dict):
|
if isinstance(obj, dict):
|
||||||
if len(obj.keys()) == 1 and 'this' in obj:
|
if len(obj) == 1 and 'this' in obj:
|
||||||
return clean_this(obj['this'])
|
return clean_this(obj['this'])
|
||||||
return {k: clean_this(v) for k, v in obj.items()}
|
return {k: clean_this(v) for k, v in obj.items()}
|
||||||
return obj
|
return obj
|
||||||
|
|
Loading…
Reference in New Issue