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 Sep 3, 2024
1 parent 6780267 commit bb5b2bc
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
5 changes: 1 addition & 4 deletions datamodel/app/extensions/demo_extension/002_demo.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import argparse


def demo(myVariable,myNumber):
def demo(myVariable, myNumber):
print(f"{myVariable}! My favorite number is {myNumber}")


Expand Down
4 changes: 2 additions & 2 deletions datamodel/app/extensions/extension_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def run_py_file(file_path: str, variables: dict = None):
abs_file_path = Path(__file__).parent.resolve() / file_path
varlist = [sys.executable, str(abs_file_path)]
for key, value in variables.iteritems():
varlist.append("--"+key)
varlist.append("--" + key)
varlist.append(value)
result = subprocess.run(varlist, capture_output=True, text=True)
if result.returncode != 0:
Expand Down Expand Up @@ -88,7 +88,7 @@ def load_extension(
run_sql_file(os.path.join(directory, filename), pg_service, variables)
if filename.endswith(".py"):
print(f"Running {filename}")
run_py_file(os.path.join(directory, filename),variables)
run_py_file(os.path.join(directory, filename), variables)

# re-create symbology triggers
conn = psycopg.connect(f"service={pg_service}")
Expand Down
10 changes: 7 additions & 3 deletions plugin/teksi_wastewater/interlis/interlis_importer_exporter.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import logging
import os
import tempfile
from pathlib import Path

from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import QApplication
Expand All @@ -27,7 +28,6 @@
from .interlis_model_mapping.model_tww_od import ModelTwwOd
from .utils.ili2db import InterlisTools
from .utils.various import CmdException, LoggingHandlerContext, logger, make_log_path
from pathlib import Path


class InterlisImporterExporterStopped(Exception):
Expand Down Expand Up @@ -315,8 +315,12 @@ def _import_enable_symbology_triggers(self):
DatabaseUtils.update_symbology()

def _export_labels_file(
self, limit_to_selection, selected_labels_scales_indices, labels_file_path, export_model,
export_orientation=90.0
self,
limit_to_selection,
selected_labels_scales_indices,
labels_file_path,
export_model,
export_orientation=90.0,
):
try:
# We only import now to avoid useless exception if dependencies aren't met
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from geoalchemy2 import Geometry
from sqlalchemy import Column, DateTime, Float, Integer, String, Boolean
from sqlalchemy import Boolean, Column, DateTime, Float, Integer, String

from .. import config
from .model_base import ModelBase
Expand Down

0 comments on commit bb5b2bc

Please sign in to comment.