surplus: remove old line 4 code + any dvcm4
This commit is contained in:
parent
1eddae00fc
commit
e519901bb8
42
surplus.py
42
surplus.py
|
@ -211,7 +211,7 @@ def surplus(
|
||||||
"state, country, continent"
|
"state, country, continent"
|
||||||
).split(", ")
|
).split(", ")
|
||||||
],
|
],
|
||||||
all(
|
any(
|
||||||
_dvcm4 := [
|
_dvcm4 := [
|
||||||
True if (d not in sn) else False for sn in seen_names
|
True if (d not in sn) else False for sn in seen_names
|
||||||
]
|
]
|
||||||
|
@ -222,47 +222,9 @@ def surplus(
|
||||||
|
|
||||||
if debug:
|
if debug:
|
||||||
stderr.write(f"debug: {d=}\t{_dvtm4=}\t{_dvcm4=}\n")
|
stderr.write(f"debug: {d=}\t{_dvtm4=}\t{_dvcm4=}\n")
|
||||||
|
|
||||||
text[-1] += ", ".join(basket)
|
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(("5\t" if debug else "") + address.get("postcode", ""))
|
||||||
|
|
||||||
text.append(
|
text.append(
|
||||||
|
|
Loading…
Reference in a new issue