Skip to content

Commit

Permalink
Precommit error correction
Browse files Browse the repository at this point in the history
  • Loading branch information
kadhikari committed Sep 7, 2023
1 parent bea9623 commit 5afe2cb
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 28 deletions.
4 changes: 3 additions & 1 deletion source/jormungandr/jormungandr/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,9 @@ def __init__(
if disable_database:
self.bss_provider_manager = BssProviderManager(app.config['BSS_PROVIDER'])
else:
self.bss_provider_manager = BssProviderManager(app.config['BSS_PROVIDER'], self.get_bss_stations_from_db)
self.bss_provider_manager = BssProviderManager(
app.config['BSS_PROVIDER'], self.get_bss_stations_from_db
)

self.external_service_provider_manager.init_external_services()
self.instance_db = instance_db
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,12 @@
from jormungandr.parking_space_availability.bss.common_bss_provider import CommonBssProvider, BssProxyError
import six

DEFAULT_FORSETI_FEED_PUBLISHER = {'id': 'forseti', 'name': 'forseti', 'license': 'Private', 'url': 'www.forseti.fr'}
DEFAULT_FORSETI_FEED_PUBLISHER = {
'id': 'forseti',
'name': 'forseti',
'license': 'Private',
'url': 'www.forseti.fr',
}


class ForsetiProvider(CommonBssProvider):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,7 @@
{
"id": "forseti_stations",
"class": "jormungandr.parking_space_availability.bss.forseti.ForsetiProvider",
"args": {
"service_url": "https://gbfs-station.forseti.sbx.aws.private/stations",
"timeout": 20
}
"args": {"service_url": "https://gbfs-station.forseti.sbx.aws.private/stations", "timeout": 20},
}
]

Expand All @@ -67,29 +64,13 @@ def parking_space_availability_forseti_get_informations_test():
{
"id": "TAN:Station:18",
"name": "018-VIARME",
"coord": {
"lat": 48.0981147,
"lon": -1.6552921
},
"vehicles": [
{
"type": "bicycle",
"count": 9
}
],
"docks": {
"available": 4,
"total": 13
},
"status": "OPEN"
"coord": {"lat": 48.0981147, "lon": -1.6552921},
"vehicles": [{"type": "bicycle", "count": 9}],
"docks": {"available": 4, "total": 13},
"status": "OPEN",
}
],
"pagination": {
"start_page": 0,
"items_on_page": 2,
"items_per_page": 25,
"total_result": 2
}
"pagination": {"start_page": 0, "items_on_page": 2, "items_per_page": 25, "total_result": 2},
}

provider = ForsetiProvider('http://forseti')
Expand Down
8 changes: 7 additions & 1 deletion source/navitiacommon/navitiacommon/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,10 @@
ENUM_SHAPE_SCOPE = ('admin', 'street', 'addr', 'poi', 'stop')
DEFAULT_SHAPE_SCOPE = ('admin', 'street', 'addr', 'poi')

ENUM_EXTERNAL_SERVICE = ('free_floatings', 'vehicle_occupancies', 'realtime_proxies', 'vehicle_positions', 'bss_stations')
ENUM_EXTERNAL_SERVICE = (
'free_floatings',
'vehicle_occupancies',
'realtime_proxies',
'vehicle_positions',
'bss_stations',
)

0 comments on commit 5afe2cb

Please sign in to comment.