From e519901bb8d268aa4a88146d6f4b03d657078d4e Mon Sep 17 00:00:00 2001 From: Mark Joshwel Date: Thu, 31 Aug 2023 14:18:57 +0000 Subject: [PATCH] surplus: remove old line 4 code + any dvcm4 --- surplus.py | 42 ++---------------------------------------- 1 file changed, 2 insertions(+), 40 deletions(-) diff --git a/surplus.py b/surplus.py index e4fa654..89af89d 100644 --- a/surplus.py +++ b/surplus.py @@ -211,7 +211,7 @@ def surplus( "state, country, continent" ).split(", ") ], - all( + any( _dvcm4 := [ True if (d not in sn) else False for sn in seen_names ] @@ -222,47 +222,9 @@ def surplus( if debug: stderr.write(f"debug: {d=}\t{_dvtm4=}\t{_dvcm4=}\n") - + text[-1] += ", ".join(basket) - # text.append( - # ("4\t" if debug else "") - # + ", ".join( - # [ - # d - # for d in _unique( - # [ - # address.get(detail, "") - # for detail in ( - # "residential, neighbourhood, allotments, quarter, " - # "city_district, district, borough, suburb, subdivision, " - # "municipality, city, town, village" - # ).split(", ") - # ] - # ) - # if all( - # _dvtm4 := [ - # d != "", - # d not in address.get("road", ""), - # d - # not in [ - # address.get(detail, "") - # for detail in ( - # "region, state, state_district, county, " - # "state, country, continent" - # ).split(", ") - # ], - # any( - # _dvcm4 := [ - # True if (d not in sn) else False for sn in seen_names - # ] - # ), - # ] - # ) - # ] - # ) - # ) - text.append(("5\t" if debug else "") + address.get("postcode", "")) text.append(