diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index 1786f01..a3f3952 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -1,2 +1,4 @@ # apply black a6c1024819e2de9f72d71d9d89c95405ce422970 +# apply black 26 +cbed347c2f38414ab1f606e2c1c4308ce1a0b718 \ No newline at end of file diff --git a/dependencies/Utils-Flask-SQLAlchemy b/dependencies/Utils-Flask-SQLAlchemy index 57b4adb..e0a21a1 160000 --- a/dependencies/Utils-Flask-SQLAlchemy +++ b/dependencies/Utils-Flask-SQLAlchemy @@ -1 +1 @@ -Subproject commit 57b4adb8a8fff247da57387e9d42eada765e88cd +Subproject commit e0a21a1879919ad8c876a7a218c64dfdbfbe2d9c diff --git a/setup.py b/setup.py index 8921a11..e5f5b02 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,6 @@ import setuptools from pathlib import Path - root_dir = Path(__file__).absolute().parent with (root_dir / "VERSION").open() as f: version = f.read() diff --git a/src/pypn_habref_api/__init__.py b/src/pypn_habref_api/__init__.py index cdddbb3..894dfc2 100644 --- a/src/pypn_habref_api/__init__.py +++ b/src/pypn_habref_api/__init__.py @@ -6,7 +6,6 @@ from pypn_habref_api.env import db, ma from pypn_habref_api.routes import routes - migrate = Migrate() diff --git a/src/pypn_habref_api/env.py b/src/pypn_habref_api/env.py index ffe85a8..5860674 100644 --- a/src/pypn_habref_api/env.py +++ b/src/pypn_habref_api/env.py @@ -4,7 +4,6 @@ from flask_marshmallow import Marshmallow from flask_sqlalchemy import SQLAlchemy - db_path = environ.get("FLASK_SQLALCHEMY_DB") if db_path: db_module_name, db_object_name = db_path.rsplit(".", 1) diff --git a/src/pypn_habref_api/migrations/versions/46e91e738845_insert_inpn_data_in_ref_habitats_schema.py b/src/pypn_habref_api/migrations/versions/46e91e738845_insert_inpn_data_in_ref_habitats_schema.py index 165a76e..e62134c 100644 --- a/src/pypn_habref_api/migrations/versions/46e91e738845_insert_inpn_data_in_ref_habitats_schema.py +++ b/src/pypn_habref_api/migrations/versions/46e91e738845_insert_inpn_data_in_ref_habitats_schema.py @@ -13,7 +13,6 @@ from utils_flask_sqla.migrations.utils import logger, open_remote_file - # revision identifiers, used by Alembic. revision = "46e91e738845" down_revision = None @@ -53,8 +52,7 @@ def upgrade(): ) logger.info("Populate table autocomplete_habitat…") - op.execute( - """ + op.execute(""" INSERT INTO ref_habitats.autocomplete_habitat SELECT cd_hab, @@ -64,8 +62,7 @@ def upgrade(): concat(lb_code, ' - ', lb_hab_fr, ' ', lb_hab_fr_complet) FROM ref_habitats.habref h JOIN ref_habitats.typoref t ON t.cd_typo = h.cd_typo - """ - ) + """) def downgrade(): diff --git a/src/pypn_habref_api/migrations/versions/62e63cd6135d_create_ref_habitats_schema.py b/src/pypn_habref_api/migrations/versions/62e63cd6135d_create_ref_habitats_schema.py index 990d18f..0d9410f 100644 --- a/src/pypn_habref_api/migrations/versions/62e63cd6135d_create_ref_habitats_schema.py +++ b/src/pypn_habref_api/migrations/versions/62e63cd6135d_create_ref_habitats_schema.py @@ -10,7 +10,6 @@ from alembic import op import sqlalchemy as sa - # revision identifiers, used by Alembic. revision = "62e63cd6135d" down_revision = None diff --git a/src/pypn_habref_api/migrations/versions/805442837a68_correction_on_habref_data.py b/src/pypn_habref_api/migrations/versions/805442837a68_correction_on_habref_data.py index 9aac3f0..fe83ced 100644 --- a/src/pypn_habref_api/migrations/versions/805442837a68_correction_on_habref_data.py +++ b/src/pypn_habref_api/migrations/versions/805442837a68_correction_on_habref_data.py @@ -10,7 +10,6 @@ from alembic import op import sqlalchemy as sa - # revision identifiers, used by Alembic. revision = "805442837a68" down_revision = "46e91e738845" @@ -19,8 +18,7 @@ def upgrade(): - op.execute( - """ + op.execute(""" ALTER TABLE ref_habitats.habref ADD column lb_hab_en_save character varying(500); UPDATE ref_habitats.habref SET lb_hab_en_save = lb_auteur; @@ -29,10 +27,8 @@ def upgrade(): UPDATE ref_habitats.habref SET lb_hab_en = lb_hab_en_save; ALTER TABLE ref_habitats.habref DROP column lb_hab_en_save - """ - ) - op.execute( - """ + """) + op.execute(""" DELETE FROM ref_habitats.autocomplete_habitat; INSERT INTO ref_habitats.autocomplete_habitat SELECT @@ -43,8 +39,7 @@ def upgrade(): concat(lb_code, ' - ', lb_hab_fr, ' ', lb_hab_fr_complet) FROM ref_habitats.habref h JOIN ref_habitats.typoref t ON t.cd_typo = h.cd_typo; - """ - ) + """) def downgrade(): diff --git a/src/pypn_habref_api/routes.py b/src/pypn_habref_api/routes.py index 4fce17d..096d4e3 100644 --- a/src/pypn_habref_api/routes.py +++ b/src/pypn_habref_api/routes.py @@ -17,7 +17,6 @@ ) from pypn_habref_api.env import db as DB - routes = Blueprint("habref", __name__)