Pylint and flake8
This commit is contained in:
parent
5a35e4a9ba
commit
dac3c9d1b5
1 changed files with 4 additions and 4 deletions
|
@ -68,7 +68,7 @@ def get_next_departure(sched, start_station_id, end_station_id):
|
||||||
AND start_station.stop_id = :origin_station_id
|
AND start_station.stop_id = :origin_station_id
|
||||||
AND end_station.stop_id = :end_station_id
|
AND end_station.stop_id = :end_station_id
|
||||||
ORDER BY origin_stop_time.departure_time LIMIT 1;""".format(day_name))
|
ORDER BY origin_stop_time.departure_time LIMIT 1;""".format(day_name))
|
||||||
result = sched.engine.execute(sql_query,now_str=now_str,
|
result = sched.engine.execute(sql_query, now_str=now_str,
|
||||||
origin_station_id=origin_station.id,
|
origin_station_id=origin_station.id,
|
||||||
end_station_id=destination_station.id)
|
end_station_id=destination_station.id)
|
||||||
item = {}
|
item = {}
|
||||||
|
@ -145,11 +145,11 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||||
gtfs_dir = hass.config.path("gtfs")
|
gtfs_dir = hass.config.path("gtfs")
|
||||||
|
|
||||||
if not os.path.exists(gtfs_dir):
|
if not os.path.exists(gtfs_dir):
|
||||||
os.makedirs(gtfs_dir)
|
os.makedirs(gtfs_dir)
|
||||||
|
|
||||||
if not os.path.exists(os.path.join(gtfs_dir, config["data"])):
|
if not os.path.exists(os.path.join(gtfs_dir, config["data"])):
|
||||||
_LOGGER.error("The given GTFS data file/folder was not found!")
|
_LOGGER.error("The given GTFS data file/folder was not found!")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
dev = []
|
dev = []
|
||||||
dev.append(GTFSDepartureSensor(config["data"], gtfs_dir,
|
dev.append(GTFSDepartureSensor(config["data"], gtfs_dir,
|
||||||
|
|
Loading…
Add table
Reference in a new issue