mirror of https://github.com/zulip/zulip.git
pep8: Add compliance with rule E261 to create-test-api-docs.
This commit is contained in:
parent
9c29da17fc
commit
bc987c99ca
|
@ -94,7 +94,7 @@ def create_single_page(pattern, out_dir, href, calls):
|
|||
|
||||
def create_user_docs():
|
||||
# type: () -> None
|
||||
fn = 'var/url_coverage.txt' # TODO: make path more robust, maybe use json suffix
|
||||
fn = 'var/url_coverage.txt' # TODO: make path more robust, maybe use json suffix
|
||||
|
||||
out_dir = 'var/api_docs'
|
||||
try:
|
||||
|
@ -121,7 +121,7 @@ def create_user_docs():
|
|||
for line in open(fn):
|
||||
calls.append(ujson.loads(line))
|
||||
|
||||
pattern_dict = defaultdict(list) # type: Dict[str, List[Call]]
|
||||
pattern_dict = defaultdict(list) # type: Dict[str, List[Call]]
|
||||
for call in calls:
|
||||
if 'pattern' in call:
|
||||
pattern = clean_up_pattern(call['pattern'])
|
||||
|
@ -136,7 +136,7 @@ def create_user_docs():
|
|||
('json', 'legacy'),
|
||||
]
|
||||
|
||||
groups = dict() # type: Dict[str, Set[str]]
|
||||
groups = dict() # type: Dict[str, Set[str]]
|
||||
for prefix, name in tups:
|
||||
groups[name] = {p for p in patterns if p.startswith(prefix)}
|
||||
patterns -= groups[name]
|
||||
|
|
Loading…
Reference in New Issue