Skip to content

Commit f3b9108

Browse files
committed
Reformatting for consistency
1 parent e025e94 commit f3b9108

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

CppHeaderParser/CppHeaderParser.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3707,25 +3707,30 @@ def _strip_parent_keys(self):
37073707
def toJSON(self, indent=4, separators=None):
37083708
"""Converts a parsed structure to JSON"""
37093709
import json
3710+
37103711
self._strip_parent_keys()
3711-
def clean_dict(markers, keys = []):
3712-
if (id(markers) in keys):
3712+
3713+
def clean_dict(markers, keys=[]):
3714+
if id(markers) in keys:
37133715
return None
37143716
elif isinstance(markers, dict):
37153717
keys_ = keys + [id(markers)]
3716-
return {key: clean_dict(markers[key], keys_) for
3717-
key, value in markers.items()}
3718+
return {
3719+
key: clean_dict(markers[key], keys_)
3720+
for key, value in markers.items()
3721+
}
37183722
elif type(markers) in [list, set, tuple]:
37193723
return type(markers)(clean_dict(m, keys) for m in markers)
37203724
return markers
3725+
37213726
try:
37223727
del self.__dict__["classes_order"]
37233728
except:
37243729
pass
37253730

37263731
d = self.__dict__
37273732
d["classes"] = clean_dict(d["classes"])
3728-
return json.dumps(d, indent=indent, separators=separators, default = "")
3733+
return json.dumps(d, indent=indent, separators=separators, default="")
37293734

37303735
def __repr__(self):
37313736
rtn = {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy