From 5d534b998f87a66160d96c8967043b957f994d2c Mon Sep 17 00:00:00 2001
From: Maximilian Loch <Maximilian.Loch@LVermGeo.landsh.de>
Date: Thu, 11 May 2023 11:09:30 +0200
Subject: [PATCH] changed statistics and progress msg in code

---
 geocoder_script.py | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/geocoder_script.py b/geocoder_script.py
index ebb2a1d..bb08bb9 100644
--- a/geocoder_script.py
+++ b/geocoder_script.py
@@ -50,10 +50,11 @@ if __name__ == '__main__':
             if areg_response_key[0] == "ERROR":
                 errorfeatures += 1
 
-            progress_msg = f"""\
-{areg_response_key[0]} : {areg_response[areg_response_key[0]]} | betroffene \
-schule: [{item[0]}]\t{adresse['hnr']}; {adresse['stn']};{adresse['plz']}; \
-{adresse['ort']}"""
+            progress_msg = (f"{areg_response_key[0]} : " +
+                            f"{areg_response[areg_response_key[0]]} | " +
+                            f"betroffene schule: [{item[0]}]\t{adresse['hnr']};" +  # noqa
+                            f" {adresse['stn']}; {adresse['plz']}; " +
+                            f"{adresse['ort']}")
 
             print(progress_msg)
 
@@ -65,9 +66,9 @@ schule: [{item[0]}]\t{adresse['hnr']}; {adresse['stn']};{adresse['plz']}; \
     #         out.write(item)
 
     percentage = round((numfeatures * 100) / maxfeatures, 2)
-    statistics = f"""
-statistics:\n {numfeatures} from {maxfeatures} geocoded >> \
-{percentage}%\n {missinfeatures} features with missing attributes\n \
-{errorfeatures} features with errors\n"""
+    statistics = (f"statistics:\n {numfeatures} from {maxfeatures} geocoded" +
+                  f" >> {percentage}%\n {missinfeatures} features with " +
+                  f"missing attributes\n {errorfeatures} features with " +
+                  f"errors\n")
     print(statistics)
     print("geocoding dataset finished, closing programm")
-- 
GitLab