Fix invalid black formatting

This commit is contained in:
Gautier P 2021-02-08 16:21:55 +01:00
parent bd07988549
commit 1bd855dbd8
5 changed files with 9 additions and 9 deletions

View File

@ -271,7 +271,7 @@ def load_config(args=None, check_with_data=True):
config_data.update(json.load(fh)) config_data.update(json.load(fh))
except (IOError, ValueError) as exc: except (IOError, ValueError) as exc:
LOGGER.error( LOGGER.error(
"Unable to load configuration from file, " "using default configuration: %s.", "Unable to load configuration from file, using default configuration: %s.",
exc, exc,
) )

View File

@ -24,7 +24,7 @@ try:
from weboob.core.ouiboube import WebNip from weboob.core.ouiboube import WebNip
from weboob.tools.json import WeboobEncoder from weboob.tools.json import WeboobEncoder
except ImportError: except ImportError:
LOGGER.error("Weboob is not available on your system. Make sure you " "installed it.") LOGGER.error("Weboob is not available on your system. Make sure you installed it.")
raise raise
@ -107,7 +107,7 @@ class WebOOBProxy(object):
except CallErrors as exc: except CallErrors as exc:
# If an error occured, just log it # If an error occured, just log it
LOGGER.error( LOGGER.error(
("An error occured while building query for " "postal code %s: %s"), ("An error occured while building query for postal code %s: %s"),
postal_code, postal_code,
str(exc), str(exc),
) )

View File

@ -330,7 +330,7 @@ def deep_detect(flats_list, config):
if n_common_items >= config["duplicate_threshold"]: if n_common_items >= config["duplicate_threshold"]:
# Mark flats as duplicates # Mark flats as duplicates
LOGGER.info( LOGGER.info(
("Found duplicates using deep detection: (%s, %s). " "Score is %d."), ("Found duplicates using deep detection: (%s, %s). Score is %d."),
flat1["id"], flat1["id"],
flat2["id"], flat2["id"],
n_common_items, n_common_items,

View File

@ -192,7 +192,7 @@ def guess_postal_code(flats_list, constraint, config, distance_threshold=20000):
if not location: if not location:
# Skip everything if empty location # Skip everything if empty location
LOGGER.info( LOGGER.info(
("No location field for flat %s, skipping postal " "code lookup. (%s)"), ("No location field for flat %s, skipping postal code lookup. (%s)"),
flat["id"], flat["id"],
flat.get("address"), flat.get("address"),
) )
@ -358,7 +358,7 @@ def guess_stations(flats_list, constraint, config):
) )
break break
LOGGER.info( LOGGER.info(
("Station %s is too far from flat %s (%dm > %dm), " "discarding this station."), ("Station %s is too far from flat %s (%dm > %dm), discarding this station."),
station[0], station[0],
flat["id"], flat["id"],
int(distance), int(distance),
@ -418,7 +418,7 @@ def compute_travel_times(flats_list, constraint, config):
if not flat["flatisfy"].get("matched_stations", []): if not flat["flatisfy"].get("matched_stations", []):
# Skip any flat without matched stations # Skip any flat without matched stations
LOGGER.info( LOGGER.info(
"Skipping travel time computation for flat %s. No matched " "stations.", "Skipping travel time computation for flat %s. No matched stations.",
flat["id"], flat["id"],
) )
continue continue

View File

@ -416,7 +416,7 @@ def get_travel_time_between(latlng_from, latlng_to, mode, config):
) as exc: ) as exc:
# Ignore any possible exception # Ignore any possible exception
LOGGER.warning( LOGGER.warning(
"An exception occurred during travel time lookup on " "Navitia: %s.", "An exception occurred during travel time lookup on Navitia: %s.",
str(exc), str(exc),
) )
else: else:
@ -461,7 +461,7 @@ def get_travel_time_between(latlng_from, latlng_to, mode, config):
except (requests.exceptions.RequestException, IndexError, KeyError) as exc: except (requests.exceptions.RequestException, IndexError, KeyError) as exc:
# Ignore any possible exception # Ignore any possible exception
LOGGER.warning( LOGGER.warning(
"An exception occurred during travel time lookup on " "Mapbox: %s.", "An exception occurred during travel time lookup on Mapbox: %s.",
str(exc), str(exc),
) )
else: else: