From c6211127e652f69cb6f88157399ec723c82b3d2b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 4 Oct 2024 21:45:13 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- qgepqwat2ili/qgepsia405/export.py | 5 +++-- qgepqwat2ili/utils/ili2db.py | 10 +++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/qgepqwat2ili/qgepsia405/export.py b/qgepqwat2ili/qgepsia405/export.py index abedf4e3..e64f7a85 100644 --- a/qgepqwat2ili/qgepsia405/export.py +++ b/qgepqwat2ili/qgepsia405/export.py @@ -48,7 +48,6 @@ def qgep_export(selection=None, labels_file=None, orientation=None): f"wastewater_structure_id_sia405abwasser_list : {wastewater_structure_id_sia405abwasser_list}", ) - # Orientation oriented = orientation is not None if oriented: @@ -222,7 +221,9 @@ def wastewater_networkelement_common(row): return { # "abwasserbauwerkref": get_tid(row.fk_wastewater_structure__REL), - "abwasserbauwerkref": check_fk_in_subsetid(wastewater_structure_id_sia405abwasser_list, row.fk_wastewater_structure__REL), + "abwasserbauwerkref": check_fk_in_subsetid( + wastewater_structure_id_sia405abwasser_list, row.fk_wastewater_structure__REL + ), "bemerkung": truncate(emptystr_to_null(row.remark), 80), "bezeichnung": null_to_emptystr(row.identifier), } diff --git a/qgepqwat2ili/utils/ili2db.py b/qgepqwat2ili/utils/ili2db.py index 187c3e86..36fe6fb8 100644 --- a/qgepqwat2ili/utils/ili2db.py +++ b/qgepqwat2ili/utils/ili2db.py @@ -471,10 +471,10 @@ def skip_wwtp_structure_ids(): cursor.execute( f"SELECT * FROM qgep_od.wastewater_structure WHERE obj_id NOT IN (SELECT obj_id FROM qgep_od.wwtp_structure);" ) - #remove - only for testing - #cursor.execute( + # remove - only for testing + # cursor.execute( # f"SELECT * FROM qgep_od.organisation WHERE obj_id NOT IN (SELECT obj_id FROM qgep_od.private);" - #) + # ) # cursor.fetchall() - see https://pynative.com/python-cursor-fetchall-fetchmany-fetchone-to-read-rows-from-table/ # wwtp_structure_count = int(cursor.fetchone()[0]) @@ -488,8 +488,8 @@ def skip_wwtp_structure_ids(): # https://www.pythontutorial.net/python-string-methods/python-string-concatenation/ # not_wwtp_structure_ids = not_wwtp_structure_ids + str(row[0]) + "," strrow = str(row[0]) - #not_wwtp_structure_ids = ','.join([not_wwtp_structure_ids, strrow]) - #not_wwtp_structure_ids = not_wwtp_structure_ids + row[0] + # not_wwtp_structure_ids = ','.join([not_wwtp_structure_ids, strrow]) + # not_wwtp_structure_ids = not_wwtp_structure_ids + row[0] not_wwtp_structure_ids.append(strrow) logger.info(f" building up '{not_wwtp_structure_ids}' ...")