Browse Source

made pep8 compliant

no_compress
Raphael Roberts 7 years ago
parent
commit
ae8b70ef0a
  1. 2
      ctabus.py
  2. 2
      main.py

2
ctabus.py

@ -10,7 +10,7 @@ def get_data(type, api_key=api, timeout=None, **args):
args['format'] = 'json'
url = base_url.format(type=type, query=urlencode(args))
if timeout is not None:
response = urlopen(url,timeout = timeout)
response = urlopen(url, timeout=timeout)
else:
response = urlopen(url)
data = json.load(response)['bustime-response']

2
main.py

@ -73,6 +73,7 @@ def pprint_delta(delta):
def gen_list(objs, data, *displays, key=None, sort=0, num_pic=True):
from print2d import print2d
k = displays[sort]
display_data = {obj[k]: obj[data] for obj in objs}
srt_keys = sorted(display_data.keys(), key=key)
@ -158,7 +159,6 @@ def main(args):
if not args.arg.isdecimal():
# save on import time slightly
from print2d import print2d
from search import Search, StopSearch
# routes
if not args.route:

Loading…
Cancel
Save