From: Tareq Al-Ahdal Date: Fri, 18 Mar 2022 13:05:47 +0000 (+0800) Subject: fix linting error X-Git-Tag: v4.1.0~64^2~13 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/b6ac4ad8375325ca427c9e41d2eeec44830a7512 fix linting error --- diff --git a/nominatim/tools/country_info.py b/nominatim/tools/country_info.py index 1ae53c28..a7c69315 100644 --- a/nominatim/tools/country_info.py +++ b/nominatim/tools/country_info.py @@ -80,7 +80,7 @@ def setup_country_tables(dsn, sql_dir, ignore_partitions=False): params.append((ccode, partition, lang)) name = add_prefix_to_keys(props.get('names').get('name'), 'name:') - name = json.dumps(name , ensure_ascii=False, separators=(', ', '=>')) + name = json.dumps(name, ensure_ascii=False, separators=(', ', '=>')) country_names_data += ccode + '\t' + name[1:-1] + '\n' with connect(dsn) as conn: with conn.cursor() as cur: @@ -111,9 +111,6 @@ def create_country_names(conn, tokenizer, languages=None): if languages: languages = languages.split(',') - # def _include_key(key): - # return key.startswith('name:') and \ - # key[5:] in languages or key[5:] == 'default' def _include_key(key): return key == 'name' or \ (key.startswith('name:') and (not languages or key[5:] in languages))