Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 4, 2024
1 parent 5e742a5 commit c621112
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
5 changes: 3 additions & 2 deletions qgepqwat2ili/qgepsia405/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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),
}
Expand Down
10 changes: 5 additions & 5 deletions qgepqwat2ili/utils/ili2db.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand All @@ -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}' ...")

Expand Down

0 comments on commit c621112

Please sign in to comment.