Skip to content

Commit 1c05d62

Browse files
committed
fix review
1 parent cd3230b commit 1c05d62

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

elixir/api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@ def on_get(self, req, resp, project, ident):
4646
if version == 'latest':
4747
version = query.query('latest')
4848

49-
symbol_definitions, symbol_references, symbol_doccomments, peaks = query.query('ident', version, ident, family)
49+
symbol_definitions, symbol_references, symbol_doccomments, peeks = query.query('ident', version, ident, family)
5050

5151
resp.status = falcon.HTTP_200
5252
resp.content_type = falcon.MEDIA_JSON
5353
resp.media = {
5454
'definitions': [sym.__dict__ for sym in symbol_definitions],
5555
'references': [sym.__dict__ for sym in symbol_references],
5656
'documentations': [sym.__dict__ for sym in symbol_doccomments],
57-
'peeks': peaks
57+
'peeks': peeks
5858
}
5959

6060
query.close()

elixir/query.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,9 +425,7 @@ def get_files_and_zip(self, version, syms):
425425
batch_res = batch_res[size:]
426426
yield sym, content
427427

428-
429428
def get_peeks_of_syms(self, version, symbol_definitions, symbol_references):
430-
431429
peeks = {}
432430

433431
def request_peeks(syms):

elixir/web.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import datetime
2828
from collections import OrderedDict, namedtuple
2929
from re import search, sub
30-
from typing import Any, Callable, NamedTuple, Tuple
30+
from typing import Any, Callable, Dict, NamedTuple, Tuple
3131
from urllib import parse
3232
import falcon
3333
import jinja2
@@ -667,7 +667,7 @@ def generate_source_page(ctx: RequestContext, q: Query,
667667

668668
# Converts SymbolInstance into SymbolEntry
669669
# path of SymbolInstance will be appended to base_url
670-
def symbol_instance_to_entry(base_url, symbol, peeks):
670+
def symbol_instance_to_entry(base_url: str, symbol: SymbolInstance, peeks: Dict[str, Dict[int, str]]) -> SymbolEntry:
671671
# TODO this should be a responsibility of Query
672672
if type(symbol.line) is str:
673673
line_numbers = symbol.line.split(',')

0 commit comments

Comments
 (0)