From aa8e25063070513a0058419601728a7f1ecd142a Mon Sep 17 00:00:00 2001 From: "geo-ghci-int[bot]" <146321879+geo-ghci-int[bot]@users.noreply.github.com> Date: Tue, 3 Dec 2024 08:48:54 +0000 Subject: [PATCH] Apply pre-commit fix From the artifact of the previous workflow run --- .../alembic/main/166ff2dcc48d_create_database.py | 15 +++------------ .../main/56dc90838d90_fix_removing_layerv1.py | 8 +++----- .../lib/lingva_extractor.py | 1 - .../c2cgeoportal_geoportal/scripts/theme2fts.py | 2 +- geoportal/c2cgeoportal_geoportal/views/dev.py | 2 +- 5 files changed, 8 insertions(+), 20 deletions(-) diff --git a/commons/c2cgeoportal_commons/alembic/main/166ff2dcc48d_create_database.py b/commons/c2cgeoportal_commons/alembic/main/166ff2dcc48d_create_database.py index 50a78e8ac1b..d745fb9b7f2 100644 --- a/commons/c2cgeoportal_commons/alembic/main/166ff2dcc48d_create_database.py +++ b/commons/c2cgeoportal_commons/alembic/main/166ff2dcc48d_create_database.py @@ -101,10 +101,7 @@ def upgrade() -> None: Column("readwrite", Boolean, default=False), schema=schema, ) - op.execute( - f"SELECT AddGeometryColumn('{schema}', 'restrictionarea', " - f"'area', {srid}, 'POLYGON', 2)" - ) + op.execute(f"SELECT AddGeometryColumn('{schema}', 'restrictionarea', " f"'area', {srid}, 'POLYGON', 2)") op.create_table( "shorturl", Column("id", Integer, primary_key=True), @@ -124,10 +121,7 @@ def upgrade() -> None: Column("description", Unicode), schema=schema, ) - op.execute( - f"SELECT AddGeometryColumn('{schema}', 'role', " - f"'extent', {srid}, 'POLYGON', 2)" - ) + op.execute(f"SELECT AddGeometryColumn('{schema}', 'role', " f"'extent', {srid}, 'POLYGON', 2)") role = Table("role", MetaData(), Column("name", Unicode, unique=True, nullable=False), schema=schema) op.bulk_insert(role, [{"name": "role_admin"}]) @@ -180,10 +174,7 @@ def upgrade() -> None: Column("params", Unicode, nullable=True), schema=schema, ) - op.execute( - f"SELECT AddGeometryColumn('{schema}', 'tsearch', 'the_geom', " - f"{srid}, 'GEOMETRY', 2)" - ) + op.execute(f"SELECT AddGeometryColumn('{schema}', 'tsearch', 'the_geom', " f"{srid}, 'GEOMETRY', 2)") op.create_index("tsearch_ts_idx", "tsearch", ["ts"], schema=schema, postgresql_using="gin") op.create_table( "treegroup", diff --git a/commons/c2cgeoportal_commons/alembic/main/56dc90838d90_fix_removing_layerv1.py b/commons/c2cgeoportal_commons/alembic/main/56dc90838d90_fix_removing_layerv1.py index 392f6ea245b..cbacc5cece1 100644 --- a/commons/c2cgeoportal_commons/alembic/main/56dc90838d90_fix_removing_layerv1.py +++ b/commons/c2cgeoportal_commons/alembic/main/56dc90838d90_fix_removing_layerv1.py @@ -50,11 +50,9 @@ def upgrade() -> None: schema = config["schema"] op.execute( - - f"DELETE from {schema}.layer_restrictionarea WHERE layer_id IN (" - f"SELECT id from {schema}.treeitem WHERE type = 'layerv1'" - ");" - + f"DELETE from {schema}.layer_restrictionarea WHERE layer_id IN (" + f"SELECT id from {schema}.treeitem WHERE type = 'layerv1'" + ");" ) op.execute(f"DELETE from {schema}.treeitem WHERE type = 'layerv1';") diff --git a/geoportal/c2cgeoportal_geoportal/lib/lingva_extractor.py b/geoportal/c2cgeoportal_geoportal/lib/lingva_extractor.py index 21efbba9f52..83364b2fdcf 100644 --- a/geoportal/c2cgeoportal_geoportal/lib/lingva_extractor.py +++ b/geoportal/c2cgeoportal_geoportal/lib/lingva_extractor.py @@ -392,7 +392,6 @@ def _collect_app_config(self, filename: str) -> list[Message]: interface_config.get("constants", {}) .get("gmfDisplayQueryGridOptions", {}) .get("mergeTabs", {}) - ): location = ( f"interfaces_config/{interface}/constants/gmfDisplayQueryGridOptions/" diff --git a/geoportal/c2cgeoportal_geoportal/scripts/theme2fts.py b/geoportal/c2cgeoportal_geoportal/scripts/theme2fts.py index 92d615f9102..0e01c3893a6 100644 --- a/geoportal/c2cgeoportal_geoportal/scripts/theme2fts.py +++ b/geoportal/c2cgeoportal_geoportal/scripts/theme2fts.py @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2023, Camptocamp SA +# Copyright (c) 2014-2024, Camptocamp SA # All rights reserved. # Redistribution and use in source and binary forms, with or without diff --git a/geoportal/c2cgeoportal_geoportal/views/dev.py b/geoportal/c2cgeoportal_geoportal/views/dev.py index 240eb742452..d61f78bef7b 100644 --- a/geoportal/c2cgeoportal_geoportal/views/dev.py +++ b/geoportal/c2cgeoportal_geoportal/views/dev.py @@ -1,4 +1,4 @@ -# Copyright (c) 2011-2021, Camptocamp SA +# Copyright (c) 2011-2024, Camptocamp SA # All rights reserved. # Redistribution and use in source and binary forms, with or without