From 1bd855dbd84e19911fe565779d2a2a07d5aba328 Mon Sep 17 00:00:00 2001 From: Gautier P Date: Mon, 8 Feb 2021 16:21:55 +0100 Subject: [PATCH] Fix invalid black formatting --- flatisfy/config.py | 2 +- flatisfy/fetch.py | 4 ++-- flatisfy/filters/duplicates.py | 2 +- flatisfy/filters/metadata.py | 6 +++--- flatisfy/tools.py | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/flatisfy/config.py b/flatisfy/config.py index 285d32f..ce49ff0 100644 --- a/flatisfy/config.py +++ b/flatisfy/config.py @@ -271,7 +271,7 @@ def load_config(args=None, check_with_data=True): config_data.update(json.load(fh)) except (IOError, ValueError) as exc: LOGGER.error( - "Unable to load configuration from file, " "using default configuration: %s.", + "Unable to load configuration from file, using default configuration: %s.", exc, ) diff --git a/flatisfy/fetch.py b/flatisfy/fetch.py index f2d7c5f..736aefb 100644 --- a/flatisfy/fetch.py +++ b/flatisfy/fetch.py @@ -24,7 +24,7 @@ try: from weboob.core.ouiboube import WebNip from weboob.tools.json import WeboobEncoder 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 @@ -107,7 +107,7 @@ class WebOOBProxy(object): except CallErrors as exc: # If an error occured, just log it 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, str(exc), ) diff --git a/flatisfy/filters/duplicates.py b/flatisfy/filters/duplicates.py index 0c73f35..6fba5aa 100644 --- a/flatisfy/filters/duplicates.py +++ b/flatisfy/filters/duplicates.py @@ -330,7 +330,7 @@ def deep_detect(flats_list, config): if n_common_items >= config["duplicate_threshold"]: # Mark flats as duplicates LOGGER.info( - ("Found duplicates using deep detection: (%s, %s). " "Score is %d."), + ("Found duplicates using deep detection: (%s, %s). Score is %d."), flat1["id"], flat2["id"], n_common_items, diff --git a/flatisfy/filters/metadata.py b/flatisfy/filters/metadata.py index 64cfd16..d7887db 100644 --- a/flatisfy/filters/metadata.py +++ b/flatisfy/filters/metadata.py @@ -192,7 +192,7 @@ def guess_postal_code(flats_list, constraint, config, distance_threshold=20000): if not location: # Skip everything if empty location 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.get("address"), ) @@ -358,7 +358,7 @@ def guess_stations(flats_list, constraint, config): ) break 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], flat["id"], int(distance), @@ -418,7 +418,7 @@ def compute_travel_times(flats_list, constraint, config): if not flat["flatisfy"].get("matched_stations", []): # Skip any flat without matched stations LOGGER.info( - "Skipping travel time computation for flat %s. No matched " "stations.", + "Skipping travel time computation for flat %s. No matched stations.", flat["id"], ) continue diff --git a/flatisfy/tools.py b/flatisfy/tools.py index 34f34c2..d7ae0dc 100644 --- a/flatisfy/tools.py +++ b/flatisfy/tools.py @@ -416,7 +416,7 @@ def get_travel_time_between(latlng_from, latlng_to, mode, config): ) as exc: # Ignore any possible exception LOGGER.warning( - "An exception occurred during travel time lookup on " "Navitia: %s.", + "An exception occurred during travel time lookup on Navitia: %s.", str(exc), ) else: @@ -461,7 +461,7 @@ def get_travel_time_between(latlng_from, latlng_to, mode, config): except (requests.exceptions.RequestException, IndexError, KeyError) as exc: # Ignore any possible exception LOGGER.warning( - "An exception occurred during travel time lookup on " "Mapbox: %s.", + "An exception occurred during travel time lookup on Mapbox: %s.", str(exc), ) else: