diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6493959f..c5cb4265 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,11 +1,11 @@ repos: - - repo: https://github.com/timothycrosley/isort - rev: "5.12.0" + - repo: https://github.com/PyCQA/isort + rev: "5.13.2" hooks: - id: isort additional_dependencies: [toml] - repo: https://github.com/psf/black - rev: "23.9.1" + rev: "24.8.0" hooks: - id: black exclude: battDB/migrations/|common/migrations/|dfndb/migrations/|management/migrations/|_other/|data/ diff --git a/battDB/initial_parsers.py b/battDB/initial_parsers.py index 61eece94..a517f5d4 100644 --- a/battDB/initial_parsers.py +++ b/battDB/initial_parsers.py @@ -3,6 +3,7 @@ These functions are run as part of a migration and pre-populate the database with some default parsers. """ + from logging import getLogger logger = getLogger() diff --git a/dfndb/initial_parameters.py b/dfndb/initial_parameters.py index 93e991f7..fc44ec88 100644 --- a/dfndb/initial_parameters.py +++ b/dfndb/initial_parameters.py @@ -3,6 +3,7 @@ These functions are run as part of a migration and pre-populate the database with some default parameters. """ + PARAMETERS = [ dict(name="Time", status="Public", symbol="t", unit=("Time", "s")), dict(name="Step time", status="Public", symbol="ts", unit=("Time", "s")), diff --git a/dfndb/initial_units.py b/dfndb/initial_units.py index 1fb1290c..0cdfe149 100644 --- a/dfndb/initial_units.py +++ b/dfndb/initial_units.py @@ -3,6 +3,7 @@ These functions are run as part of a migration and pre-populate the database with some default quantities and units. """ + from .models import QuantityUnit SI_QUANTITY_UNITS = [ diff --git a/liionsden/settings/settings.py b/liionsden/settings/settings.py index 5281f0b6..bda6f01c 100644 --- a/liionsden/settings/settings.py +++ b/liionsden/settings/settings.py @@ -9,6 +9,7 @@ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ """ + import os import tempfile diff --git a/liionsden/urls.py b/liionsden/urls.py index 00a0fdb8..e07a6132 100644 --- a/liionsden/urls.py +++ b/liionsden/urls.py @@ -13,6 +13,7 @@ 1. Import the include() function: from django.urls import include, path 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ + from azure.core.utils import parse_connection_string from django.conf import settings from django.conf.urls.static import static