From d2dfff739fa60f0146ecfd90c67ed534ce201f00 Mon Sep 17 00:00:00 2001 From: Mateusz Konieczny <matkoniecz@gmail.com> Date: Sun, 9 Feb 2025 09:09:14 +0100 Subject: [PATCH] fix some typos --- 0_config.py | 2 +- 17_list_mismatching_brand_wikidata.py | 2 +- opening_hours_parser.py | 4 ++-- qa.py | 2 +- test_matching_logic.py | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/0_config.py b/0_config.py index 36b3d0e..bfdd34c 100644 --- a/0_config.py +++ b/0_config.py @@ -862,7 +862,7 @@ def ignored_atp_codes(): 'wildberries', # are all shop=outpost or is shop=clothes also a valid tagging? # Should shop=outpost and shop=clothes match? # asked some mappers in 2025-01-24 - # see https://www.openstreetmap.org/changeset/84470694 (current reccommended comment) + # see https://www.openstreetmap.org/changeset/84470694 (current recommended comment) # see also # https://www.openstreetmap.org/changeset/138486607 (JOSM) # https://www.openstreetmap.org/changeset/143172111 (Organic) diff --git a/17_list_mismatching_brand_wikidata.py b/17_list_mismatching_brand_wikidata.py index 7a093f3..fbafc5f 100644 --- a/17_list_mismatching_brand_wikidata.py +++ b/17_list_mismatching_brand_wikidata.py @@ -27,7 +27,7 @@ def skipping_any_of_this_wikidata_ids(osm_wikidata_id, atp_wikidata_id): # asked in #wikimedia on US slack # TODO_OSM: described as a former brand at Wikipedia # https://overpass-turbo.eu/s/1Y0S - for these brand:wikidata should be simply removed, I think - # that would make https://overpass-turbo.eu/s/1Y0O outdated and cadidate to be raised with mappers + # that would make https://overpass-turbo.eu/s/1Y0O outdated and candidate to be raised with mappers # https://overpass-turbo.eu/s/1Y0U - Simply Market may exist - but likely not one operated by Auchan # proposed text in https://www.openstreetmap.org/note/4607954 'Q105857776', 'Q3484790', #Is it possible to model at Wikidata that https://www.wikidata.org/wiki/Q3484790 is subbrand (or at least in the same family of brands) to https://www.wikidata.org/wiki/Q105857776 ? diff --git a/opening_hours_parser.py b/opening_hours_parser.py index a6fd01a..139b704 100644 --- a/opening_hours_parser.py +++ b/opening_hours_parser.py @@ -1,7 +1,7 @@ """ This is a low-quality parser of a tiny part of opening_hours syntax It definitely can be done better. I would appreciate pointers to better -ways to achive it in Python. +ways to achieve it in Python. It is definitely miserably slow. At the same time it is good enough here as ATP does not emit elaborate opening_hours syntax @@ -163,7 +163,7 @@ class OpeningHours(): print("SOMETHING FAILED!") return None remaining_part = parsed_part['remaining_part'] - # applies to the same range as previous time selector already addded to the list + # applies to the same range as previous time selector already added to the list ongoing_parsing[-1]['time_selectors'].append(parsed_part['time_selector']) if remaining_part == "": # finished parsing of this part diff --git a/qa.py b/qa.py index fbd57ce..4e7338f 100644 --- a/qa.py +++ b/qa.py @@ -533,7 +533,7 @@ def remove_type_keys_where_it_is_a_duplicate(data, atp_code): if atp_code == "coop_food_gb": if data.get("location_type") in [ "Food/Petrol", # seems to be enough just to be near fuel station - "Food", # checked, they look like simply convinience shops + "Food", # checked, they look like simply convenience shops ]: if data.get("shop") == "convenience": del data["location_type"] diff --git a/test_matching_logic.py b/test_matching_logic.py index 9644f3e..15f8bf1 100644 --- a/test_matching_logic.py +++ b/test_matching_logic.py @@ -164,7 +164,7 @@ class MatchingTests(unittest.TestCase): self.assertEqual(self.this_tag_lists_match({'brand': "Zażółć Bank", 'amenity': 'bank'}, {'brand': "Gęśla Jaźń Bank", 'amenity': 'bank'}), False) @unittest.expectedFailure # TODO: fix this serious bug! - def test_matches_using_specifc_name_not_one_from_other_objects(self): + def test_matches_using_specific_name_not_one_from_other_objects(self): atp_data = [ {'tags': {'shop': 'foobar', 'brand': 'ABC', 'name': 'ABC'}, 'center': {'lat': 0, 'lon': 0}, 'osm_link': 'dummy'}, {'tags': {'shop': 'foobar', 'brand': 'ZYZ', 'name': 'ZYZ'}, 'center': {'lat': 10, 'lon': 10}, 'osm_link': 'dummy'},