mirror of
https://github.com/python/cpython.git
synced 2025-09-27 18:59:43 +00:00
Fix indentation (reindent.py).
This commit is contained in:
parent
dd1c638b92
commit
9719161858
1 changed files with 4 additions and 4 deletions
|
@ -139,12 +139,12 @@ class Grammar(object):
|
||||||
|
|
||||||
def _make_deterministic(top):
|
def _make_deterministic(top):
|
||||||
if isinstance(top, dict):
|
if isinstance(top, dict):
|
||||||
return collections.OrderedDict(
|
return collections.OrderedDict(
|
||||||
sorted(((k, _make_deterministic(v)) for k, v in top.items())))
|
sorted(((k, _make_deterministic(v)) for k, v in top.items())))
|
||||||
if isinstance(top, list):
|
if isinstance(top, list):
|
||||||
return [_make_deterministic(e) for e in top]
|
return [_make_deterministic(e) for e in top]
|
||||||
if isinstance(top, tuple):
|
if isinstance(top, tuple):
|
||||||
return tuple(_make_deterministic(e) for e in top)
|
return tuple(_make_deterministic(e) for e in top)
|
||||||
return top
|
return top
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue