diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml new file mode 100644 index 0000000000..05f5b62464 --- /dev/null +++ b/.github/workflows/pre-commit.yml @@ -0,0 +1,29 @@ +name: Pre-commit Check + +on: pull_request + +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.x' + + - name: Install pre-commit + run: pip install pre-commit + + - name: Get changed files + id: changed-files + run: | + echo "files=$(git diff --name-only origin/main...HEAD | tr '\n' ' ')" >> $GITHUB_OUTPUT + + - name: Run pre-commit + continue-on-error: true + run: | + pre-commit run --files ${{ steps.changed-files.outputs.files }} \ No newline at end of file diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000000..09c27c4e61 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,10 @@ +repos: +- repo: https://github.com/astral-sh/ruff-pre-commit + # Ruff version. + rev: v0.8.4 + hooks: + # Run the linter. + - id: ruff + args: [ --fix ] + # Run the formatter. + - id: ruff-format \ No newline at end of file diff --git a/bin/check_celery_worker_liveness.py b/bin/check_celery_worker_liveness.py index 711fd5f859..ee23be4375 100644 --- a/bin/check_celery_worker_liveness.py +++ b/bin/check_celery_worker_liveness.py @@ -59,4 +59,4 @@ sys.exit(1) print("Celery worker heartbeat found: OK.") -sys.exit(0) \ No newline at end of file +sys.exit(0) diff --git a/bootstrap.py b/bootstrap.py index 019b97c78d..20dbffd378 100755 --- a/bootstrap.py +++ b/bootstrap.py @@ -13,26 +13,36 @@ Set up my development environment for me! """ -project_name = 'open_inwoner' +project_name = "open_inwoner" parser = argparse.ArgumentParser(description=description) -parser.add_argument('target', choices=['production', 'staging', 'test', 'jenkins', 'dev'], - help='production/staging/test/jenkins/dev') -parser.add_argument('--project', default=project_name, - help='Name of the project in your src directory, "%s" by default' % project_name) -parser.add_argument('--init', action='store_true', - help='Initialize a fresh "startproject" by pinning the requirements using pip-tools compile. ' - 'Automatically done if requirements/base.txt does not yet exist.') -parser.add_argument('--env', default='env', - help='Directory name for virtualenv, "env" by default') +parser.add_argument( + "target", + choices=["production", "staging", "test", "jenkins", "dev"], + help="production/staging/test/jenkins/dev", +) +parser.add_argument( + "--project", + default=project_name, + help='Name of the project in your src directory, "%s" by default' % project_name, +) +parser.add_argument( + "--init", + action="store_true", + help='Initialize a fresh "startproject" by pinning the requirements using pip-tools compile. ' + "Automatically done if requirements/base.txt does not yet exist.", +) +parser.add_argument( + "--env", default="env", help='Directory name for virtualenv, "env" by default' +) args = parser.parse_args() def replace_or_append(file_path, search_val, replace_val): file_handle, abs_path = mkstemp() - new_file = open(abs_path, 'w') - old_file = open(file_path, 'r') + new_file = open(abs_path, "w") + old_file = open(file_path) found = False for line in old_file: if line.startswith(search_val): @@ -51,89 +61,107 @@ def replace_or_append(file_path, search_val, replace_val): def replace_wsgi_settings(target): - path = os.path.join('src', project_name, 'wsgi.py') + path = os.path.join("src", project_name, "wsgi.py") replace_or_append( - path, 'os.environ.setdefault', - 'os.environ.setdefault("DJANGO_SETTINGS_MODULE", "%s.conf.%s")\n' % (project_name, target) + path, + "os.environ.setdefault", + 'os.environ.setdefault("DJANGO_SETTINGS_MODULE", "%s.conf.%s")\n' + % (project_name, target), ) def replace_manage_settings(target): - path = os.path.join('src', project_name, 'manage.py') + path = os.path.join("src", project_name, "manage.py") replace_or_append( - path, ' os.environ.setdefault', - ' os.environ.setdefault("DJANGO_SETTINGS_MODULE", "%s.conf.%s")\n' % (project_name, target) + path, + " os.environ.setdefault", + ' os.environ.setdefault("DJANGO_SETTINGS_MODULE", "%s.conf.%s")\n' + % (project_name, target), ) def append_settings_activate(project, target, env): - if os.name == 'posix': - path = '%s/bin/activate' % env - replace_or_append(path, 'export DJANGO_SETTINGS_MODULE=', - 'export DJANGO_SETTINGS_MODULE=\'%s.conf.%s\'\n' % - (project, target)) - elif os.name == 'nt': - path = '%s\\Scripts\\activate.bat' % env - replace_or_append(path, 'set DJANGO_SETTINGS_MODULE=', - 'set DJANGO_SETTINGS_MODULE=%s.conf.%s\n' % - (project, target)) - path = '%s\\Scripts\\deactivate.bat' % env - replace_or_append(path, 'set DJANGO_SETTINGS_MODULE=', - 'set DJANGO_SETTINGS_MODULE=\n') + if os.name == "posix": + path = "%s/bin/activate" % env + replace_or_append( + path, + "export DJANGO_SETTINGS_MODULE=", + "export DJANGO_SETTINGS_MODULE='%s.conf.%s'\n" % (project, target), + ) + elif os.name == "nt": + path = "%s\\Scripts\\activate.bat" % env + replace_or_append( + path, + "set DJANGO_SETTINGS_MODULE=", + "set DJANGO_SETTINGS_MODULE=%s.conf.%s\n" % (project, target), + ) + path = "%s\\Scripts\\deactivate.bat" % env + replace_or_append( + path, "set DJANGO_SETTINGS_MODULE=", "set DJANGO_SETTINGS_MODULE=\n" + ) def pip_compile_pin_requirements(virtualenv): - print('\n== Compiling base requirements ==\n') - if os.name == 'posix': - pip_path = os.path.join(virtualenv, 'bin', 'pip') - elif os.name == 'nt': - pip_path = os.path.join(virtualenv, 'Scripts', 'pip') - cmd_tpl = '{pip} install pip-tools'.format(pip=pip_path) + print("\n== Compiling base requirements ==\n") + if os.name == "posix": + pip_path = os.path.join(virtualenv, "bin", "pip") + elif os.name == "nt": + pip_path = os.path.join(virtualenv, "Scripts", "pip") + cmd_tpl = f"{pip_path} install pip-tools" call(cmd_tpl, shell=True) - print('Error: Run `. env/bin/activate && ./bin/compile_dependencies.sh` to ensure you have requirements/base.txt and requirements/dev.txt') - print('After that rerun bootstrap.py') + print( + "Error: Run `. env/bin/activate && ./bin/compile_dependencies.sh` to ensure you have requirements/base.txt and requirements/dev.txt" + ) + print("After that rerun bootstrap.py") sys.exit(1) + def main(): virtualenv = args.env - if not hasattr(sys, 'real_prefix'): - print('\n== Creating virtual environment ==\n') - call('virtualenv {0} --python=python3 --prompt="({1}-{2}) "'.format( - virtualenv, args.project, args.target - ), shell=True) - print('\n== Set "%s.conf.%s" as default settings ==\n' % (args.project, args.target)) + if not hasattr(sys, "real_prefix"): + print("\n== Creating virtual environment ==\n") + call( + f'virtualenv {virtualenv} --python=python3 --prompt="({args.project}-{args.target}) "', + shell=True, + ) + print( + '\n== Set "%s.conf.%s" as default settings ==\n' % (args.project, args.target) + ) append_settings_activate(args.project, args.target, args.env) - if os.name == 'posix': + if os.name == "posix": # Make manage.py executable - st = os.stat('src/manage.py') - os.chmod('src/manage.py', st.st_mode | stat.S_IEXEC) - django_admin_symlink = os.path.join(virtualenv, 'bin', 'django') + st = os.stat("src/manage.py") + os.chmod("src/manage.py", st.st_mode | stat.S_IEXEC) + django_admin_symlink = os.path.join(virtualenv, "bin", "django") if not os.path.exists(django_admin_symlink): - os.symlink('../../src/manage.py', django_admin_symlink) - - print('\n== Upgrading Pip ==\n') - if os.name == 'posix': - pip_path = os.path.join(virtualenv, 'bin', 'pip') - elif os.name == 'nt': - pip_path = os.path.join(virtualenv, 'Scripts', 'pip') - cmd_tpl = '{pip} install --upgrade pip'.format(pip=pip_path) + os.symlink("../../src/manage.py", django_admin_symlink) + + print("\n== Upgrading Pip ==\n") + if os.name == "posix": + pip_path = os.path.join(virtualenv, "bin", "pip") + elif os.name == "nt": + pip_path = os.path.join(virtualenv, "Scripts", "pip") + cmd_tpl = f"{pip_path} install --upgrade pip" call(cmd_tpl, shell=True) - if args.init \ - or not os.path.exists(os.path.join('requirements', 'base.txt')) \ - or not os.path.exists(os.path.join('requirements', 'dev.txt')): + if ( + args.init + or not os.path.exists(os.path.join("requirements", "base.txt")) + or not os.path.exists(os.path.join("requirements", "dev.txt")) + ): pip_compile_pin_requirements(virtualenv) - print('\n== Installing %s requirements ==\n' % args.target) - if os.name == 'posix': - os.environ['TMPDIR'] = '/var/tmp/' - pip_path = os.path.join(virtualenv, 'bin', 'pip') - cmd_tpl = '{pip} install -r requirements/{target}.txt' - elif os.name == 'nt': - pip_path = os.path.join(virtualenv, 'Scripts', 'pip') - cmd_tpl = '{pip} install -r requirements\\{target}.txt' + print("\n== Installing %s requirements ==\n" % args.target) + if os.name == "posix": + os.environ["TMPDIR"] = "/var/tmp/" + pip_path = os.path.join(virtualenv, "bin", "pip") + cmd_tpl = "{pip} install -r requirements/{target}.txt" + elif os.name == "nt": + pip_path = os.path.join(virtualenv, "Scripts", "pip") + cmd_tpl = "{pip} install -r requirements\\{target}.txt" return call(cmd_tpl.format(pip=pip_path, target=args.target), shell=True) -if __name__ == '__main__': + +if __name__ == "__main__": sys.exit(main()) diff --git a/ruff.toml b/ruff.toml new file mode 100644 index 0000000000..c4c46c0cd9 --- /dev/null +++ b/ruff.toml @@ -0,0 +1,88 @@ +# Exclude a variety of commonly ignored directories. +exclude = [ + ".bzr", + ".direnv", + ".eggs", + ".git", + ".git-rewrite", + ".hg", + ".ipynb_checkpoints", + ".mypy_cache", + ".nox", + ".pants.d", + ".pyenv", + ".pytest_cache", + ".pytype", + ".ruff_cache", + ".svn", + ".tox", + ".venv", + ".vscode", + "__pypackages__", + "_build", + "buck-out", + "build", + "dist", + "node_modules", + "site-packages", + "venv", +] + +# Same as Black. +line-length = 88 +indent-width = 4 + +# Assume Python 3.11 +target-version = "py311" + +[lint] +# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default. +# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or +# McCabe complexity (`C901`) by default. +select = [ + # https://docs.astral.sh/ruff/rules/#flake8-bugbear-b + "B", + "E", + "F", + "S", + "I", + "BLE", + "C90", + "S106", + "UP", +] +ignore = ["E501"] + +# Allow fix for all enabled rules (when `--fix`) is provided. +fixable = ["ALL"] +unfixable = [] + +# Allow unused variables when underscore-prefixed. +dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" + +[format] +# Like Black, use double quotes for strings. +quote-style = "double" + +# Like Black, indent with spaces, rather than tabs. +indent-style = "space" + +# Like Black, respect magic trailing commas. +skip-magic-trailing-comma = false + +# Like Black, automatically detect the appropriate line ending. +line-ending = "auto" + +# Enable auto-formatting of code examples in docstrings. Markdown, +# reStructuredText code/literal blocks and doctests are all supported. +# +# This is currently disabled by default, but it is planned for this +# to be opt-out in the future. +docstring-code-format = false + +# Set the line length limit used when formatting code snippets in +# docstrings. +# +# This only has an effect when the `docstring-code-format` setting is +# enabled. +docstring-code-line-length = "dynamic" \ No newline at end of file diff --git a/src/custom_migrations/migrations/0001_delete_old_celery_tasks.py b/src/custom_migrations/migrations/0001_delete_old_celery_tasks.py index c9f8ce6eb6..e5ae9ebfc5 100644 --- a/src/custom_migrations/migrations/0001_delete_old_celery_tasks.py +++ b/src/custom_migrations/migrations/0001_delete_old_celery_tasks.py @@ -21,7 +21,6 @@ def delete_old_celery_tasks(apps, _): class Migration(migrations.Migration): - dependencies = [("django_celery_beat", "0018_improve_crontab_helptext")] operations = [ diff --git a/src/eherkenning/backends.py b/src/eherkenning/backends.py index 4af05c57be..89db447a45 100644 --- a/src/eherkenning/backends.py +++ b/src/eherkenning/backends.py @@ -1,8 +1,7 @@ -from django.contrib.auth import get_user_model - from digid_eherkenning.backends import eHerkenningBackend as _eHerkenningBackend from digid_eherkenning.exceptions import eHerkenningError from digid_eherkenning.utils import get_client_ip +from django.contrib.auth import get_user_model from open_inwoner.kvk.branches import KVK_BRANCH_SESSION_VARIABLE diff --git a/src/eherkenning/mock/backends.py b/src/eherkenning/mock/backends.py index ad7a3b3866..7e6b2f2e42 100644 --- a/src/eherkenning/mock/backends.py +++ b/src/eherkenning/mock/backends.py @@ -1,10 +1,9 @@ import logging import re -from django.contrib.auth import get_user_model - from digid_eherkenning.backends import BaseBackend from digid_eherkenning.utils import get_client_ip +from django.contrib.auth import get_user_model logger = logging.getLogger(__name__) @@ -19,7 +18,7 @@ class eHerkenningBackend(BaseBackend): "eherkenning_no_kvk": "Login failed due to no KvK being returned by eHerkenning.", "eherkenning_len_kvk": "Login failed due to no KvK having more then 8 digits.", "eherkenning_num_kvk": "Login failed due to no KvK not being numerical.", - } + }, ) def get_or_create_user(self, request, kvk): diff --git a/src/eherkenning/mock/idp/views/eherkenning.py b/src/eherkenning/mock/idp/views/eherkenning.py index 82916d6106..139126dbf9 100644 --- a/src/eherkenning/mock/idp/views/eherkenning.py +++ b/src/eherkenning/mock/idp/views/eherkenning.py @@ -4,7 +4,6 @@ from django.http import HttpResponseBadRequest from django.urls import reverse from django.views.generic import FormView, TemplateView - from furl import furl from eherkenning.mock import eherkenning_conf as conf diff --git a/src/eherkenning/mock/views/eherkenning.py b/src/eherkenning/mock/views/eherkenning.py index b2e2060a96..bbcff78ac0 100644 --- a/src/eherkenning/mock/views/eherkenning.py +++ b/src/eherkenning/mock/views/eherkenning.py @@ -1,6 +1,7 @@ import logging from urllib.parse import urlencode +from digid_eherkenning.views.base import get_redirect_url from django.conf import settings from django.contrib import auth, messages from django.http import HttpResponseBadRequest, HttpResponseRedirect @@ -10,8 +11,6 @@ from django.views import View from django.views.generic import RedirectView -from digid_eherkenning.views.base import get_redirect_url - from eherkenning.mock import eherkenning_conf as conf logger = logging.getLogger(__name__) diff --git a/src/eherkenning/tests/test_mock_views.py b/src/eherkenning/tests/test_mock_views.py index 00778fc6dc..deff9ec321 100644 --- a/src/eherkenning/tests/test_mock_views.py +++ b/src/eherkenning/tests/test_mock_views.py @@ -4,7 +4,6 @@ from django.contrib.auth import get_user_model from django.test import TestCase, modify_settings, override_settings from django.urls import reverse - from furl import furl from open_inwoner.kvk.branches import get_kvk_branch_number diff --git a/src/eherkenning/validators.py b/src/eherkenning/validators.py index 18f5c75a8f..44fbe4394f 100644 --- a/src/eherkenning/validators.py +++ b/src/eherkenning/validators.py @@ -1,9 +1,8 @@ +from digid_eherkenning.validators import validate_digits from django.core.exceptions import ValidationError from django.utils.deconstruct import deconstructible from django.utils.translation import gettext_lazy as _ -from digid_eherkenning.validators import validate_digits - @deconstructible class KVKValidator: diff --git a/src/notifications/admin.py b/src/notifications/admin.py index e95801c396..6cc6a752c2 100644 --- a/src/notifications/admin.py +++ b/src/notifications/admin.py @@ -1,6 +1,5 @@ from django.contrib import admin, messages from django.utils.translation import gettext_lazy as _ - from requests.exceptions import RequestException from .models import NotificationsAPIConfig, Subscription diff --git a/src/notifications/api/serializers.py b/src/notifications/api/serializers.py index a90ef34c17..5f4c298dca 100644 --- a/src/notifications/api/serializers.py +++ b/src/notifications/api/serializers.py @@ -1,5 +1,4 @@ from django.utils.translation import gettext_lazy as _ - from rest_framework import serializers from ..validators import UntilNowValidator diff --git a/src/notifications/migrations/0001_initial.py b/src/notifications/migrations/0001_initial.py index ae155a5693..5fadae0490 100644 --- a/src/notifications/migrations/0001_initial.py +++ b/src/notifications/migrations/0001_initial.py @@ -6,7 +6,6 @@ class Migration(migrations.Migration): - initial = True dependencies = [ diff --git a/src/notifications/models.py b/src/notifications/models.py index 1200c48eba..92220ecccc 100644 --- a/src/notifications/models.py +++ b/src/notifications/models.py @@ -1,8 +1,7 @@ +from ape_pie import APIClient from django.contrib.postgres.fields import ArrayField from django.db import models from django.utils.translation import gettext_lazy as _ - -from ape_pie import APIClient from zds_client import ClientAuth from zgw_consumers.client import build_client from zgw_consumers.constants import APITypes diff --git a/src/notifications/tests/test_migrations.py b/src/notifications/tests/test_migrations.py index c2f0253cc0..ef8678a0ac 100644 --- a/src/notifications/tests/test_migrations.py +++ b/src/notifications/tests/test_migrations.py @@ -12,6 +12,8 @@ class NotificationsAPILibraryMigrationTest(TestSuccessfulMigrations): def setUpBeforeMigration(self, apps): from notifications_api_common.models import ( NotificationsConfig as LegacyNotificationsConfig, + ) + from notifications_api_common.models import ( Subscription as LegacySubscription, ) diff --git a/src/notifications/tests/test_webhook.py b/src/notifications/tests/test_webhook.py index 1707ba8f03..ad34821b2e 100644 --- a/src/notifications/tests/test_webhook.py +++ b/src/notifications/tests/test_webhook.py @@ -1,9 +1,8 @@ from unittest.mock import patch +import requests_mock from django.contrib.messages import get_messages from django.test import TestCase - -import requests_mock from requests.exceptions import RequestException from zgw_consumers.constants import APITypes from zgw_consumers.models.services import Service diff --git a/src/open_inwoner/accounts/admin.py b/src/open_inwoner/accounts/admin.py index f291d1b21e..d8ee2d3b66 100644 --- a/src/open_inwoner/accounts/admin.py +++ b/src/open_inwoner/accounts/admin.py @@ -5,8 +5,8 @@ from django.forms import ValidationError from django.urls import reverse from django.utils.html import format_html -from django.utils.translation import gettext_lazy as _, ngettext - +from django.utils.translation import gettext_lazy as _ +from django.utils.translation import ngettext from image_cropping import ImageCroppingMixin from privates.admin import PrivateMediaMixin @@ -60,7 +60,6 @@ def clean(self, *args, **kwargs): raise ValidationError(_("Only a 'begeleider' user can add an image.")) if cleaned_data.get("email"): - if ( User.objects.filter(email__iexact=cleaned_data["email"]) and self.instance.email != cleaned_data["email"] diff --git a/src/open_inwoner/accounts/apps.py b/src/open_inwoner/accounts/apps.py index 8cd088cefa..b37823902c 100644 --- a/src/open_inwoner/accounts/apps.py +++ b/src/open_inwoner/accounts/apps.py @@ -65,11 +65,6 @@ class AccountsConfig(AppConfig): _has_run = False def ready(self): - from .signals import ( # noqa:register the signals - log_user_login, - log_user_logout, - ) - if self._has_run: return self._has_run = True diff --git a/src/open_inwoner/accounts/backends.py b/src/open_inwoner/accounts/backends.py index 7fdca450af..de570d88d9 100644 --- a/src/open_inwoner/accounts/backends.py +++ b/src/open_inwoner/accounts/backends.py @@ -1,15 +1,14 @@ import logging from typing import Literal +from axes.backends import AxesBackend +from digid_eherkenning.oidc.backends import BaseBackend from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.auth.backends import ModelBackend from django.contrib.auth.hashers import check_password from django.contrib.auth.models import AbstractUser from django.urls import reverse, reverse_lazy - -from axes.backends import AxesBackend -from digid_eherkenning.oidc.backends import BaseBackend from mozilla_django_oidc_db.backends import OIDCAuthenticationBackend from mozilla_django_oidc_db.config import dynamic_setting from mozilla_django_oidc_db.typing import JSONObject diff --git a/src/open_inwoner/accounts/digid_urls.py b/src/open_inwoner/accounts/digid_urls.py index 96d79f0626..d151730406 100644 --- a/src/open_inwoner/accounts/digid_urls.py +++ b/src/open_inwoner/accounts/digid_urls.py @@ -1,5 +1,4 @@ from django.urls import path - from mozilla_django_oidc.urls import urlpatterns from mozilla_django_oidc_db.views import OIDCCallbackView diff --git a/src/open_inwoner/accounts/eherkenning_urls.py b/src/open_inwoner/accounts/eherkenning_urls.py index 069826c467..9e7701efb6 100644 --- a/src/open_inwoner/accounts/eherkenning_urls.py +++ b/src/open_inwoner/accounts/eherkenning_urls.py @@ -1,5 +1,4 @@ from django.urls import path - from mozilla_django_oidc.urls import urlpatterns from mozilla_django_oidc_db.views import OIDCCallbackView diff --git a/src/open_inwoner/accounts/forms.py b/src/open_inwoner/accounts/forms.py index 954889c6b5..5063e8bde3 100644 --- a/src/open_inwoner/accounts/forms.py +++ b/src/open_inwoner/accounts/forms.py @@ -8,7 +8,6 @@ from django.core.mail import EmailMultiAlternatives from django.template import loader from django.utils.translation import gettext_lazy as _ - from django_registration.forms import RegistrationForm from open_inwoner.cms.utils.page_display import ( diff --git a/src/open_inwoner/accounts/gateways.py b/src/open_inwoner/accounts/gateways.py index 2301f6411b..41d729832b 100644 --- a/src/open_inwoner/accounts/gateways.py +++ b/src/open_inwoner/accounts/gateways.py @@ -1,11 +1,10 @@ import logging +import messagebird from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils.module_loading import import_string -import messagebird - logger = logging.getLogger(__name__) @@ -66,9 +65,7 @@ def send(self, to, token, **kwargs): ) except messagebird.client.ErrorException as e: for error in e.errors: - logger.critical( - ("Could not send SMS to {to}:\n{error}").format(to=to, error=error) - ) + logger.critical(f"Could not send SMS to {to}:\n{error}") raise GatewayError() else: logging.debug('Sent SMS to %s: "%s"', to, self.get_message(token)) diff --git a/src/open_inwoner/accounts/managers.py b/src/open_inwoner/accounts/managers.py index bf4d3db227..e752a10aa4 100644 --- a/src/open_inwoner/accounts/managers.py +++ b/src/open_inwoner/accounts/managers.py @@ -1,8 +1,7 @@ +from digid_eherkenning.managers import BaseDigidManager, BaseeHerkenningManager from django.contrib.auth.models import BaseUserManager from django.db.models import Q, QuerySet -from digid_eherkenning.managers import BaseDigidManager, BaseeHerkenningManager - from open_inwoner.utils.hash import generate_email_from_string from .choices import LoginTypeChoices @@ -34,7 +33,7 @@ def get_by_kvk(self, kvk): def eherkenning_create(self, kvk, **kwargs): return super().create( - email="user-{}@localhost".format(kvk), + email=f"user-{kvk}@localhost", login_type=LoginTypeChoices.eherkenning, kvk=kvk, ) diff --git a/src/open_inwoner/accounts/migrations/0001_initial.py b/src/open_inwoner/accounts/migrations/0001_initial.py index 19db31f18d..295d3d7409 100644 --- a/src/open_inwoner/accounts/migrations/0001_initial.py +++ b/src/open_inwoner/accounts/migrations/0001_initial.py @@ -1,13 +1,13 @@ # Generated by Django 2.2.23 on 2021-05-20 12:29 import django.contrib.auth.validators -from django.db import migrations, models import django.utils.timezone +from django.db import migrations, models + import open_inwoner.accounts.managers class Migration(migrations.Migration): - initial = True dependencies = [ diff --git a/src/open_inwoner/accounts/migrations/0002_auto_20211004_1708.py b/src/open_inwoner/accounts/migrations/0002_auto_20211004_1708.py index 95d983830f..a010444c6c 100644 --- a/src/open_inwoner/accounts/migrations/0002_auto_20211004_1708.py +++ b/src/open_inwoner/accounts/migrations/0002_auto_20211004_1708.py @@ -1,12 +1,10 @@ # Generated by Django 3.2.7 on 2021-10-04 15:08 -from django.db import migrations, models - import localflavor.nl.models +from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ("accounts", "0001_initial"), ] diff --git a/src/open_inwoner/accounts/migrations/0003_auto_20211007_1244.py b/src/open_inwoner/accounts/migrations/0003_auto_20211007_1244.py index 8467f9c55c..962e54b089 100644 --- a/src/open_inwoner/accounts/migrations/0003_auto_20211007_1244.py +++ b/src/open_inwoner/accounts/migrations/0003_auto_20211007_1244.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0002_auto_20211004_1708"), ] diff --git a/src/open_inwoner/accounts/migrations/0003_auto_20211008_1100.py b/src/open_inwoner/accounts/migrations/0003_auto_20211008_1100.py index a68236ab60..4db1bb230a 100644 --- a/src/open_inwoner/accounts/migrations/0003_auto_20211008_1100.py +++ b/src/open_inwoner/accounts/migrations/0003_auto_20211008_1100.py @@ -1,15 +1,13 @@ # Generated by Django 3.2.7 on 2021-10-08 09:00 import django.db.models.deletion -from django.db import migrations, models - import privates.storages +from django.db import migrations, models import open_inwoner.utils.validators class Migration(migrations.Migration): - dependencies = [ ("accounts", "0002_auto_20211004_1708"), ] diff --git a/src/open_inwoner/accounts/migrations/0004_auto_20211008_1311.py b/src/open_inwoner/accounts/migrations/0004_auto_20211008_1311.py index 72164ae964..21df2269b5 100644 --- a/src/open_inwoner/accounts/migrations/0004_auto_20211008_1311.py +++ b/src/open_inwoner/accounts/migrations/0004_auto_20211008_1311.py @@ -1,16 +1,14 @@ # Generated by Django 3.2.7 on 2021-10-08 11:11 import django.db.models.deletion +import privates.storages from django.conf import settings from django.db import migrations, models -import privates.storages - import open_inwoner.utils.validators class Migration(migrations.Migration): - dependencies = [ ("accounts", "0003_auto_20211008_1100"), ] diff --git a/src/open_inwoner/accounts/migrations/0005_auto_20211013_1129.py b/src/open_inwoner/accounts/migrations/0005_auto_20211013_1129.py index 1d0e194578..02dc2576cc 100644 --- a/src/open_inwoner/accounts/migrations/0005_auto_20211013_1129.py +++ b/src/open_inwoner/accounts/migrations/0005_auto_20211013_1129.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0004_auto_20211008_1311"), ] diff --git a/src/open_inwoner/accounts/migrations/0005_merge_0003_auto_20211007_1244_0004_auto_20211008_1311.py b/src/open_inwoner/accounts/migrations/0005_merge_0003_auto_20211007_1244_0004_auto_20211008_1311.py index bd6986a0c5..182d7b1428 100644 --- a/src/open_inwoner/accounts/migrations/0005_merge_0003_auto_20211007_1244_0004_auto_20211008_1311.py +++ b/src/open_inwoner/accounts/migrations/0005_merge_0003_auto_20211007_1244_0004_auto_20211008_1311.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0003_auto_20211007_1244"), ("accounts", "0004_auto_20211008_1311"), diff --git a/src/open_inwoner/accounts/migrations/0006_auto_20211013_1415.py b/src/open_inwoner/accounts/migrations/0006_auto_20211013_1415.py index 55b7ef169c..5d7d54d87b 100644 --- a/src/open_inwoner/accounts/migrations/0006_auto_20211013_1415.py +++ b/src/open_inwoner/accounts/migrations/0006_auto_20211013_1415.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0005_merge_0003_auto_20211007_1244_0004_auto_20211008_1311"), ] diff --git a/src/open_inwoner/accounts/migrations/0007_contact_uuid.py b/src/open_inwoner/accounts/migrations/0007_contact_uuid.py index a758c3b633..07b7e71ce4 100644 --- a/src/open_inwoner/accounts/migrations/0007_contact_uuid.py +++ b/src/open_inwoner/accounts/migrations/0007_contact_uuid.py @@ -6,7 +6,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0006_auto_20211013_1415"), ] diff --git a/src/open_inwoner/accounts/migrations/0007_merge_0005_auto_20211013_1129_0006_auto_20211013_1415.py b/src/open_inwoner/accounts/migrations/0007_merge_0005_auto_20211013_1129_0006_auto_20211013_1415.py index c7e9ef8627..4775206c8d 100644 --- a/src/open_inwoner/accounts/migrations/0007_merge_0005_auto_20211013_1129_0006_auto_20211013_1415.py +++ b/src/open_inwoner/accounts/migrations/0007_merge_0005_auto_20211013_1129_0006_auto_20211013_1415.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0005_auto_20211013_1129"), ("accounts", "0006_auto_20211013_1415"), diff --git a/src/open_inwoner/accounts/migrations/0008_auto_20211101_1129.py b/src/open_inwoner/accounts/migrations/0008_auto_20211101_1129.py index cad0a07725..374ce0f117 100644 --- a/src/open_inwoner/accounts/migrations/0008_auto_20211101_1129.py +++ b/src/open_inwoner/accounts/migrations/0008_auto_20211101_1129.py @@ -2,13 +2,11 @@ import uuid -from django.db import migrations, models - import privates.storages +from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ("accounts", "0007_contact_uuid"), ] diff --git a/src/open_inwoner/accounts/migrations/0008_merge_20211020_1415.py b/src/open_inwoner/accounts/migrations/0008_merge_20211020_1415.py index 7380e039b9..9b9e3b88fa 100644 --- a/src/open_inwoner/accounts/migrations/0008_merge_20211020_1415.py +++ b/src/open_inwoner/accounts/migrations/0008_merge_20211020_1415.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0007_contact_uuid"), ("accounts", "0007_merge_0005_auto_20211013_1129_0006_auto_20211013_1415"), diff --git a/src/open_inwoner/accounts/migrations/0009_auto_20211101_1137.py b/src/open_inwoner/accounts/migrations/0009_auto_20211101_1137.py index 287d510146..2d86c782ff 100644 --- a/src/open_inwoner/accounts/migrations/0009_auto_20211101_1137.py +++ b/src/open_inwoner/accounts/migrations/0009_auto_20211101_1137.py @@ -27,7 +27,6 @@ def gen_uuid_document(apps, schema_editor): class Migration(migrations.Migration): - dependencies = [ ("accounts", "0008_auto_20211101_1129"), ] diff --git a/src/open_inwoner/accounts/migrations/0010_auto_20211101_1137.py b/src/open_inwoner/accounts/migrations/0010_auto_20211101_1137.py index 5da00a10cd..0019022c07 100644 --- a/src/open_inwoner/accounts/migrations/0010_auto_20211101_1137.py +++ b/src/open_inwoner/accounts/migrations/0010_auto_20211101_1137.py @@ -6,7 +6,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0009_auto_20211101_1137"), ] diff --git a/src/open_inwoner/accounts/migrations/0011_merge_20211104_1428.py b/src/open_inwoner/accounts/migrations/0011_merge_20211104_1428.py index 39a9b78a10..1f08d621d1 100644 --- a/src/open_inwoner/accounts/migrations/0011_merge_20211104_1428.py +++ b/src/open_inwoner/accounts/migrations/0011_merge_20211104_1428.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0008_merge_20211020_1415"), ("accounts", "0010_auto_20211101_1137"), diff --git a/src/open_inwoner/accounts/migrations/0012_user_deactivated_on.py b/src/open_inwoner/accounts/migrations/0012_user_deactivated_on.py index 050c9fff17..b02518544f 100644 --- a/src/open_inwoner/accounts/migrations/0012_user_deactivated_on.py +++ b/src/open_inwoner/accounts/migrations/0012_user_deactivated_on.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0011_merge_20211104_1428"), ] diff --git a/src/open_inwoner/accounts/migrations/0013_alter_user_deactivated_on.py b/src/open_inwoner/accounts/migrations/0013_alter_user_deactivated_on.py index e32372ac13..faadc5f9de 100644 --- a/src/open_inwoner/accounts/migrations/0013_alter_user_deactivated_on.py +++ b/src/open_inwoner/accounts/migrations/0013_alter_user_deactivated_on.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0012_user_deactivated_on"), ] diff --git a/src/open_inwoner/accounts/migrations/0014_user_is_prepopulated.py b/src/open_inwoner/accounts/migrations/0014_user_is_prepopulated.py index 4cbd30bf40..656ddfcaa7 100644 --- a/src/open_inwoner/accounts/migrations/0014_user_is_prepopulated.py +++ b/src/open_inwoner/accounts/migrations/0014_user_is_prepopulated.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0013_alter_user_deactivated_on"), ] diff --git a/src/open_inwoner/accounts/migrations/0015_auto_20211214_1136.py b/src/open_inwoner/accounts/migrations/0015_auto_20211214_1136.py index 22b1c2f425..ea05bf4ab9 100644 --- a/src/open_inwoner/accounts/migrations/0015_auto_20211214_1136.py +++ b/src/open_inwoner/accounts/migrations/0015_auto_20211214_1136.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0014_user_is_prepopulated"), ] diff --git a/src/open_inwoner/accounts/migrations/0015_message.py b/src/open_inwoner/accounts/migrations/0015_message.py index 7820f1c203..7aa68ca04e 100644 --- a/src/open_inwoner/accounts/migrations/0015_message.py +++ b/src/open_inwoner/accounts/migrations/0015_message.py @@ -1,12 +1,11 @@ # Generated by Django 3.2.7 on 2021-12-16 08:45 +import django.db.models.deletion from django.conf import settings from django.db import migrations, models -import django.db.models.deletion class Migration(migrations.Migration): - dependencies = [ ("accounts", "0014_user_is_prepopulated"), ] diff --git a/src/open_inwoner/accounts/migrations/0016_auto_20211214_1652.py b/src/open_inwoner/accounts/migrations/0016_auto_20211214_1652.py index 2031a87c26..6d7a45414d 100644 --- a/src/open_inwoner/accounts/migrations/0016_auto_20211214_1652.py +++ b/src/open_inwoner/accounts/migrations/0016_auto_20211214_1652.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0016_merge_20211206_1627"), ("accounts", "0015_auto_20211214_1136"), diff --git a/src/open_inwoner/accounts/migrations/0017_action_end_date.py b/src/open_inwoner/accounts/migrations/0017_action_end_date.py index e2cfbd11ee..c565c0e0ca 100644 --- a/src/open_inwoner/accounts/migrations/0017_action_end_date.py +++ b/src/open_inwoner/accounts/migrations/0017_action_end_date.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0016_auto_20211214_1652"), ] diff --git a/src/open_inwoner/accounts/migrations/0017_merge_0015_message_0016_auto_20211214_1652.py b/src/open_inwoner/accounts/migrations/0017_merge_0015_message_0016_auto_20211214_1652.py index 44af76de01..6ab94b6268 100644 --- a/src/open_inwoner/accounts/migrations/0017_merge_0015_message_0016_auto_20211214_1652.py +++ b/src/open_inwoner/accounts/migrations/0017_merge_0015_message_0016_auto_20211214_1652.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0015_message"), ("accounts", "0016_auto_20211214_1652"), diff --git a/src/open_inwoner/accounts/migrations/0018_merge_20211222_1030.py b/src/open_inwoner/accounts/migrations/0018_merge_20211222_1030.py index b4dafb5d69..c9dc7b08ce 100644 --- a/src/open_inwoner/accounts/migrations/0018_merge_20211222_1030.py +++ b/src/open_inwoner/accounts/migrations/0018_merge_20211222_1030.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0017_action_end_date"), ("accounts", "0017_merge_0015_message_0016_auto_20211214_1652"), diff --git a/src/open_inwoner/accounts/migrations/0019_auto_20211227_1218.py b/src/open_inwoner/accounts/migrations/0019_auto_20211227_1218.py index 09baeb51b9..8f42444543 100644 --- a/src/open_inwoner/accounts/migrations/0019_auto_20211227_1218.py +++ b/src/open_inwoner/accounts/migrations/0019_auto_20211227_1218.py @@ -1,12 +1,11 @@ # Generated by Django 3.2.7 on 2021-12-27 11:18 +import django.db.models.deletion from django.conf import settings from django.db import migrations, models -import django.db.models.deletion class Migration(migrations.Migration): - dependencies = [ ("pdc", "0018_alter_product_keywords"), ("accounts", "0018_merge_20211222_1030"), diff --git a/src/open_inwoner/accounts/migrations/0020_invite.py b/src/open_inwoner/accounts/migrations/0020_invite.py index d7b98d34a7..47b5e2dc4f 100644 --- a/src/open_inwoner/accounts/migrations/0020_invite.py +++ b/src/open_inwoner/accounts/migrations/0020_invite.py @@ -1,12 +1,11 @@ # Generated by Django 3.2.7 on 2021-12-29 13:48 +import django.db.models.deletion from django.conf import settings from django.db import migrations, models -import django.db.models.deletion class Migration(migrations.Migration): - dependencies = [ ("accounts", "0019_auto_20211227_1218"), ] diff --git a/src/open_inwoner/accounts/migrations/0021_alter_contact_type.py b/src/open_inwoner/accounts/migrations/0021_alter_contact_type.py index 435cc9a4c1..fba4e0ed61 100644 --- a/src/open_inwoner/accounts/migrations/0021_alter_contact_type.py +++ b/src/open_inwoner/accounts/migrations/0021_alter_contact_type.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0020_invite"), ] diff --git a/src/open_inwoner/accounts/migrations/0021_auto_20220202_0949.py b/src/open_inwoner/accounts/migrations/0021_auto_20220202_0949.py index 55749152dc..54fc4ed1fd 100644 --- a/src/open_inwoner/accounts/migrations/0021_auto_20220202_0949.py +++ b/src/open_inwoner/accounts/migrations/0021_auto_20220202_0949.py @@ -1,14 +1,12 @@ # Generated by Django 3.2.7 on 2022-02-02 08:49 import django.db.models.deletion +import privates.storages from django.conf import settings from django.db import migrations, models -import privates.storages - class Migration(migrations.Migration): - dependencies = [ ("accounts", "0020_invite"), ] diff --git a/src/open_inwoner/accounts/migrations/0022_auto_20220202_0949.py b/src/open_inwoner/accounts/migrations/0022_auto_20220202_0949.py index 4d40ff94fd..db0b3f5c01 100644 --- a/src/open_inwoner/accounts/migrations/0022_auto_20220202_0949.py +++ b/src/open_inwoner/accounts/migrations/0022_auto_20220202_0949.py @@ -6,7 +6,6 @@ class Migration(migrations.Migration): - dependencies = [ ("plans", "0001_initial"), ("accounts", "0021_auto_20220202_0949"), diff --git a/src/open_inwoner/accounts/migrations/0023_auto_20220202_0951.py b/src/open_inwoner/accounts/migrations/0023_auto_20220202_0951.py index af049c64a4..557f44cb8d 100644 --- a/src/open_inwoner/accounts/migrations/0023_auto_20220202_0951.py +++ b/src/open_inwoner/accounts/migrations/0023_auto_20220202_0951.py @@ -12,7 +12,6 @@ def creator_is_for(apps, schemas): class Migration(migrations.Migration): - dependencies = [ ("accounts", "0022_auto_20220202_0949"), ] diff --git a/src/open_inwoner/accounts/migrations/0024_merge_0021_alter_contact_type_0023_auto_20220202_0951.py b/src/open_inwoner/accounts/migrations/0024_merge_0021_alter_contact_type_0023_auto_20220202_0951.py index ff178db577..08c1199247 100644 --- a/src/open_inwoner/accounts/migrations/0024_merge_0021_alter_contact_type_0023_auto_20220202_0951.py +++ b/src/open_inwoner/accounts/migrations/0024_merge_0021_alter_contact_type_0023_auto_20220202_0951.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0021_alter_contact_type"), ("accounts", "0023_auto_20220202_0951"), diff --git a/src/open_inwoner/accounts/migrations/0025_migrate_message_seen.py b/src/open_inwoner/accounts/migrations/0025_migrate_message_seen.py index 6055889dd0..00debd7454 100644 --- a/src/open_inwoner/accounts/migrations/0025_migrate_message_seen.py +++ b/src/open_inwoner/accounts/migrations/0025_migrate_message_seen.py @@ -9,7 +9,6 @@ def migrate_seen(apps, _): class Migration(migrations.Migration): - dependencies = [ ("accounts", "0024_merge_0021_alter_contact_type_0023_auto_20220202_0951") ] diff --git a/src/open_inwoner/accounts/migrations/0026_message_sent.py b/src/open_inwoner/accounts/migrations/0026_message_sent.py index b3fdcc71e9..2e32ab5134 100644 --- a/src/open_inwoner/accounts/migrations/0026_message_sent.py +++ b/src/open_inwoner/accounts/migrations/0026_message_sent.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0025_migrate_message_seen"), ] diff --git a/src/open_inwoner/accounts/migrations/0027_auto_20220214_1440.py b/src/open_inwoner/accounts/migrations/0027_auto_20220214_1440.py index c4ec045dd3..2985e84636 100644 --- a/src/open_inwoner/accounts/migrations/0027_auto_20220214_1440.py +++ b/src/open_inwoner/accounts/migrations/0027_auto_20220214_1440.py @@ -1,12 +1,10 @@ # Generated by Django 3.2.12 on 2022-02-14 13:40 -from django.db import migrations, models - import privates.storages +from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ("accounts", "0026_message_sent"), ] diff --git a/src/open_inwoner/accounts/migrations/0028_auto_20220214_1538.py b/src/open_inwoner/accounts/migrations/0028_auto_20220214_1538.py index 556839614b..3fcb095060 100644 --- a/src/open_inwoner/accounts/migrations/0028_auto_20220214_1538.py +++ b/src/open_inwoner/accounts/migrations/0028_auto_20220214_1538.py @@ -1,13 +1,11 @@ # Generated by Django 3.2.12 on 2022-02-14 14:38 import django.utils.timezone -from django.db import migrations, models - import localflavor.nl.models +from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ("pdc", "0022_question"), ("accounts", "0027_auto_20220214_1440"), diff --git a/src/open_inwoner/accounts/migrations/0029_auto_20220218_1359.py b/src/open_inwoner/accounts/migrations/0029_auto_20220218_1359.py index 46d40b7c2f..7187e08174 100644 --- a/src/open_inwoner/accounts/migrations/0029_auto_20220218_1359.py +++ b/src/open_inwoner/accounts/migrations/0029_auto_20220218_1359.py @@ -6,7 +6,6 @@ class Migration(migrations.Migration): - dependencies = [ ("plans", "0002_auto_20220214_1440"), ("accounts", "0028_auto_20220214_1538"), diff --git a/src/open_inwoner/accounts/migrations/0030_message_file.py b/src/open_inwoner/accounts/migrations/0030_message_file.py index e8d9d2b965..d6ed43e28b 100644 --- a/src/open_inwoner/accounts/migrations/0030_message_file.py +++ b/src/open_inwoner/accounts/migrations/0030_message_file.py @@ -1,12 +1,10 @@ # Generated by Django 3.2.12 on 2022-03-07 15:33 -from django.db import migrations, models - import privates.storages +from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ("accounts", "0029_auto_20220218_1359"), ] diff --git a/src/open_inwoner/accounts/migrations/0031_message_uuid.py b/src/open_inwoner/accounts/migrations/0031_message_uuid.py index e9fecd3a4f..d3ebea1396 100644 --- a/src/open_inwoner/accounts/migrations/0031_message_uuid.py +++ b/src/open_inwoner/accounts/migrations/0031_message_uuid.py @@ -6,7 +6,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0030_message_file"), ] diff --git a/src/open_inwoner/accounts/migrations/0032_gen_message_uuid.py b/src/open_inwoner/accounts/migrations/0032_gen_message_uuid.py index 3f16a43509..241718ce4c 100644 --- a/src/open_inwoner/accounts/migrations/0032_gen_message_uuid.py +++ b/src/open_inwoner/accounts/migrations/0032_gen_message_uuid.py @@ -13,7 +13,6 @@ def gen_uuid_message(apps, schema_editor): class Migration(migrations.Migration): - dependencies = [ ("accounts", "0031_message_uuid"), ] diff --git a/src/open_inwoner/accounts/migrations/0033_alter_message_uuid.py b/src/open_inwoner/accounts/migrations/0033_alter_message_uuid.py index c91031766c..c82dd0cc6a 100644 --- a/src/open_inwoner/accounts/migrations/0033_alter_message_uuid.py +++ b/src/open_inwoner/accounts/migrations/0033_alter_message_uuid.py @@ -6,7 +6,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0032_gen_message_uuid"), ] diff --git a/src/open_inwoner/accounts/migrations/0034_alter_message_content.py b/src/open_inwoner/accounts/migrations/0034_alter_message_content.py index 50d8aa2eff..938d7a2f01 100644 --- a/src/open_inwoner/accounts/migrations/0034_alter_message_content.py +++ b/src/open_inwoner/accounts/migrations/0034_alter_message_content.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0033_alter_message_uuid"), ] diff --git a/src/open_inwoner/accounts/migrations/0035_alter_contact_phonenumber.py b/src/open_inwoner/accounts/migrations/0035_alter_contact_phonenumber.py index f10bb7d2dc..515db4e6ee 100644 --- a/src/open_inwoner/accounts/migrations/0035_alter_contact_phonenumber.py +++ b/src/open_inwoner/accounts/migrations/0035_alter_contact_phonenumber.py @@ -6,7 +6,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0034_alter_message_content"), ] diff --git a/src/open_inwoner/accounts/migrations/0036_alter_user_login_type.py b/src/open_inwoner/accounts/migrations/0036_alter_user_login_type.py index f320a82d66..22815f671b 100644 --- a/src/open_inwoner/accounts/migrations/0036_alter_user_login_type.py +++ b/src/open_inwoner/accounts/migrations/0036_alter_user_login_type.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0035_alter_contact_phonenumber"), ] diff --git a/src/open_inwoner/accounts/migrations/0037_user_contact_type.py b/src/open_inwoner/accounts/migrations/0037_user_contact_type.py index 95e1d0b5c3..d373c152a9 100644 --- a/src/open_inwoner/accounts/migrations/0037_user_contact_type.py +++ b/src/open_inwoner/accounts/migrations/0037_user_contact_type.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0036_alter_user_login_type"), ] diff --git a/src/open_inwoner/accounts/migrations/0038_auto_20220504_1352.py b/src/open_inwoner/accounts/migrations/0038_auto_20220504_1352.py index 2d758b5e75..23abd55f5f 100644 --- a/src/open_inwoner/accounts/migrations/0038_auto_20220504_1352.py +++ b/src/open_inwoner/accounts/migrations/0038_auto_20220504_1352.py @@ -12,7 +12,6 @@ def copy_contact_type_from_contacts_to_user(apps, schema_editor): class Migration(migrations.Migration): - dependencies = [ ("accounts", "0037_user_contact_type"), ] diff --git a/src/open_inwoner/accounts/migrations/0039_remove_contact_type.py b/src/open_inwoner/accounts/migrations/0039_remove_contact_type.py index aaefb2ff9e..a9f66ef10f 100644 --- a/src/open_inwoner/accounts/migrations/0039_remove_contact_type.py +++ b/src/open_inwoner/accounts/migrations/0039_remove_contact_type.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0038_auto_20220504_1352"), ] diff --git a/src/open_inwoner/accounts/migrations/0040_auto_20220518_1456.py b/src/open_inwoner/accounts/migrations/0040_auto_20220518_1456.py index 9387f8b04d..c3efd49631 100644 --- a/src/open_inwoner/accounts/migrations/0040_auto_20220518_1456.py +++ b/src/open_inwoner/accounts/migrations/0040_auto_20220518_1456.py @@ -1,12 +1,11 @@ # Generated by Django 3.2.13 on 2022-05-18 12:56 +import django.db.models.deletion from django.conf import settings from django.db import migrations, models -import django.db.models.deletion class Migration(migrations.Migration): - dependencies = [ ("accounts", "0039_remove_contact_type"), ] diff --git a/src/open_inwoner/accounts/migrations/0041_migrate_invite_email.py b/src/open_inwoner/accounts/migrations/0041_migrate_invite_email.py index 582047fa78..703278bee8 100644 --- a/src/open_inwoner/accounts/migrations/0041_migrate_invite_email.py +++ b/src/open_inwoner/accounts/migrations/0041_migrate_invite_email.py @@ -10,7 +10,6 @@ def migrate_invite_email(apps, _): class Migration(migrations.Migration): - dependencies = [("accounts", "0040_auto_20220518_1456")] operations = [migrations.RunPython(migrate_invite_email, migrations.RunPython.noop)] diff --git a/src/open_inwoner/accounts/migrations/0042_alter_invite_invitee_email.py b/src/open_inwoner/accounts/migrations/0042_alter_invite_invitee_email.py index bb327b4730..888bb86b21 100644 --- a/src/open_inwoner/accounts/migrations/0042_alter_invite_invitee_email.py +++ b/src/open_inwoner/accounts/migrations/0042_alter_invite_invitee_email.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0041_migrate_invite_email"), ] diff --git a/src/open_inwoner/accounts/migrations/0043_change_digid_email.py b/src/open_inwoner/accounts/migrations/0043_change_digid_email.py index 9c4f01ee8b..6150b46daa 100644 --- a/src/open_inwoner/accounts/migrations/0043_change_digid_email.py +++ b/src/open_inwoner/accounts/migrations/0043_change_digid_email.py @@ -1,5 +1,7 @@ from django.db import migrations + from open_inwoner.utils.hash import generate_email_from_string + from ..choices import LoginTypeChoices @@ -22,7 +24,6 @@ def change_hash_email_to_bsn(apps, _): class Migration(migrations.Migration): - dependencies = [("accounts", "0042_alter_invite_invitee_email")] operations = [ diff --git a/src/open_inwoner/accounts/migrations/0044_user_oidc_id.py b/src/open_inwoner/accounts/migrations/0044_user_oidc_id.py index 7a860c225a..c077f81096 100644 --- a/src/open_inwoner/accounts/migrations/0044_user_oidc_id.py +++ b/src/open_inwoner/accounts/migrations/0044_user_oidc_id.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0043_change_digid_email"), ] diff --git a/src/open_inwoner/accounts/migrations/0045_alter_user_login_type.py b/src/open_inwoner/accounts/migrations/0045_alter_user_login_type.py index ef67cd955e..ce7ab690f3 100644 --- a/src/open_inwoner/accounts/migrations/0045_alter_user_login_type.py +++ b/src/open_inwoner/accounts/migrations/0045_alter_user_login_type.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0044_user_oidc_id"), ] diff --git a/src/open_inwoner/accounts/migrations/0046_alter_user_oidc_id.py b/src/open_inwoner/accounts/migrations/0046_alter_user_oidc_id.py index 245043af59..98fbecd6a0 100644 --- a/src/open_inwoner/accounts/migrations/0046_alter_user_oidc_id.py +++ b/src/open_inwoner/accounts/migrations/0046_alter_user_oidc_id.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0045_alter_user_login_type"), ] diff --git a/src/open_inwoner/accounts/migrations/0047_action_is_deleted.py b/src/open_inwoner/accounts/migrations/0047_action_is_deleted.py index bc36aebea5..8d849ba048 100644 --- a/src/open_inwoner/accounts/migrations/0047_action_is_deleted.py +++ b/src/open_inwoner/accounts/migrations/0047_action_is_deleted.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0046_alter_user_oidc_id"), ] diff --git a/src/open_inwoner/accounts/migrations/0048_alter_action_status.py b/src/open_inwoner/accounts/migrations/0048_alter_action_status.py index 50d6d83dfc..c1984d85d9 100644 --- a/src/open_inwoner/accounts/migrations/0048_alter_action_status.py +++ b/src/open_inwoner/accounts/migrations/0048_alter_action_status.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0047_action_is_deleted"), ] diff --git a/src/open_inwoner/accounts/migrations/0048_auto_20221205_0921.py b/src/open_inwoner/accounts/migrations/0048_auto_20221205_0921.py index 08101e487c..5fbdae87c6 100644 --- a/src/open_inwoner/accounts/migrations/0048_auto_20221205_0921.py +++ b/src/open_inwoner/accounts/migrations/0048_auto_20221205_0921.py @@ -2,11 +2,11 @@ from django.conf import settings from django.db import migrations, models + import open_inwoner.utils.validators class Migration(migrations.Migration): - dependencies = [ ("accounts", "0047_action_is_deleted"), ] diff --git a/src/open_inwoner/accounts/migrations/0049_auto_20221205_0921.py b/src/open_inwoner/accounts/migrations/0049_auto_20221205_0921.py index ff6964ff69..9d105ac583 100644 --- a/src/open_inwoner/accounts/migrations/0049_auto_20221205_0921.py +++ b/src/open_inwoner/accounts/migrations/0049_auto_20221205_0921.py @@ -30,7 +30,6 @@ def populate_invite_names(apps, schema_editor): class Migration(migrations.Migration): - dependencies = [ ("accounts", "0048_auto_20221205_0921"), ] diff --git a/src/open_inwoner/accounts/migrations/0050_auto_20221205_0924.py b/src/open_inwoner/accounts/migrations/0050_auto_20221205_0924.py index 72bba610b8..b859ad8735 100644 --- a/src/open_inwoner/accounts/migrations/0050_auto_20221205_0924.py +++ b/src/open_inwoner/accounts/migrations/0050_auto_20221205_0924.py @@ -1,11 +1,11 @@ # Generated by Django 3.2.15 on 2022-12-05 08:24 -from django.db import migrations, models import uuid +from django.db import migrations, models + class Migration(migrations.Migration): - dependencies = [ ("plans", "0011_remove_plan_contacts"), ("accounts", "0049_auto_20221205_0921"), diff --git a/src/open_inwoner/accounts/migrations/0051_merge_20221207_0918.py b/src/open_inwoner/accounts/migrations/0051_merge_20221207_0918.py index a42b972928..348840fd4b 100644 --- a/src/open_inwoner/accounts/migrations/0051_merge_20221207_0918.py +++ b/src/open_inwoner/accounts/migrations/0051_merge_20221207_0918.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0048_alter_action_status"), ("accounts", "0050_auto_20221205_0924"), diff --git a/src/open_inwoner/accounts/migrations/0052_auto_20221213_0758.py b/src/open_inwoner/accounts/migrations/0052_auto_20221213_0758.py index a2c4926e3b..231cf4af82 100644 --- a/src/open_inwoner/accounts/migrations/0052_auto_20221213_0758.py +++ b/src/open_inwoner/accounts/migrations/0052_auto_20221213_0758.py @@ -1,11 +1,11 @@ # Generated by Django 3.2.15 on 2022-12-13 06:58 from django.db import migrations, models + import open_inwoner.utils.validators class Migration(migrations.Migration): - dependencies = [ ("accounts", "0051_merge_20221207_0918"), ] diff --git a/src/open_inwoner/accounts/migrations/0053_user_display_name.py b/src/open_inwoner/accounts/migrations/0053_user_display_name.py index 25635dd9fd..a5764e515b 100644 --- a/src/open_inwoner/accounts/migrations/0053_user_display_name.py +++ b/src/open_inwoner/accounts/migrations/0053_user_display_name.py @@ -1,11 +1,11 @@ # Generated by Django 3.2.15 on 2023-01-17 14:21 from django.db import migrations, models + import open_inwoner.utils.validators class Migration(migrations.Migration): - dependencies = [ ("accounts", "0052_auto_20221213_0758"), ] diff --git a/src/open_inwoner/accounts/migrations/0054_remove_action_goal.py b/src/open_inwoner/accounts/migrations/0054_remove_action_goal.py index d48abf0ea4..06e796a065 100644 --- a/src/open_inwoner/accounts/migrations/0054_remove_action_goal.py +++ b/src/open_inwoner/accounts/migrations/0054_remove_action_goal.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0053_user_display_name"), ] diff --git a/src/open_inwoner/accounts/migrations/0055_user_image.py b/src/open_inwoner/accounts/migrations/0055_user_image.py index c796589d91..e3b8c1da71 100644 --- a/src/open_inwoner/accounts/migrations/0055_user_image.py +++ b/src/open_inwoner/accounts/migrations/0055_user_image.py @@ -1,11 +1,11 @@ # Generated by Django 3.2.15 on 2023-02-28 08:45 from django.db import migrations, models + import open_inwoner.accounts.models class Migration(migrations.Migration): - dependencies = [ ("accounts", "0054_remove_action_goal"), ] diff --git a/src/open_inwoner/accounts/migrations/0056_auto_20230307_0852.py b/src/open_inwoner/accounts/migrations/0056_auto_20230307_0852.py index b4a1be80c2..7366bd01a8 100644 --- a/src/open_inwoner/accounts/migrations/0056_auto_20230307_0852.py +++ b/src/open_inwoner/accounts/migrations/0056_auto_20230307_0852.py @@ -1,12 +1,12 @@ # Generated by Django 3.2.15 on 2023-03-07 07:52 -from django.db import migrations import image_cropping.fields +from django.db import migrations + import open_inwoner.accounts.models class Migration(migrations.Migration): - dependencies = [ ("accounts", "0055_user_image"), ] diff --git a/src/open_inwoner/accounts/migrations/0057_rename_selected_themes_user_selected_categories.py b/src/open_inwoner/accounts/migrations/0057_rename_selected_themes_user_selected_categories.py index 35d64dcc99..c61d90cc28 100644 --- a/src/open_inwoner/accounts/migrations/0057_rename_selected_themes_user_selected_categories.py +++ b/src/open_inwoner/accounts/migrations/0057_rename_selected_themes_user_selected_categories.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0056_auto_20230307_0852"), ] diff --git a/src/open_inwoner/accounts/migrations/0058_alter_user_selected_categories.py b/src/open_inwoner/accounts/migrations/0058_alter_user_selected_categories.py index b5b0c0ca36..e45d496b50 100644 --- a/src/open_inwoner/accounts/migrations/0058_alter_user_selected_categories.py +++ b/src/open_inwoner/accounts/migrations/0058_alter_user_selected_categories.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0055_alter_product_content"), ("accounts", "0057_rename_selected_themes_user_selected_categories"), diff --git a/src/open_inwoner/accounts/migrations/0059_auto_20230412_1637.py b/src/open_inwoner/accounts/migrations/0059_auto_20230412_1637.py index c1253b0179..ae88a492af 100644 --- a/src/open_inwoner/accounts/migrations/0059_auto_20230412_1637.py +++ b/src/open_inwoner/accounts/migrations/0059_auto_20230412_1637.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0058_alter_user_selected_categories"), ] diff --git a/src/open_inwoner/accounts/migrations/0060_user_infix.py b/src/open_inwoner/accounts/migrations/0060_user_infix.py index 7ff905363a..3777ac4757 100644 --- a/src/open_inwoner/accounts/migrations/0060_user_infix.py +++ b/src/open_inwoner/accounts/migrations/0060_user_infix.py @@ -6,7 +6,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0059_auto_20230412_1637"), ] diff --git a/src/open_inwoner/accounts/migrations/0061_auto_20230612_1428.py b/src/open_inwoner/accounts/migrations/0061_auto_20230612_1428.py index bdb1328d79..8ab372fd38 100644 --- a/src/open_inwoner/accounts/migrations/0061_auto_20230612_1428.py +++ b/src/open_inwoner/accounts/migrations/0061_auto_20230612_1428.py @@ -1,11 +1,11 @@ # Generated by Django 3.2.15 on 2023-06-12 12:28 from django.db import migrations, models + import open_inwoner.utils.validators class Migration(migrations.Migration): - dependencies = [ ("accounts", "0060_user_infix"), ] diff --git a/src/open_inwoner/accounts/migrations/0062_alter_user_deactivated_on.py b/src/open_inwoner/accounts/migrations/0062_alter_user_deactivated_on.py index 39ea9c1c51..8b2fa413a9 100644 --- a/src/open_inwoner/accounts/migrations/0062_alter_user_deactivated_on.py +++ b/src/open_inwoner/accounts/migrations/0062_alter_user_deactivated_on.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0061_auto_20230612_1428"), ] diff --git a/src/open_inwoner/accounts/migrations/0063_alter_user_phonenumber.py b/src/open_inwoner/accounts/migrations/0063_alter_user_phonenumber.py index fd1010190a..e2cf0c6d01 100644 --- a/src/open_inwoner/accounts/migrations/0063_alter_user_phonenumber.py +++ b/src/open_inwoner/accounts/migrations/0063_alter_user_phonenumber.py @@ -6,7 +6,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0062_alter_user_deactivated_on"), ] diff --git a/src/open_inwoner/accounts/migrations/0064_alter_user_email.py b/src/open_inwoner/accounts/migrations/0064_alter_user_email.py index 851352721f..a6af646764 100644 --- a/src/open_inwoner/accounts/migrations/0064_alter_user_email.py +++ b/src/open_inwoner/accounts/migrations/0064_alter_user_email.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0063_alter_user_phonenumber"), ] diff --git a/src/open_inwoner/accounts/migrations/0065_user_unique_email_when_not_digid.py b/src/open_inwoner/accounts/migrations/0065_user_unique_email_when_not_digid.py index 96bd9b04f1..92054ac1e0 100644 --- a/src/open_inwoner/accounts/migrations/0065_user_unique_email_when_not_digid.py +++ b/src/open_inwoner/accounts/migrations/0065_user_unique_email_when_not_digid.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0064_alter_user_email"), ] diff --git a/src/open_inwoner/accounts/migrations/0066_remove_user_selected_categories.py b/src/open_inwoner/accounts/migrations/0066_remove_user_selected_categories.py index c05cee1b6e..11dd71ea08 100644 --- a/src/open_inwoner/accounts/migrations/0066_remove_user_selected_categories.py +++ b/src/open_inwoner/accounts/migrations/0066_remove_user_selected_categories.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0065_user_unique_email_when_not_digid"), ] diff --git a/src/open_inwoner/accounts/migrations/0067_auto_20231121_1131.py b/src/open_inwoner/accounts/migrations/0067_auto_20231121_1131.py index 5b59da2ab5..7800630751 100644 --- a/src/open_inwoner/accounts/migrations/0067_auto_20231121_1131.py +++ b/src/open_inwoner/accounts/migrations/0067_auto_20231121_1131.py @@ -1,11 +1,11 @@ # Generated by Django 3.2.20 on 2023-11-21 10:31 from django.db import migrations, models + import open_inwoner.utils.validators class Migration(migrations.Migration): - dependencies = [ ("accounts", "0066_remove_user_selected_categories"), ] diff --git a/src/open_inwoner/accounts/migrations/0068_relax_email_constraint_for_eherkenning.py b/src/open_inwoner/accounts/migrations/0068_relax_email_constraint_for_eherkenning.py index 829c3779a2..2161327bef 100644 --- a/src/open_inwoner/accounts/migrations/0068_relax_email_constraint_for_eherkenning.py +++ b/src/open_inwoner/accounts/migrations/0068_relax_email_constraint_for_eherkenning.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0067_auto_20231121_1131"), ] diff --git a/src/open_inwoner/accounts/migrations/0069_alter_user_postcode.py b/src/open_inwoner/accounts/migrations/0069_alter_user_postcode.py index 2249cd6b51..63e3e29603 100644 --- a/src/open_inwoner/accounts/migrations/0069_alter_user_postcode.py +++ b/src/open_inwoner/accounts/migrations/0069_alter_user_postcode.py @@ -1,12 +1,10 @@ # Generated by Django 3.2.20 on 2023-12-04 09:07 -from django.db import migrations - import localflavor.nl.models +from django.db import migrations class Migration(migrations.Migration): - dependencies = [ ("accounts", "0068_relax_email_constraint_for_eherkenning"), ] diff --git a/src/open_inwoner/accounts/migrations/0070_auto_20231205_1657.py b/src/open_inwoner/accounts/migrations/0070_auto_20231205_1657.py index ff1fdfd198..f39329a9e5 100644 --- a/src/open_inwoner/accounts/migrations/0070_auto_20231205_1657.py +++ b/src/open_inwoner/accounts/migrations/0070_auto_20231205_1657.py @@ -1,12 +1,12 @@ # Generated by Django 3.2.20 on 2023-12-05 15:57 -from django.db import migrations, models import localflavor.nl.models +from django.db import migrations, models + import open_inwoner.utils.validators class Migration(migrations.Migration): - dependencies = [ ("accounts", "0069_alter_user_postcode"), ] diff --git a/src/open_inwoner/accounts/migrations/0071_delete_appointment.py b/src/open_inwoner/accounts/migrations/0071_delete_appointment.py index 2822166294..ed3a402df4 100644 --- a/src/open_inwoner/accounts/migrations/0071_delete_appointment.py +++ b/src/open_inwoner/accounts/migrations/0071_delete_appointment.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0070_auto_20231205_1657"), ] diff --git a/src/open_inwoner/accounts/migrations/0071_remove_user_birthday.py b/src/open_inwoner/accounts/migrations/0071_remove_user_birthday.py index 74884d880a..b324fa9caa 100644 --- a/src/open_inwoner/accounts/migrations/0071_remove_user_birthday.py +++ b/src/open_inwoner/accounts/migrations/0071_remove_user_birthday.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0070_auto_20231205_1657"), ] diff --git a/src/open_inwoner/accounts/migrations/0072_merge_20240129_1610.py b/src/open_inwoner/accounts/migrations/0072_merge_20240129_1610.py index 67d457b753..4fbb5fc9be 100644 --- a/src/open_inwoner/accounts/migrations/0072_merge_20240129_1610.py +++ b/src/open_inwoner/accounts/migrations/0072_merge_20240129_1610.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0071_delete_appointment"), ("accounts", "0071_remove_user_birthday"), diff --git a/src/open_inwoner/accounts/migrations/0073_alter_user_user_contacts.py b/src/open_inwoner/accounts/migrations/0073_alter_user_user_contacts.py index 883472a74d..99194790f4 100644 --- a/src/open_inwoner/accounts/migrations/0073_alter_user_user_contacts.py +++ b/src/open_inwoner/accounts/migrations/0073_alter_user_user_contacts.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0072_merge_20240129_1610"), ] diff --git a/src/open_inwoner/accounts/migrations/0073_user_selected_categories.py b/src/open_inwoner/accounts/migrations/0073_user_selected_categories.py index 01147df7a8..c1991c8b25 100644 --- a/src/open_inwoner/accounts/migrations/0073_user_selected_categories.py +++ b/src/open_inwoner/accounts/migrations/0073_user_selected_categories.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0066_category_access_groups"), ("accounts", "0072_merge_20240129_1610"), diff --git a/src/open_inwoner/accounts/migrations/0074_merge_20240228_1544.py b/src/open_inwoner/accounts/migrations/0074_merge_20240228_1544.py index b85729bd39..5eb1c21646 100644 --- a/src/open_inwoner/accounts/migrations/0074_merge_20240228_1544.py +++ b/src/open_inwoner/accounts/migrations/0074_merge_20240228_1544.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0073_alter_user_user_contacts"), ("accounts", "0073_user_selected_categories"), diff --git a/src/open_inwoner/accounts/migrations/0075_user_verified_email.py b/src/open_inwoner/accounts/migrations/0075_user_verified_email.py index b296367fc8..d5a34b2a90 100644 --- a/src/open_inwoner/accounts/migrations/0075_user_verified_email.py +++ b/src/open_inwoner/accounts/migrations/0075_user_verified_email.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0074_merge_20240228_1544"), ] diff --git a/src/open_inwoner/accounts/migrations/0076_user_case_notification_channel.py b/src/open_inwoner/accounts/migrations/0076_user_case_notification_channel.py index f5eb20b6a8..ffe7328dcb 100644 --- a/src/open_inwoner/accounts/migrations/0076_user_case_notification_channel.py +++ b/src/open_inwoner/accounts/migrations/0076_user_case_notification_channel.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0075_user_verified_email"), ] diff --git a/src/open_inwoner/accounts/migrations/0078_drop_digid_eh_oidc_generics_legacy_tables.py b/src/open_inwoner/accounts/migrations/0078_drop_digid_eh_oidc_generics_legacy_tables.py index 1400834476..61fea8c417 100644 --- a/src/open_inwoner/accounts/migrations/0078_drop_digid_eh_oidc_generics_legacy_tables.py +++ b/src/open_inwoner/accounts/migrations/0078_drop_digid_eh_oidc_generics_legacy_tables.py @@ -7,7 +7,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0077_no_roepnaam"), ] diff --git a/src/open_inwoner/accounts/migrations/0079_digid_eherkenning_configs.py b/src/open_inwoner/accounts/migrations/0079_digid_eherkenning_configs.py index 1ec7e9d809..1b698e23a4 100644 --- a/src/open_inwoner/accounts/migrations/0079_digid_eherkenning_configs.py +++ b/src/open_inwoner/accounts/migrations/0079_digid_eherkenning_configs.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ( "digid_eherkenning_oidc_generics", diff --git a/src/open_inwoner/accounts/models.py b/src/open_inwoner/accounts/models.py index 25ffd147e5..10ae22f7df 100644 --- a/src/open_inwoner/accounts/models.py +++ b/src/open_inwoner/accounts/models.py @@ -2,6 +2,12 @@ from datetime import timedelta from uuid import uuid4 +from digid_eherkenning.oidc.models import ( + DigiDConfig as _OIDCDigiDConfig, +) +from digid_eherkenning.oidc.models import ( + EHerkenningConfig as _OIDCEHerkenningConfig, +) from django.conf import settings from django.contrib.auth.models import AbstractBaseUser, PermissionsMixin from django.contrib.contenttypes.fields import GenericRelation @@ -13,11 +19,6 @@ from django.utils.crypto import get_random_string from django.utils.functional import classproperty from django.utils.translation import gettext_lazy as _ - -from digid_eherkenning.oidc.models import ( - DigiDConfig as _OIDCDigiDConfig, - EHerkenningConfig as _OIDCEHerkenningConfig, -) from image_cropping import ImageCropField, ImageRatioField from localflavor.nl.models import NLBSNField, NLZipCodeField from mail_editor.helpers import find_template @@ -109,9 +110,7 @@ def get_callback_view(self): def generate_uuid_image_name(instance, filename): filename, file_extension = os.path.splitext(filename) - return "profile/{uuid}{file_extension}".format( - uuid=uuid4(), file_extension=file_extension.lower() - ) + return f"profile/{uuid4()}{file_extension.lower()}" class User(AbstractBaseUser, PermissionsMixin): @@ -882,7 +881,7 @@ def get_full_name(self): """ Returns the first_name plus the last_name of the invitee, with a space in between. """ - full_name = "{} {}".format(self.invitee_first_name, self.invitee_last_name) + full_name = f"{self.invitee_first_name} {self.invitee_last_name}" return full_name.strip() def save(self, **kwargs): diff --git a/src/open_inwoner/accounts/notifications/actions/notify.py b/src/open_inwoner/accounts/notifications/actions/notify.py index bcfc734f93..b7046030ca 100644 --- a/src/open_inwoner/accounts/notifications/actions/notify.py +++ b/src/open_inwoner/accounts/notifications/actions/notify.py @@ -2,7 +2,6 @@ from datetime import date from django.urls import reverse - from mail_editor.helpers import find_template from open_inwoner.accounts.choices import StatusChoices diff --git a/src/open_inwoner/accounts/notifications/messages/notify.py b/src/open_inwoner/accounts/notifications/messages/notify.py index 6f8ee7609d..86078f5faf 100644 --- a/src/open_inwoner/accounts/notifications/messages/notify.py +++ b/src/open_inwoner/accounts/notifications/messages/notify.py @@ -2,7 +2,6 @@ from django.db.models import Count from django.urls import reverse - from mail_editor.helpers import find_template from open_inwoner.accounts.models import Message, User diff --git a/src/open_inwoner/accounts/notifications/plans/notify.py b/src/open_inwoner/accounts/notifications/plans/notify.py index 420afca485..9efb6bccb2 100644 --- a/src/open_inwoner/accounts/notifications/plans/notify.py +++ b/src/open_inwoner/accounts/notifications/plans/notify.py @@ -3,7 +3,6 @@ from django.db.models.query import Q from django.urls import reverse - from mail_editor.helpers import find_template from open_inwoner.accounts.models import User @@ -63,7 +62,6 @@ def collect_notifications_about_expiring_plans() -> list[dict]: def notify_user_about_expiring_plans( receiver_id: int, object_ids: list[int], channel: str ) -> None: - send = _channels[channel] send(receiver_id=receiver_id, plan_ids=object_ids) diff --git a/src/open_inwoner/accounts/notifications/tasks.py b/src/open_inwoner/accounts/notifications/tasks.py index c203b91896..dbf22924b9 100644 --- a/src/open_inwoner/accounts/notifications/tasks.py +++ b/src/open_inwoner/accounts/notifications/tasks.py @@ -1,4 +1,5 @@ -from typing import Any, Callable +from collections.abc import Callable +from typing import Any import celery diff --git a/src/open_inwoner/accounts/notifications/typing.py b/src/open_inwoner/accounts/notifications/typing.py index 23dfa92ac6..a54a78552e 100644 --- a/src/open_inwoner/accounts/notifications/typing.py +++ b/src/open_inwoner/accounts/notifications/typing.py @@ -4,5 +4,4 @@ class Notifier(typing.Protocol): - def __call__(self, receiver: User, object_ids: list[int], channel: str) -> None: - ... + def __call__(self, receiver: User, object_ids: list[int], channel: str) -> None: ... diff --git a/src/open_inwoner/accounts/tests/factories.py b/src/open_inwoner/accounts/tests/factories.py index 1506645d0b..ad4df4d1a7 100644 --- a/src/open_inwoner/accounts/tests/factories.py +++ b/src/open_inwoner/accounts/tests/factories.py @@ -1,11 +1,10 @@ import random from uuid import uuid4 +import factory.fuzzy from django.core.files.uploadedfile import SimpleUploadedFile from django.db.models.signals import post_save, pre_save -import factory.fuzzy - from open_inwoner.accounts.choices import LoginTypeChoices diff --git a/src/open_inwoner/accounts/tests/test_action_views.py b/src/open_inwoner/accounts/tests/test_action_views.py index b32c258158..93f4376b76 100644 --- a/src/open_inwoner/accounts/tests/test_action_views.py +++ b/src/open_inwoner/accounts/tests/test_action_views.py @@ -6,7 +6,6 @@ from django.test import override_settings, tag from django.urls import reverse from django.utils.translation import gettext as _ - from django_webtest import WebTest from playwright.sync_api import expect from privates.test import temp_private_root diff --git a/src/open_inwoner/accounts/tests/test_admin.py b/src/open_inwoner/accounts/tests/test_admin.py index 88df024a31..9529454f74 100644 --- a/src/open_inwoner/accounts/tests/test_admin.py +++ b/src/open_inwoner/accounts/tests/test_admin.py @@ -1,6 +1,5 @@ from django.urls import reverse from django.utils.translation import gettext as _ - from django_webtest import WebTest from maykin_2fa.test import disable_admin_mfa from webtest import Upload diff --git a/src/open_inwoner/accounts/tests/test_auth.py b/src/open_inwoner/accounts/tests/test_auth.py index ff933c7ef7..2c4680e3b9 100644 --- a/src/open_inwoner/accounts/tests/test_auth.py +++ b/src/open_inwoner/accounts/tests/test_auth.py @@ -1,14 +1,13 @@ from unittest.mock import patch from urllib.parse import urlencode +import requests_mock from django.contrib.auth.signals import user_logged_in from django.contrib.sites.models import Site from django.core import mail from django.test import RequestFactory, TestCase, override_settings from django.urls import reverse, reverse_lazy from django.utils.translation import gettext as _ - -import requests_mock from django_webtest import WebTest from furl import furl from pyquery import PyQuery as PQ @@ -153,9 +152,9 @@ def test_digid_fail_with_invite_redirects_to_register_page(self, m): m.return_value = True invite = InviteFactory() session = self.client.session - session[ - "invite_url" - ] = f"{reverse('django_registration_register')}?invite={invite.key}" + session["invite_url"] = ( + f"{reverse('django_registration_register')}?invite={invite.key}" + ) session.save() url = reverse("digid-mock:password") @@ -180,9 +179,9 @@ def test_digid_fail_with_invite_redirects_to_register_page(self, m): def test_invite_url_not_in_session_after_successful_login(self): invite = InviteFactory() session = self.client.session - session[ - "invite_url" - ] = f"{reverse('django_registration_register')}?invite={invite.key}" + session["invite_url"] = ( + f"{reverse('django_registration_register')}?invite={invite.key}" + ) session.save() url = reverse("digid-mock:password") @@ -284,9 +283,9 @@ def test_notification_settings_with_cms_page_published(self, m): self.assertNotIn("messages_notifications", necessary_form.fields) necessary_form["plans_notifications"] = False - necessary_form[ - "case_notification_channel" - ] = NotificationChannelChoice.digital_only + necessary_form["case_notification_channel"] = ( + NotificationChannelChoice.digital_only + ) necessary_form.submit() user = User.objects.get(bsn=data["auth_name"]) @@ -669,9 +668,9 @@ def test_eherkenning_fail_with_invite_redirects_to_register_page(self, m): m.return_value = True invite = InviteFactory() session = self.client.session - session[ - "invite_url" - ] = f"{reverse('django_registration_register')}?invite={invite.key}" + session["invite_url"] = ( + f"{reverse('django_registration_register')}?invite={invite.key}" + ) session.save() url = reverse("eherkenning-mock:password") @@ -723,9 +722,9 @@ def test_invite_url_not_in_session_after_successful_login( invite = InviteFactory() session = self.client.session - session[ - "invite_url" - ] = f"{reverse('django_registration_register')}?invite={invite.key}" + session["invite_url"] = ( + f"{reverse('django_registration_register')}?invite={invite.key}" + ) session.save() url = reverse("eherkenning-mock:password") diff --git a/src/open_inwoner/accounts/tests/test_auth_2fa_sms.py b/src/open_inwoner/accounts/tests/test_auth_2fa_sms.py index 2fd7ec827b..5b8bf066eb 100644 --- a/src/open_inwoner/accounts/tests/test_auth_2fa_sms.py +++ b/src/open_inwoner/accounts/tests/test_auth_2fa_sms.py @@ -9,7 +9,6 @@ from django.urls import reverse from django.utils import timezone from django.utils.translation import gettext as _ - from django_webtest import WebTest from freezegun import freeze_time from furl import furl diff --git a/src/open_inwoner/accounts/tests/test_backends.py b/src/open_inwoner/accounts/tests/test_backends.py index e72fab9660..21236b81d2 100644 --- a/src/open_inwoner/accounts/tests/test_backends.py +++ b/src/open_inwoner/accounts/tests/test_backends.py @@ -3,7 +3,6 @@ from django.contrib import auth from django.test import RequestFactory, TestCase, override_settings from django.urls import reverse - from furl import furl from mozilla_django_oidc_db.config import store_config diff --git a/src/open_inwoner/accounts/tests/test_commands.py b/src/open_inwoner/accounts/tests/test_commands.py index ff01a3c612..fde46adb96 100644 --- a/src/open_inwoner/accounts/tests/test_commands.py +++ b/src/open_inwoner/accounts/tests/test_commands.py @@ -1,6 +1,5 @@ from django.core.management import call_command from django.test import TestCase - from freezegun import freeze_time from open_inwoner.utils.tests.helpers import AssertTimelineLogMixin diff --git a/src/open_inwoner/accounts/tests/test_contact_views.py b/src/open_inwoner/accounts/tests/test_contact_views.py index 8efc92627d..05fa0005c4 100644 --- a/src/open_inwoner/accounts/tests/test_contact_views.py +++ b/src/open_inwoner/accounts/tests/test_contact_views.py @@ -6,7 +6,6 @@ from django.test import override_settings from django.urls import reverse from django.utils.translation import gettext_lazy as _ - from django_webtest import WebTest from open_inwoner.accounts.models import User diff --git a/src/open_inwoner/accounts/tests/test_file_upload.py b/src/open_inwoner/accounts/tests/test_file_upload.py index 5e0a52a0e0..a999d2645a 100644 --- a/src/open_inwoner/accounts/tests/test_file_upload.py +++ b/src/open_inwoner/accounts/tests/test_file_upload.py @@ -3,7 +3,6 @@ from django.test import override_settings from django.urls import reverse from django.utils.translation import gettext_lazy as _ - from django_webtest import WebTest from privates.test import temp_private_root from webtest import Upload @@ -22,7 +21,6 @@ def setUp(self): @temp_private_root() def test_valid_type_of_file_is_uploaded(self): - self.form["file"] = Upload("readme.xlsx", b"data", "application/vnd.ms-excel") self.form["name"] = "Action name" upload_response = self.form.submit() diff --git a/src/open_inwoner/accounts/tests/test_inbox_download_view.py b/src/open_inwoner/accounts/tests/test_inbox_download_view.py index e16671efa1..c5436db4f5 100644 --- a/src/open_inwoner/accounts/tests/test_inbox_download_view.py +++ b/src/open_inwoner/accounts/tests/test_inbox_download_view.py @@ -1,7 +1,6 @@ from django.core.files.uploadedfile import SimpleUploadedFile from django.test import override_settings from django.urls import reverse - from django_webtest import WebTest from privates.test import temp_private_root diff --git a/src/open_inwoner/accounts/tests/test_inbox_page.py b/src/open_inwoner/accounts/tests/test_inbox_page.py index fd2ab84840..a9e851de3f 100644 --- a/src/open_inwoner/accounts/tests/test_inbox_page.py +++ b/src/open_inwoner/accounts/tests/test_inbox_page.py @@ -3,7 +3,6 @@ from django.test import override_settings, tag from django.urls import reverse from django.utils.translation import gettext_lazy as _ - from django_webtest import WebTest from playwright.sync_api import expect from privates.test import temp_private_root diff --git a/src/open_inwoner/accounts/tests/test_inbox_start_page.py b/src/open_inwoner/accounts/tests/test_inbox_start_page.py index 43760ce0bd..3025713c2b 100644 --- a/src/open_inwoner/accounts/tests/test_inbox_start_page.py +++ b/src/open_inwoner/accounts/tests/test_inbox_start_page.py @@ -1,7 +1,6 @@ from django.test import override_settings from django.urls import reverse from django.utils.translation import gettext_lazy as _ - from django_webtest import WebTest from furl import furl from privates.test import temp_private_root diff --git a/src/open_inwoner/accounts/tests/test_invite.py b/src/open_inwoner/accounts/tests/test_invite.py index 967c75c67a..076d3055fd 100644 --- a/src/open_inwoner/accounts/tests/test_invite.py +++ b/src/open_inwoner/accounts/tests/test_invite.py @@ -3,7 +3,6 @@ from django.test import override_settings from django.urls import reverse from django.utils import timezone - from django_webtest import WebTest from .factories import InviteFactory, UserFactory diff --git a/src/open_inwoner/accounts/tests/test_logging.py b/src/open_inwoner/accounts/tests/test_logging.py index a55d93fb1d..32e8b153ca 100644 --- a/src/open_inwoner/accounts/tests/test_logging.py +++ b/src/open_inwoner/accounts/tests/test_logging.py @@ -8,7 +8,6 @@ from django.urls import reverse from django.utils import timezone from django.utils.translation import gettext_lazy as _ - from django_webtest import WebTest from freezegun import freeze_time from maykin_2fa.test import disable_admin_mfa diff --git a/src/open_inwoner/accounts/tests/test_message.py b/src/open_inwoner/accounts/tests/test_message.py index d74dc0f8fc..57bf396994 100644 --- a/src/open_inwoner/accounts/tests/test_message.py +++ b/src/open_inwoner/accounts/tests/test_message.py @@ -1,5 +1,4 @@ from django.test import TestCase - from freezegun import freeze_time from .factories import MessageFactory, UserFactory diff --git a/src/open_inwoner/accounts/tests/test_notify_expiring_actions.py b/src/open_inwoner/accounts/tests/test_notify_expiring_actions.py index af5a3dc1af..5e2709dfdb 100644 --- a/src/open_inwoner/accounts/tests/test_notify_expiring_actions.py +++ b/src/open_inwoner/accounts/tests/test_notify_expiring_actions.py @@ -30,7 +30,7 @@ def test_send_emails_about_expiring_actions(self): email1, email2 = mail.outbox - for email, recipient in zip([email1, email2], [joe, schmoe]): + for email, recipient in zip([email1, email2], [joe, schmoe], strict=False): self.assertEqual( email.subject, "Acties verlopen vandaag op Open Inwoner Platform" ) diff --git a/src/open_inwoner/accounts/tests/test_oidc_views.py b/src/open_inwoner/accounts/tests/test_oidc_views.py index ba4adfae22..91f6e0f3d4 100644 --- a/src/open_inwoner/accounts/tests/test_oidc_views.py +++ b/src/open_inwoner/accounts/tests/test_oidc_views.py @@ -3,15 +3,14 @@ from unittest.mock import patch from urllib.parse import urlencode +import requests +import requests_mock from django.conf import settings from django.contrib.auth import get_user_model from django.core.exceptions import ValidationError from django.test import TestCase, modify_settings, override_settings from django.urls import reverse from django.utils.translation import gettext as _ - -import requests -import requests_mock from django_webtest import DjangoTestApp, DjangoWebtestResponse, WebTest from furl import furl from mozilla_django_oidc_db.models import OpenIDConnectConfig diff --git a/src/open_inwoner/accounts/tests/test_password_reset_view.py b/src/open_inwoner/accounts/tests/test_password_reset_view.py index 7576211277..117f5fc513 100644 --- a/src/open_inwoner/accounts/tests/test_password_reset_view.py +++ b/src/open_inwoner/accounts/tests/test_password_reset_view.py @@ -1,5 +1,4 @@ from django.urls import reverse - from django_webtest import WebTest from freezegun import freeze_time diff --git a/src/open_inwoner/accounts/tests/test_profile_views.py b/src/open_inwoner/accounts/tests/test_profile_views.py index cc80ac8fae..1a8c651379 100644 --- a/src/open_inwoner/accounts/tests/test_profile_views.py +++ b/src/open_inwoner/accounts/tests/test_profile_views.py @@ -2,14 +2,13 @@ from datetime import date from unittest.mock import patch +import requests_mock from django import forms from django.conf import settings from django.template.defaultfilters import date as django_date from django.test import TestCase, override_settings, tag from django.urls import reverse, reverse_lazy from django.utils.translation import gettext as _ - -import requests_mock from django_webtest import WebTest from pyquery import PyQuery as PQ from webtest import Upload diff --git a/src/open_inwoner/accounts/tests/test_user_manager.py b/src/open_inwoner/accounts/tests/test_user_manager.py index 1ff629400b..2673cdd01e 100644 --- a/src/open_inwoner/accounts/tests/test_user_manager.py +++ b/src/open_inwoner/accounts/tests/test_user_manager.py @@ -30,7 +30,7 @@ def test_having_usable_email(self): ] # bad - UserFactory(first_name="placeholder", email="placeholder@example.org"), + (UserFactory(first_name="placeholder", email="placeholder@example.org"),) UserFactory(first_name="empty", email="") actual = User.objects.having_usable_email() diff --git a/src/open_inwoner/accounts/views/actions.py b/src/open_inwoner/accounts/views/actions.py index 87250cf879..a9cb54a371 100644 --- a/src/open_inwoner/accounts/views/actions.py +++ b/src/open_inwoner/accounts/views/actions.py @@ -1,5 +1,8 @@ from datetime import datetime +from aldryn_apphooks_config.mixins import AppConfigMixin +from aldryn_apphooks_config.utils import get_app_instance +from cms.models import Page from django.contrib import messages from django.contrib.auth.mixins import LoginRequiredMixin from django.db.models import Q @@ -11,10 +14,6 @@ from django.views.generic import CreateView, DetailView, ListView from django.views.generic.detail import SingleObjectMixin from django.views.generic.edit import DeletionMixin, UpdateView - -from aldryn_apphooks_config.mixins import AppConfigMixin -from aldryn_apphooks_config.utils import get_app_instance -from cms.models import Page from privates.views import PrivateMediaView from view_breadcrumbs import BaseBreadcrumbMixin diff --git a/src/open_inwoner/accounts/views/auth.py b/src/open_inwoner/accounts/views/auth.py index c4c407046d..8834ae40ab 100644 --- a/src/open_inwoner/accounts/views/auth.py +++ b/src/open_inwoner/accounts/views/auth.py @@ -1,5 +1,10 @@ import logging +from digid_eherkenning.mock import conf as digid_conf +from digid_eherkenning.mock.views.digid import DigiDAssertionConsumerServiceMockView +from digid_eherkenning.views.base import get_redirect_url +from digid_eherkenning.views.digid import DigiDAssertionConsumerServiceView +from digid_eherkenning.views.eherkenning import eHerkenningAssertionConsumerServiceView from django.conf import settings from django.contrib import auth, messages from django.contrib.auth.mixins import UserPassesTestMixin @@ -13,12 +18,6 @@ from django.urls import reverse from django.utils.translation import gettext as _ -from digid_eherkenning.mock import conf as digid_conf -from digid_eherkenning.mock.views.digid import DigiDAssertionConsumerServiceMockView -from digid_eherkenning.views.base import get_redirect_url -from digid_eherkenning.views.digid import DigiDAssertionConsumerServiceView -from digid_eherkenning.views.eherkenning import eHerkenningAssertionConsumerServiceView - from eherkenning.mock import eherkenning_conf from eherkenning.mock.views.eherkenning import ( eHerkenningAssertionConsumerServiceMockView, diff --git a/src/open_inwoner/accounts/views/auth_oidc.py b/src/open_inwoner/accounts/views/auth_oidc.py index 991eb2252a..7e55c7496b 100644 --- a/src/open_inwoner/accounts/views/auth_oidc.py +++ b/src/open_inwoner/accounts/views/auth_oidc.py @@ -1,6 +1,8 @@ import logging from urllib.parse import urlencode +from digid_eherkenning.oidc.models import BaseConfig +from digid_eherkenning.oidc.views import OIDCAuthenticationCallbackView from django.conf import settings from django.contrib import auth, messages from django.core.exceptions import ValidationError @@ -10,9 +12,6 @@ from django.urls import reverse, reverse_lazy from django.utils.translation import gettext_lazy as _ from django.views.generic import View - -from digid_eherkenning.oidc.models import BaseConfig -from digid_eherkenning.oidc.views import OIDCAuthenticationCallbackView from mozilla_django_oidc_db.views import _OIDC_ERROR_SESSION_KEY, OIDCInit from ..models import OpenIDDigiDConfig, OpenIDEHerkenningConfig diff --git a/src/open_inwoner/accounts/views/contactmoments.py b/src/open_inwoner/accounts/views/contactmoments.py index f175dd432c..78a5971f83 100644 --- a/src/open_inwoner/accounts/views/contactmoments.py +++ b/src/open_inwoner/accounts/views/contactmoments.py @@ -1,5 +1,6 @@ import logging -from typing import Iterable, Protocol +from collections.abc import Iterable +from typing import Protocol from django.contrib.auth.mixins import AccessMixin from django.core.exceptions import ImproperlyConfigured @@ -10,7 +11,6 @@ from django.utils.translation import gettext_lazy as _ from django.views import View from django.views.generic import TemplateView - from view_breadcrumbs import BaseBreadcrumbMixin from open_inwoner.accounts.models import User diff --git a/src/open_inwoner/accounts/views/contacts.py b/src/open_inwoner/accounts/views/contacts.py index d637c94c48..9dae6fa2a1 100644 --- a/src/open_inwoner/accounts/views/contacts.py +++ b/src/open_inwoner/accounts/views/contacts.py @@ -7,7 +7,6 @@ from django.views.generic import ListView, View from django.views.generic.detail import SingleObjectMixin from django.views.generic.edit import FormView - from mail_editor.helpers import find_template from view_breadcrumbs import BaseBreadcrumbMixin diff --git a/src/open_inwoner/accounts/views/csrf.py b/src/open_inwoner/accounts/views/csrf.py index 623c42ca8e..26e6606cef 100644 --- a/src/open_inwoner/accounts/views/csrf.py +++ b/src/open_inwoner/accounts/views/csrf.py @@ -3,6 +3,8 @@ from django.urls import reverse from django.views.csrf import ( CSRF_FAILURE_TEMPLATE_NAME, +) +from django.views.csrf import ( csrf_failure as original_csrf_failure, ) diff --git a/src/open_inwoner/accounts/views/document.py b/src/open_inwoner/accounts/views/document.py index 316a376d6b..ab1e19fe9c 100644 --- a/src/open_inwoner/accounts/views/document.py +++ b/src/open_inwoner/accounts/views/document.py @@ -1,5 +1,4 @@ from django.utils.translation import gettext as _ - from privates.views import PrivateMediaView from open_inwoner.accounts.models import Document diff --git a/src/open_inwoner/accounts/views/inbox.py b/src/open_inwoner/accounts/views/inbox.py index 378bb4b186..528e9c983b 100644 --- a/src/open_inwoner/accounts/views/inbox.py +++ b/src/open_inwoner/accounts/views/inbox.py @@ -9,7 +9,6 @@ from django.utils import formats from django.utils.translation import gettext as _ from django.views.generic import FormView - from privates.views import PrivateMediaView from open_inwoner.configurations.models import SiteConfiguration diff --git a/src/open_inwoner/accounts/views/invite.py b/src/open_inwoner/accounts/views/invite.py index af5f5f2dbd..23d6ef94b7 100644 --- a/src/open_inwoner/accounts/views/invite.py +++ b/src/open_inwoner/accounts/views/invite.py @@ -3,7 +3,6 @@ from django.urls import reverse, reverse_lazy from django.utils.translation import gettext as _ from django.views.generic import UpdateView - from furl import furl from open_inwoner.utils.views import CommonPageMixin, LogMixin diff --git a/src/open_inwoner/accounts/views/login.py b/src/open_inwoner/accounts/views/login.py index f2e52eea93..d70625bf5d 100644 --- a/src/open_inwoner/accounts/views/login.py +++ b/src/open_inwoner/accounts/views/login.py @@ -2,7 +2,8 @@ from django.conf import settings from django.contrib import messages -from django.contrib.auth import REDIRECT_FIELD_NAME, get_user_model, login as auth_login +from django.contrib.auth import REDIRECT_FIELD_NAME, get_user_model +from django.contrib.auth import login as auth_login from django.contrib.auth.views import LoginView from django.core.signing import BadSignature, SignatureExpired, TimestampSigner from django.shortcuts import redirect @@ -12,7 +13,6 @@ from django.utils.translation import gettext as _ from django.views.decorators.cache import never_cache from django.views.generic import FormView, View - from formtools.wizard.views import SessionWizardView from furl import furl from oath import totp @@ -83,7 +83,7 @@ def form_valid(self, form): else: self.log_user_action( user, - "SMS bericht met code is verzonden aan {}".format(user.phonenumber), + f"SMS bericht met code is verzonden aan {user.phonenumber}", ) messages.debug(self.request, gateway.get_message(token)) @@ -255,7 +255,7 @@ def post(self, request): else: self.log_user_action( user, - "SMS bericht met code is verzonden aan {}".format(user.phonenumber), + f"SMS bericht met code is verzonden aan {user.phonenumber}", ) messages.debug(self.request, gateway.get_message(token)) @@ -333,7 +333,7 @@ def render_next_step(self, form, **kwargs): self.log_user_action( self.user_cache, - "SMS bericht met code is verzonden aan {}".format(phonenumber), + f"SMS bericht met code is verzonden aan {phonenumber}", ) return super().render_next_step(form, **kwargs) @@ -345,7 +345,7 @@ def done(self, form_list, **kwargs): self.request.user = self.user_cache self.log_change( self.user_cache, - "Telefoonnummer gewijzigd: {}".format(phonenumber), + f"Telefoonnummer gewijzigd: {phonenumber}", ) self.user_cache.save() diff --git a/src/open_inwoner/accounts/views/profile.py b/src/open_inwoner/accounts/views/profile.py index c6ff18478a..0214632644 100644 --- a/src/open_inwoner/accounts/views/profile.py +++ b/src/open_inwoner/accounts/views/profile.py @@ -3,6 +3,7 @@ from datetime import date from typing import Any +from aldryn_apphooks_config.mixins import AppConfigMixin from django.contrib import messages from django.contrib.auth.mixins import LoginRequiredMixin from django.http import HttpResponseRedirect @@ -11,8 +12,6 @@ from django.utils.functional import cached_property from django.utils.translation import gettext as _ from django.views.generic import FormView, TemplateView, UpdateView - -from aldryn_apphooks_config.mixins import AppConfigMixin from view_breadcrumbs import BaseBreadcrumbMixin from open_inwoner.accounts.choices import ( diff --git a/src/open_inwoner/accounts/views/registration.py b/src/open_inwoner/accounts/views/registration.py index b24f233244..246c9057cd 100644 --- a/src/open_inwoner/accounts/views/registration.py +++ b/src/open_inwoner/accounts/views/registration.py @@ -7,7 +7,6 @@ from django.urls import NoReverseMatch, reverse from django.utils.translation import gettext as _ from django.views.generic import TemplateView, UpdateView - from django_registration.backends.one_step.views import RegistrationView from furl import furl diff --git a/src/open_inwoner/api/search/serializers.py b/src/open_inwoner/api/search/serializers.py index 32efae8ec6..835f844763 100644 --- a/src/open_inwoner/api/search/serializers.py +++ b/src/open_inwoner/api/search/serializers.py @@ -1,5 +1,4 @@ from django.utils.translation import gettext_lazy as _ - from rest_framework import serializers diff --git a/src/open_inwoner/api/search/tests/test_autocomplete_api.py b/src/open_inwoner/api/search/tests/test_autocomplete_api.py index d5182ff40e..113758f6e2 100644 --- a/src/open_inwoner/api/search/tests/test_autocomplete_api.py +++ b/src/open_inwoner/api/search/tests/test_autocomplete_api.py @@ -2,9 +2,9 @@ this file contains tests for the RESTful API The logic of `autocomplete` is tested at `open_inwoner.search.tests` folder """ + from django.test import tag from django.urls import reverse_lazy - from rest_framework import status from rest_framework.test import APITestCase diff --git a/src/open_inwoner/api/tests/test_serializers.py b/src/open_inwoner/api/tests/test_serializers.py index ece91f4d19..e25ef9a39d 100644 --- a/src/open_inwoner/api/tests/test_serializers.py +++ b/src/open_inwoner/api/tests/test_serializers.py @@ -1,5 +1,4 @@ from django.urls import reverse - from rest_framework import status from rest_framework.test import APIClient, APITestCase diff --git a/src/open_inwoner/api/tests/test_views.py b/src/open_inwoner/api/tests/test_views.py index 3ea2b9f1ef..975803b637 100644 --- a/src/open_inwoner/api/tests/test_views.py +++ b/src/open_inwoner/api/tests/test_views.py @@ -1,5 +1,4 @@ from django.urls import reverse - from rest_framework import status from rest_framework.test import APIClient, APITestCase diff --git a/src/open_inwoner/api/urls.py b/src/open_inwoner/api/urls.py index ac9b8d23fe..82bd03848a 100644 --- a/src/open_inwoner/api/urls.py +++ b/src/open_inwoner/api/urls.py @@ -1,5 +1,4 @@ from django.urls import include, path - from drf_spectacular.views import SpectacularJSONAPIView, SpectacularRedocView from rest_framework import routers diff --git a/src/open_inwoner/celery.py b/src/open_inwoner/celery.py index 29620c429b..fd270e6ac3 100644 --- a/src/open_inwoner/celery.py +++ b/src/open_inwoner/celery.py @@ -1,9 +1,8 @@ from pathlib import Path -from django.conf import settings - from celery import Celery, bootsteps from celery.signals import setup_logging, worker_ready, worker_shutdown +from django.conf import settings from .setup import setup_env diff --git a/src/open_inwoner/ckeditor5/tests/test_upload_api.py b/src/open_inwoner/ckeditor5/tests/test_upload_api.py index 9d4131beb7..992654006f 100644 --- a/src/open_inwoner/ckeditor5/tests/test_upload_api.py +++ b/src/open_inwoner/ckeditor5/tests/test_upload_api.py @@ -1,6 +1,5 @@ from django.core.files.uploadedfile import SimpleUploadedFile from django.urls import reverse_lazy - from filer.models import Image from rest_framework import status from rest_framework.test import APITestCase diff --git a/src/open_inwoner/cms/banner/cms_plugins.py b/src/open_inwoner/cms/banner/cms_plugins.py index 406aa25cf9..dc142e6cd4 100644 --- a/src/open_inwoner/cms/banner/cms_plugins.py +++ b/src/open_inwoner/cms/banner/cms_plugins.py @@ -1,7 +1,6 @@ -from django.utils.translation import gettext_lazy as _ - from cms.plugin_base import CMSPluginBase from cms.plugin_pool import plugin_pool +from django.utils.translation import gettext_lazy as _ from .forms import BannerImageForm, BannerTextForm from .models import BannerImage, BannerText diff --git a/src/open_inwoner/cms/banner/migrations/0001_initial.py b/src/open_inwoner/cms/banner/migrations/0001_initial.py index 18eaf55d61..ba09cfaca2 100644 --- a/src/open_inwoner/cms/banner/migrations/0001_initial.py +++ b/src/open_inwoner/cms/banner/migrations/0001_initial.py @@ -1,13 +1,12 @@ # Generated by Django 3.2.15 on 2023-04-25 13:10 -from django.conf import settings -from django.db import migrations, models import django.db.models.deletion import filer.fields.image +from django.conf import settings +from django.db import migrations, models class Migration(migrations.Migration): - initial = True dependencies = [ diff --git a/src/open_inwoner/cms/banner/migrations/0002_banner_image_height.py b/src/open_inwoner/cms/banner/migrations/0002_banner_image_height.py index 66d9f5605d..01f046e474 100644 --- a/src/open_inwoner/cms/banner/migrations/0002_banner_image_height.py +++ b/src/open_inwoner/cms/banner/migrations/0002_banner_image_height.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("banner", "0001_initial"), ] diff --git a/src/open_inwoner/cms/banner/migrations/0003_auto_20230511_1125.py b/src/open_inwoner/cms/banner/migrations/0003_auto_20230511_1125.py index f2cf335386..7b41b166c9 100644 --- a/src/open_inwoner/cms/banner/migrations/0003_auto_20230511_1125.py +++ b/src/open_inwoner/cms/banner/migrations/0003_auto_20230511_1125.py @@ -1,9 +1,9 @@ # Generated by Django 3.2.15 on 2023-05-11 09:25 -from django.conf import settings -from django.db import migrations, models import django.db.models.deletion import filer.fields.image +from django.conf import settings +from django.db import migrations, models class Migration(migrations.Migration): diff --git a/src/open_inwoner/cms/banner/migrations/0004_alter_bannerimage_cmsplugin_ptr_and_more.py b/src/open_inwoner/cms/banner/migrations/0004_alter_bannerimage_cmsplugin_ptr_and_more.py index 97042161f7..93145dd7d8 100644 --- a/src/open_inwoner/cms/banner/migrations/0004_alter_bannerimage_cmsplugin_ptr_and_more.py +++ b/src/open_inwoner/cms/banner/migrations/0004_alter_bannerimage_cmsplugin_ptr_and_more.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - dependencies = [ ("cms", "0022_auto_20180620_1551"), ("banner", "0003_auto_20230511_1125"), diff --git a/src/open_inwoner/cms/banner/models.py b/src/open_inwoner/cms/banner/models.py index 98bb0f1d94..5f4a07ee23 100644 --- a/src/open_inwoner/cms/banner/models.py +++ b/src/open_inwoner/cms/banner/models.py @@ -1,9 +1,8 @@ import os +from cms.models import CMSPlugin from django.db import models from django.utils.translation import gettext_lazy as _ - -from cms.models import CMSPlugin from filer.fields.image import FilerImageField diff --git a/src/open_inwoner/cms/benefits/cms_apps.py b/src/open_inwoner/cms/benefits/cms_apps.py index ab1bce81cc..85b9afe6e8 100644 --- a/src/open_inwoner/cms/benefits/cms_apps.py +++ b/src/open_inwoner/cms/benefits/cms_apps.py @@ -1,7 +1,6 @@ -from django.utils.translation import gettext_lazy as _ - from cms.app_base import CMSApp from cms.apphook_pool import apphook_pool +from django.utils.translation import gettext_lazy as _ @apphook_pool.register diff --git a/src/open_inwoner/cms/cases/cms_apps.py b/src/open_inwoner/cms/cases/cms_apps.py index 5fda8bcc67..0e525f0906 100644 --- a/src/open_inwoner/cms/cases/cms_apps.py +++ b/src/open_inwoner/cms/cases/cms_apps.py @@ -1,7 +1,6 @@ -from django.utils.translation import gettext_lazy as _ - from cms.app_base import CMSApp from cms.apphook_pool import apphook_pool +from django.utils.translation import gettext_lazy as _ @apphook_pool.register diff --git a/src/open_inwoner/cms/cases/forms.py b/src/open_inwoner/cms/cases/forms.py index f21ac5a228..c8988759c1 100644 --- a/src/open_inwoner/cms/cases/forms.py +++ b/src/open_inwoner/cms/cases/forms.py @@ -37,8 +37,10 @@ def __init__(self, case, **kwargs): if case: self.fields[ "type" - ].queryset = ZaakTypeInformatieObjectTypeConfig.objects.filter_enabled_for_case_type( - case.zaaktype + ].queryset = ( + ZaakTypeInformatieObjectTypeConfig.objects.filter_enabled_for_case_type( + case.zaaktype + ) ) choices = self.fields["type"].choices diff --git a/src/open_inwoner/cms/cases/tests/test_contactform.py b/src/open_inwoner/cms/cases/tests/test_contactform.py index 70fa83394f..bea9ef2feb 100644 --- a/src/open_inwoner/cms/cases/tests/test_contactform.py +++ b/src/open_inwoner/cms/cases/tests/test_contactform.py @@ -1,12 +1,11 @@ from unittest.mock import ANY, patch +import requests_mock from django.conf import settings from django.core import mail from django.test import override_settings from django.urls import reverse from django.utils.translation import gettext as _ - -import requests_mock from django_webtest import WebTest from zgw_consumers.api_models.constants import ( RolOmschrijving, @@ -609,10 +608,12 @@ def test_form_success_with_api_eherkenning_user( if use_rsin_for_innNnpId_query_parameter else eherkenning_user.kvk ) - m.get( - f"{KLANTEN_ROOT}klanten?subjectNietNatuurlijkPersoon__innNnpId={identifier}", - json=paginated_response([self.klant]), - ), + ( + m.get( + f"{KLANTEN_ROOT}klanten?subjectNietNatuurlijkPersoon__innNnpId={identifier}", + json=paginated_response([self.klant]), + ), + ) response = self.app.get(self.case_detail_url, user=eherkenning_user) diff --git a/src/open_inwoner/cms/cases/tests/test_htmx.py b/src/open_inwoner/cms/cases/tests/test_htmx.py index ef0e03dbb5..bef312e039 100644 --- a/src/open_inwoner/cms/cases/tests/test_htmx.py +++ b/src/open_inwoner/cms/cases/tests/test_htmx.py @@ -2,10 +2,9 @@ from unittest.mock import patch from uuid import UUID +import requests_mock from django.test import override_settings, tag from django.utils.translation import gettext as _ - -import requests_mock from playwright.sync_api import expect from zgw_consumers.api_models.constants import ( RolOmschrijving, @@ -555,10 +554,12 @@ def mock_list(request, context): ] return json.dumps(items) - m.get( - f"{ZAKEN_ROOT}zaakinformatieobjecten?zaak={self.zaak['url']}", - text=mock_list, - ), + ( + m.get( + f"{ZAKEN_ROOT}zaakinformatieobjecten?zaak={self.zaak['url']}", + text=mock_list, + ), + ) # Upload mock. def mock_upload(request, context): @@ -592,11 +593,13 @@ def mock_upload(request, context): uploads.append(uploaded_informatie_object) return json.dumps(uploaded_informatie_object) - m.post( - f"{DOCUMENTEN_ROOT}enkelvoudiginformatieobjecten", - status_code=201, - text=mock_upload, - ), + ( + m.post( + f"{DOCUMENTEN_ROOT}enkelvoudiginformatieobjecten", + status_code=201, + text=mock_upload, + ), + ) # Setup. context = self.browser.new_context(storage_state=self.user_login_state) diff --git a/src/open_inwoner/cms/cases/views/cases.py b/src/open_inwoner/cms/cases/views/cases.py index d7f806bdab..2a6572b538 100644 --- a/src/open_inwoner/cms/cases/views/cases.py +++ b/src/open_inwoner/cms/cases/views/cases.py @@ -1,11 +1,10 @@ import logging -from typing import Sequence +from collections.abc import Sequence from django.urls import reverse from django.utils.functional import cached_property from django.utils.translation import gettext_lazy as _ from django.views.generic import TemplateView - from furl import furl from view_breadcrumbs import BaseBreadcrumbMixin diff --git a/src/open_inwoner/cms/cases/views/services.py b/src/open_inwoner/cms/cases/views/services.py index 88fb303a4e..49aeba8476 100644 --- a/src/open_inwoner/cms/cases/views/services.py +++ b/src/open_inwoner/cms/cases/views/services.py @@ -2,12 +2,12 @@ import enum import functools import logging +from collections.abc import Callable from dataclasses import dataclass -from typing import Callable, TypedDict +from typing import TypedDict from django.http import HttpRequest from django.utils.translation import gettext_lazy as _ - from zgw_consumers.concurrent import parallel from open_inwoner.openzaak.api_models import OpenSubmission, Zaak @@ -226,9 +226,7 @@ def resolve_cases( case = futures[task]["case"] group = futures[task]["api_group"] logger.exception( - "Error while resolving case {case} with API group {group}".format( - case=case, group=group - ) + f"Error while resolving case {case} with API group {group}" ) return resolved_cases @@ -266,7 +264,7 @@ def resolve_case(self, case: Zaak, group: ZGWApiGroupConfig) -> Zaak: ): try: update_case = task.result() - if hasattr(update_case, "__call__"): + if callable(update_case): update_case(case) except BaseException: logger.exception("Error in resolving case", stack_info=True) diff --git a/src/open_inwoner/cms/cases/views/status.py b/src/open_inwoner/cms/cases/views/status.py index 62748ae345..0ef585f04e 100644 --- a/src/open_inwoner/cms/cases/views/status.py +++ b/src/open_inwoner/cms/cases/views/status.py @@ -2,8 +2,9 @@ import datetime as dt import logging from collections import defaultdict +from collections.abc import Iterable from datetime import datetime -from typing import Iterable, Protocol +from typing import Protocol from django.conf import settings from django.contrib import messages @@ -19,7 +20,6 @@ from django.utils.translation import gettext_lazy as _ from django.views import View from django.views.generic import FormView, TemplateView - from django_htmx.http import HttpResponseClientRedirect from mail_editor.helpers import find_template from view_breadcrumbs import BaseBreadcrumbMixin @@ -317,7 +317,7 @@ def get_second_status_preview(self, statustypen: list) -> StatusType | None: # only 1 statustype for `self.case` # (this scenario is blocked by openzaak, but not part of the zgw standard) if len(statustype_numbers) < 2: - logger.info("Case {case} has only one statustype".format(case=self.case)) + logger.info(f"Case {self.case} has only one statustype") return statustype_numbers.sort() @@ -367,9 +367,7 @@ def sync_statuses_with_status_types( # Workaround: OIP requests the current zaak.status individually and adds the retrieved information to the statustype mapping logger.info( - "Issue #2037 -- Retrieving status individually for case {} because of eSuite".format( - self.case.identification - ) + f"Issue #2037 -- Retrieving status individually for case {self.case.identification} because of eSuite" ) self.case.status = zaken_client.fetch_single_status(self.case.status) status_types_mapping[self.case.status.statustype].append(self.case.status) @@ -460,9 +458,7 @@ def is_file_upload_enabled_for_case_type(self) -> bool: ).exists() ) logger.info( - "Case {url} has case type file upload: {case_upload_enabled}".format( - url=self.case.url, case_upload_enabled=case_upload_enabled - ) + f"Case {self.case.url} has case type file upload: {case_upload_enabled}" ) return case_upload_enabled @@ -475,26 +471,18 @@ def is_file_upload_enabled_for_statustype(self) -> bool: except AttributeError as e: logger.exception(e) logger.info( - "Could not retrieve status type for case {case}; " - "the status has not been resolved to a ZGW model object.".format( - case=self.case - ) + f"Could not retrieve status type for case {self.case}; " + "the status has not been resolved to a ZGW model object." ) return True except KeyError as e: logger.exception(e) logger.info( - "Could not retrieve status type config for url {url}".format( - url=self.case.status.statustype.url - ) + f"Could not retrieve status type config for url {self.case.status.statustype.url}" ) return True logger.info( - "Case {url} status type {status_type} has status type file upload: {enabled_for_status_type}".format( - url=self.case.url, - status_type=self.case.status.statustype, - enabled_for_status_type=enabled_for_status_type, - ) + f"Case {self.case.url} status type {self.case.status.statustype} has status type file upload: {enabled_for_status_type}" ) return enabled_for_status_type @@ -664,7 +652,9 @@ def get_case_document_files( config = OpenZaakConfig.get_solo() documents = [] - for case_info_obj, info_obj in zip(case_info_objects, info_objects): + for case_info_obj, info_obj in zip( + case_info_objects, info_objects, strict=False + ): if not info_obj: continue if not is_info_object_visible( @@ -912,9 +902,9 @@ def post(self, request, *args, **kwargs): send_confirmation = False if config.register_email: - form.cleaned_data[ - "question" - ] += f"\n\nCase number: {self.case.identificatie}" + form.cleaned_data["question"] += ( + f"\n\nCase number: {self.case.identificatie}" + ) email_success = self.register_by_email(form, config.register_email) send_confirmation = email_success diff --git a/src/open_inwoner/cms/collaborate/cms_apps.py b/src/open_inwoner/cms/collaborate/cms_apps.py index f818a0aec2..a0eb247c9e 100644 --- a/src/open_inwoner/cms/collaborate/cms_apps.py +++ b/src/open_inwoner/cms/collaborate/cms_apps.py @@ -1,7 +1,6 @@ -from django.utils.translation import gettext_lazy as _ - from cms.app_base import CMSApp from cms.apphook_pool import apphook_pool +from django.utils.translation import gettext_lazy as _ @apphook_pool.register diff --git a/src/open_inwoner/cms/collaborate/cms_plugins.py b/src/open_inwoner/cms/collaborate/cms_plugins.py index c61e3e5271..b8533fbf46 100644 --- a/src/open_inwoner/cms/collaborate/cms_plugins.py +++ b/src/open_inwoner/cms/collaborate/cms_plugins.py @@ -1,7 +1,6 @@ -from django.utils.translation import gettext_lazy as _ - from cms.plugin_base import CMSPluginBase from cms.plugin_pool import plugin_pool +from django.utils.translation import gettext_lazy as _ from open_inwoner.plans.models import Plan diff --git a/src/open_inwoner/cms/collaborate/test/test_plugin_active_plans.py b/src/open_inwoner/cms/collaborate/test/test_plugin_active_plans.py index 26708afc19..f279eea897 100644 --- a/src/open_inwoner/cms/collaborate/test/test_plugin_active_plans.py +++ b/src/open_inwoner/cms/collaborate/test/test_plugin_active_plans.py @@ -1,5 +1,4 @@ from django.test import override_settings - from django_webtest import WebTest from open_inwoner.cms.products.cms_apps import ProductsApphook diff --git a/src/open_inwoner/cms/context_processors.py b/src/open_inwoner/cms/context_processors.py index 0ea84b8e09..393557b21c 100644 --- a/src/open_inwoner/cms/context_processors.py +++ b/src/open_inwoner/cms/context_processors.py @@ -1,6 +1,5 @@ -from django.db.models import Q - from cms.models import Page +from django.db.models import Q def active_apphooks(request): diff --git a/src/open_inwoner/cms/extensions/admin.py b/src/open_inwoner/cms/extensions/admin.py index 566ce82760..6a6e3dda55 100644 --- a/src/open_inwoner/cms/extensions/admin.py +++ b/src/open_inwoner/cms/extensions/admin.py @@ -1,6 +1,5 @@ -from django.contrib import admin - from cms.extensions import PageExtensionAdmin +from django.contrib import admin from .models import CommonExtension diff --git a/src/open_inwoner/cms/extensions/cms_menus.py b/src/open_inwoner/cms/extensions/cms_menus.py index b83d78c741..6ea41c4b75 100644 --- a/src/open_inwoner/cms/extensions/cms_menus.py +++ b/src/open_inwoner/cms/extensions/cms_menus.py @@ -1,6 +1,5 @@ -from django.core.exceptions import ObjectDoesNotExist - from cms.models import Page +from django.core.exceptions import ObjectDoesNotExist from menus.base import Modifier from menus.menu_pool import menu_pool @@ -36,7 +35,8 @@ def modify(self, request, nodes, namespace, root_id, post_cut, breadcrumb): pages = ( Page.objects.filter(id__in=page_nodes.keys()) # optimise and only retrieve id and related object - .only("id").select_related("commonextension") + .only("id") + .select_related("commonextension") ) num_indicators = 0 diff --git a/src/open_inwoner/cms/extensions/cms_toolbars.py b/src/open_inwoner/cms/extensions/cms_toolbars.py index 3d032026bc..fc2e396d11 100644 --- a/src/open_inwoner/cms/extensions/cms_toolbars.py +++ b/src/open_inwoner/cms/extensions/cms_toolbars.py @@ -1,7 +1,6 @@ -from django.utils.translation import gettext_lazy as _ - from cms.extensions.toolbar import ExtensionToolbar from cms.toolbar_pool import toolbar_pool +from django.utils.translation import gettext_lazy as _ from .models import CommonExtension diff --git a/src/open_inwoner/cms/extensions/migrations/0001_initial.py b/src/open_inwoner/cms/extensions/migrations/0001_initial.py index 6195bfb2a1..d2e9cd0be6 100644 --- a/src/open_inwoner/cms/extensions/migrations/0001_initial.py +++ b/src/open_inwoner/cms/extensions/migrations/0001_initial.py @@ -1,11 +1,10 @@ # Generated by Django 3.2.15 on 2023-04-24 10:13 -from django.db import migrations, models import django.db.models.deletion +from django.db import migrations, models class Migration(migrations.Migration): - initial = True dependencies = [ diff --git a/src/open_inwoner/cms/extensions/migrations/0002_commonextension_menu_indicator.py b/src/open_inwoner/cms/extensions/migrations/0002_commonextension_menu_indicator.py index 9dbbc94002..716a35216e 100644 --- a/src/open_inwoner/cms/extensions/migrations/0002_commonextension_menu_indicator.py +++ b/src/open_inwoner/cms/extensions/migrations/0002_commonextension_menu_indicator.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("extensions", "0001_initial"), ] diff --git a/src/open_inwoner/cms/extensions/migrations/0003_commonextension_menu_icon.py b/src/open_inwoner/cms/extensions/migrations/0003_commonextension_menu_icon.py index 737f5da0cb..5622df4d47 100644 --- a/src/open_inwoner/cms/extensions/migrations/0003_commonextension_menu_icon.py +++ b/src/open_inwoner/cms/extensions/migrations/0003_commonextension_menu_icon.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("extensions", "0002_commonextension_menu_indicator"), ] diff --git a/src/open_inwoner/cms/extensions/migrations/0005_alter_commonextension_menu_icon.py b/src/open_inwoner/cms/extensions/migrations/0005_alter_commonextension_menu_icon.py index da3ac6a8a1..13138d264e 100644 --- a/src/open_inwoner/cms/extensions/migrations/0005_alter_commonextension_menu_icon.py +++ b/src/open_inwoner/cms/extensions/migrations/0005_alter_commonextension_menu_icon.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("extensions", "0004_alter_commonextension_menu_icon"), ] diff --git a/src/open_inwoner/cms/extensions/migrations/0006_rename_requires_auth_bsn_commonextension_requires_auth_bsn_or_kvk.py b/src/open_inwoner/cms/extensions/migrations/0006_rename_requires_auth_bsn_commonextension_requires_auth_bsn_or_kvk.py index 8e51b52390..3ebaa0a24d 100644 --- a/src/open_inwoner/cms/extensions/migrations/0006_rename_requires_auth_bsn_commonextension_requires_auth_bsn_or_kvk.py +++ b/src/open_inwoner/cms/extensions/migrations/0006_rename_requires_auth_bsn_commonextension_requires_auth_bsn_or_kvk.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("extensions", "0005_alter_commonextension_menu_icon"), ] diff --git a/src/open_inwoner/cms/extensions/migrations/0007_alter_commonextension_requires_auth_bsn_or_kvk.py b/src/open_inwoner/cms/extensions/migrations/0007_alter_commonextension_requires_auth_bsn_or_kvk.py index 66825c3e6b..3f97f96189 100644 --- a/src/open_inwoner/cms/extensions/migrations/0007_alter_commonextension_requires_auth_bsn_or_kvk.py +++ b/src/open_inwoner/cms/extensions/migrations/0007_alter_commonextension_requires_auth_bsn_or_kvk.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ( "extensions", diff --git a/src/open_inwoner/cms/extensions/models.py b/src/open_inwoner/cms/extensions/models.py index c11512dec6..733cc2f6dc 100644 --- a/src/open_inwoner/cms/extensions/models.py +++ b/src/open_inwoner/cms/extensions/models.py @@ -1,8 +1,7 @@ -from django.db import models -from django.utils.translation import gettext_lazy as _ - from cms.extensions import PageExtension from cms.extensions.extension_pool import extension_pool +from django.db import models +from django.utils.translation import gettext_lazy as _ from open_inwoner.cms.extensions.constants import Icons, IndicatorChoices diff --git a/src/open_inwoner/cms/footer/cms_plugins.py b/src/open_inwoner/cms/footer/cms_plugins.py index c8f67a7ec9..04355140d9 100644 --- a/src/open_inwoner/cms/footer/cms_plugins.py +++ b/src/open_inwoner/cms/footer/cms_plugins.py @@ -1,7 +1,6 @@ -from django.utils.translation import gettext_lazy as _ - from cms.plugin_base import CMSPluginBase from cms.plugin_pool import plugin_pool +from django.utils.translation import gettext_lazy as _ from open_inwoner.configurations.models import SiteConfiguration from open_inwoner.openklant.models import OpenKlantConfig diff --git a/src/open_inwoner/cms/inbox/cms_apps.py b/src/open_inwoner/cms/inbox/cms_apps.py index c59d77c857..9f75567e7b 100644 --- a/src/open_inwoner/cms/inbox/cms_apps.py +++ b/src/open_inwoner/cms/inbox/cms_apps.py @@ -1,7 +1,6 @@ -from django.utils.translation import gettext_lazy as _ - from cms.app_base import CMSApp from cms.apphook_pool import apphook_pool +from django.utils.translation import gettext_lazy as _ @apphook_pool.register diff --git a/src/open_inwoner/cms/plugins/cms_plugins/appointments.py b/src/open_inwoner/cms/plugins/cms_plugins/appointments.py index 1837f0b146..f264e1e96d 100644 --- a/src/open_inwoner/cms/plugins/cms_plugins/appointments.py +++ b/src/open_inwoner/cms/plugins/cms_plugins/appointments.py @@ -1,9 +1,8 @@ import logging -from django.utils.translation import gettext as _ - from cms.plugin_base import CMSPluginBase from cms.plugin_pool import plugin_pool +from django.utils.translation import gettext as _ from open_inwoner.cms.plugins.models.appointments import UserAppointments from open_inwoner.qmatic.client import NoServiceConfigured, QmaticClient diff --git a/src/open_inwoner/cms/plugins/cms_plugins/userfeed.py b/src/open_inwoner/cms/plugins/cms_plugins/userfeed.py index 75402f1257..1e2d25d4a8 100644 --- a/src/open_inwoner/cms/plugins/cms_plugins/userfeed.py +++ b/src/open_inwoner/cms/plugins/cms_plugins/userfeed.py @@ -1,7 +1,6 @@ -from django.utils.translation import gettext as _ - from cms.plugin_base import CMSPluginBase from cms.plugin_pool import plugin_pool +from django.utils.translation import gettext as _ from open_inwoner.cms.plugins.models.userfeed import UserFeed from open_inwoner.userfeed.feed import get_feed diff --git a/src/open_inwoner/cms/plugins/cms_plugins/videoplayer.py b/src/open_inwoner/cms/plugins/cms_plugins/videoplayer.py index 4c431fe136..b336ab0395 100644 --- a/src/open_inwoner/cms/plugins/cms_plugins/videoplayer.py +++ b/src/open_inwoner/cms/plugins/cms_plugins/videoplayer.py @@ -1,7 +1,6 @@ -from django.utils.translation import gettext as _ - from cms.plugin_base import CMSPluginBase from cms.plugin_pool import plugin_pool +from django.utils.translation import gettext as _ from open_inwoner.cms.plugins.models.videoplayer import VideoPlayer diff --git a/src/open_inwoner/cms/plugins/migrations/0001_initial.py b/src/open_inwoner/cms/plugins/migrations/0001_initial.py index 8a840d05be..dedfe10e8b 100644 --- a/src/open_inwoner/cms/plugins/migrations/0001_initial.py +++ b/src/open_inwoner/cms/plugins/migrations/0001_initial.py @@ -1,11 +1,10 @@ # Generated by Django 3.2.20 on 2023-09-19 13:04 -from django.db import migrations, models import django.db.models.deletion +from django.db import migrations, models class Migration(migrations.Migration): - initial = True dependencies = [ diff --git a/src/open_inwoner/cms/plugins/migrations/0002_userfeed.py b/src/open_inwoner/cms/plugins/migrations/0002_userfeed.py index ca89faa8b3..234f03a6da 100644 --- a/src/open_inwoner/cms/plugins/migrations/0002_userfeed.py +++ b/src/open_inwoner/cms/plugins/migrations/0002_userfeed.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - dependencies = [ ("cms", "0022_auto_20180620_1551"), ("plugins", "0001_initial"), diff --git a/src/open_inwoner/cms/plugins/migrations/0003_userfeed_title.py b/src/open_inwoner/cms/plugins/migrations/0003_userfeed_title.py index 46cc6c8bec..bed1f0ffd3 100644 --- a/src/open_inwoner/cms/plugins/migrations/0003_userfeed_title.py +++ b/src/open_inwoner/cms/plugins/migrations/0003_userfeed_title.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("plugins", "0002_userfeed"), ] diff --git a/src/open_inwoner/cms/plugins/migrations/0004_alter_userfeed_cmsplugin_ptr_and_more.py b/src/open_inwoner/cms/plugins/migrations/0004_alter_userfeed_cmsplugin_ptr_and_more.py index 56c4b19510..22bd1f6af2 100644 --- a/src/open_inwoner/cms/plugins/migrations/0004_alter_userfeed_cmsplugin_ptr_and_more.py +++ b/src/open_inwoner/cms/plugins/migrations/0004_alter_userfeed_cmsplugin_ptr_and_more.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - dependencies = [ ("cms", "0022_auto_20180620_1551"), ("plugins", "0003_userfeed_title"), diff --git a/src/open_inwoner/cms/plugins/migrations/0005_userappointments.py b/src/open_inwoner/cms/plugins/migrations/0005_userappointments.py index d327a8c141..fc2240778e 100644 --- a/src/open_inwoner/cms/plugins/migrations/0005_userappointments.py +++ b/src/open_inwoner/cms/plugins/migrations/0005_userappointments.py @@ -1,11 +1,10 @@ # Generated by Django 4.2.10 on 2024-03-28 10:07 -from django.db import migrations, models import django.db.models.deletion +from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ("cms", "0022_auto_20180620_1551"), ("plugins", "0004_alter_userfeed_cmsplugin_ptr_and_more"), diff --git a/src/open_inwoner/cms/plugins/models/appointments.py b/src/open_inwoner/cms/plugins/models/appointments.py index 20a1680c21..a5ccf8206c 100644 --- a/src/open_inwoner/cms/plugins/models/appointments.py +++ b/src/open_inwoner/cms/plugins/models/appointments.py @@ -1,8 +1,7 @@ +from cms.models import CMSPlugin from django.db import models from django.utils.translation import gettext_lazy as _ -from cms.models import CMSPlugin - class UserAppointments(CMSPlugin): title = models.CharField( diff --git a/src/open_inwoner/cms/plugins/models/userfeed.py b/src/open_inwoner/cms/plugins/models/userfeed.py index 39c1f2990e..df4030c021 100644 --- a/src/open_inwoner/cms/plugins/models/userfeed.py +++ b/src/open_inwoner/cms/plugins/models/userfeed.py @@ -1,8 +1,7 @@ +from cms.models import CMSPlugin from django.db import models from django.utils.translation import gettext_lazy as _ -from cms.models import CMSPlugin - class UserFeed(CMSPlugin): title = models.CharField( diff --git a/src/open_inwoner/cms/plugins/models/videoplayer.py b/src/open_inwoner/cms/plugins/models/videoplayer.py index 7d3b8a69b0..bd54baff66 100644 --- a/src/open_inwoner/cms/plugins/models/videoplayer.py +++ b/src/open_inwoner/cms/plugins/models/videoplayer.py @@ -1,8 +1,7 @@ +from cms.models import CMSPlugin from django.db import models from django.utils.translation import gettext_lazy as _ -from cms.models import CMSPlugin - from open_inwoner.media.models import Video diff --git a/src/open_inwoner/cms/plugins/tests/test_appointments.py b/src/open_inwoner/cms/plugins/tests/test_appointments.py index 4473c378ca..60f554d0ee 100644 --- a/src/open_inwoner/cms/plugins/tests/test_appointments.py +++ b/src/open_inwoner/cms/plugins/tests/test_appointments.py @@ -1,7 +1,6 @@ +import requests_mock from django.test import TestCase, override_settings from django.urls import reverse - -import requests_mock from pyquery import PyQuery as PQ from open_inwoner.cms.tests import cms_tools diff --git a/src/open_inwoner/cms/plugins/tests/test_userfeed.py b/src/open_inwoner/cms/plugins/tests/test_userfeed.py index 33b3fe0c40..fac36ca59d 100644 --- a/src/open_inwoner/cms/plugins/tests/test_userfeed.py +++ b/src/open_inwoner/cms/plugins/tests/test_userfeed.py @@ -1,7 +1,6 @@ from django.test import TestCase from django.utils.html import strip_tags from django.utils.translation import ngettext - from pyquery import PyQuery as PQ from open_inwoner.accounts.tests.factories import UserFactory diff --git a/src/open_inwoner/cms/products/cms_apps.py b/src/open_inwoner/cms/products/cms_apps.py index 0c7f892908..2610c9dec9 100644 --- a/src/open_inwoner/cms/products/cms_apps.py +++ b/src/open_inwoner/cms/products/cms_apps.py @@ -1,7 +1,6 @@ -from django.utils.translation import gettext_lazy as _ - from cms.app_base import CMSApp from cms.apphook_pool import apphook_pool +from django.utils.translation import gettext_lazy as _ @apphook_pool.register diff --git a/src/open_inwoner/cms/products/cms_plugins.py b/src/open_inwoner/cms/products/cms_plugins.py index ce1e048115..56663bd875 100644 --- a/src/open_inwoner/cms/products/cms_plugins.py +++ b/src/open_inwoner/cms/products/cms_plugins.py @@ -1,9 +1,8 @@ -from django.urls import NoReverseMatch, resolve, reverse -from django.utils.translation import gettext_lazy as _ - from cms.apphook_pool import apphook_pool from cms.plugin_base import CMSPluginBase from cms.plugin_pool import plugin_pool +from django.urls import NoReverseMatch, resolve, reverse +from django.utils.translation import gettext_lazy as _ from open_inwoner.openzaak.models import OpenZaakConfig from open_inwoner.pdc.forms import ProductFinderForm diff --git a/src/open_inwoner/cms/products/tests/test_plugin_categories.py b/src/open_inwoner/cms/products/tests/test_plugin_categories.py index 7241ac07aa..228dfc6bc1 100644 --- a/src/open_inwoner/cms/products/tests/test_plugin_categories.py +++ b/src/open_inwoner/cms/products/tests/test_plugin_categories.py @@ -1,12 +1,11 @@ from datetime import date from unittest.mock import patch -from django.test import TestCase -from django.test.utils import override_settings - import requests_mock from cms.apphook_pool import apphook_pool from dateutil.relativedelta import relativedelta +from django.test import TestCase +from django.test.utils import override_settings from django_webtest import TransactionWebTest, WebTest from furl import furl from requests import RequestException diff --git a/src/open_inwoner/cms/products/tests/test_plugin_product_finder.py b/src/open_inwoner/cms/products/tests/test_plugin_product_finder.py index 605368b592..4e2de56bd1 100644 --- a/src/open_inwoner/cms/products/tests/test_plugin_product_finder.py +++ b/src/open_inwoner/cms/products/tests/test_plugin_product_finder.py @@ -1,5 +1,4 @@ from django.test import override_settings - from django_webtest import WebTest from open_inwoner.accounts.tests.factories import UserFactory diff --git a/src/open_inwoner/cms/products/tests/test_plugin_product_location.py b/src/open_inwoner/cms/products/tests/test_plugin_product_location.py index c49ffccec3..feedbbf2d7 100644 --- a/src/open_inwoner/cms/products/tests/test_plugin_product_location.py +++ b/src/open_inwoner/cms/products/tests/test_plugin_product_location.py @@ -1,6 +1,5 @@ from django.test import override_settings from django.urls import reverse - from django_webtest import WebTest from open_inwoner.pdc.tests.factories import ProductFactory, ProductLocationFactory diff --git a/src/open_inwoner/cms/products/tests/test_plugin_questionnaire.py b/src/open_inwoner/cms/products/tests/test_plugin_questionnaire.py index 1b50d169f9..4bdafd45cd 100644 --- a/src/open_inwoner/cms/products/tests/test_plugin_questionnaire.py +++ b/src/open_inwoner/cms/products/tests/test_plugin_questionnaire.py @@ -1,5 +1,4 @@ from django.test import TestCase, override_settings - from django_webtest import WebTest from open_inwoner.accounts.tests.factories import UserFactory diff --git a/src/open_inwoner/cms/profile/admin.py b/src/open_inwoner/cms/profile/admin.py index b536762733..84ced2087b 100644 --- a/src/open_inwoner/cms/profile/admin.py +++ b/src/open_inwoner/cms/profile/admin.py @@ -1,6 +1,5 @@ -from django.contrib import admin - from aldryn_apphooks_config.admin import BaseAppHookConfig +from django.contrib import admin from .cms_appconfig import ProfileConfig diff --git a/src/open_inwoner/cms/profile/cms_appconfig.py b/src/open_inwoner/cms/profile/cms_appconfig.py index 8b592a219f..6bc3caa5fc 100644 --- a/src/open_inwoner/cms/profile/cms_appconfig.py +++ b/src/open_inwoner/cms/profile/cms_appconfig.py @@ -1,8 +1,7 @@ +from aldryn_apphooks_config.models import AppHookConfig from django.db import models from django.utils.translation import gettext_lazy as _ -from aldryn_apphooks_config.models import AppHookConfig - class ProfileConfig(AppHookConfig): my_data = models.BooleanField( diff --git a/src/open_inwoner/cms/profile/cms_apps.py b/src/open_inwoner/cms/profile/cms_apps.py index ca12d41092..c10b0ea5c5 100644 --- a/src/open_inwoner/cms/profile/cms_apps.py +++ b/src/open_inwoner/cms/profile/cms_apps.py @@ -1,7 +1,6 @@ -from django.utils.translation import gettext_lazy as _ - from aldryn_apphooks_config.app_base import CMSConfigApp from cms.apphook_pool import apphook_pool +from django.utils.translation import gettext_lazy as _ from .cms_appconfig import ProfileConfig diff --git a/src/open_inwoner/cms/profile/cms_toolbars.py b/src/open_inwoner/cms/profile/cms_toolbars.py index 0874bcf716..82b82f32e3 100644 --- a/src/open_inwoner/cms/profile/cms_toolbars.py +++ b/src/open_inwoner/cms/profile/cms_toolbars.py @@ -1,9 +1,8 @@ -from django.urls import reverse -from django.utils.translation import gettext_lazy as _ - from aldryn_apphooks_config.utils import get_app_instance from cms.extensions.toolbar import ExtensionToolbar from cms.toolbar_pool import toolbar_pool +from django.urls import reverse +from django.utils.translation import gettext_lazy as _ from open_inwoner.cms.profile.cms_appconfig import ProfileConfig diff --git a/src/open_inwoner/cms/profile/migrations/0003_profileconfig_ssd.py b/src/open_inwoner/cms/profile/migrations/0003_profileconfig_ssd.py index d7dba0ee43..747cca8cef 100644 --- a/src/open_inwoner/cms/profile/migrations/0003_profileconfig_ssd.py +++ b/src/open_inwoner/cms/profile/migrations/0003_profileconfig_ssd.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("profile", "0002_profileconfig_questions"), ] diff --git a/src/open_inwoner/cms/profile/migrations/0004_profile_texts.py b/src/open_inwoner/cms/profile/migrations/0004_profile_texts.py index 4e4e686618..45ac7b3ecb 100644 --- a/src/open_inwoner/cms/profile/migrations/0004_profile_texts.py +++ b/src/open_inwoner/cms/profile/migrations/0004_profile_texts.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("profile", "0003_profileconfig_ssd"), ] diff --git a/src/open_inwoner/cms/profile/migrations/0005_remove_profileconfig_selected_categories.py b/src/open_inwoner/cms/profile/migrations/0005_remove_profileconfig_selected_categories.py index 7f28d10cb9..e9746a15fe 100644 --- a/src/open_inwoner/cms/profile/migrations/0005_remove_profileconfig_selected_categories.py +++ b/src/open_inwoner/cms/profile/migrations/0005_remove_profileconfig_selected_categories.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("profile", "0004_profile_texts"), ] diff --git a/src/open_inwoner/cms/profile/migrations/0006_alter_profileconfig_ssd.py b/src/open_inwoner/cms/profile/migrations/0006_alter_profileconfig_ssd.py index 41a7069e3e..001497b095 100644 --- a/src/open_inwoner/cms/profile/migrations/0006_alter_profileconfig_ssd.py +++ b/src/open_inwoner/cms/profile/migrations/0006_alter_profileconfig_ssd.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("profile", "0005_remove_profileconfig_selected_categories"), ] diff --git a/src/open_inwoner/cms/profile/migrations/0007_profileconfig_selected_categories.py b/src/open_inwoner/cms/profile/migrations/0007_profileconfig_selected_categories.py index bf9e67d0e8..cdba8b85bc 100644 --- a/src/open_inwoner/cms/profile/migrations/0007_profileconfig_selected_categories.py +++ b/src/open_inwoner/cms/profile/migrations/0007_profileconfig_selected_categories.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("profile", "0006_alter_profileconfig_ssd"), ] diff --git a/src/open_inwoner/cms/profile/migrations/0008_profileconfig_newsletters.py b/src/open_inwoner/cms/profile/migrations/0008_profileconfig_newsletters.py index b99dd40b00..1fcaf0aedf 100644 --- a/src/open_inwoner/cms/profile/migrations/0008_profileconfig_newsletters.py +++ b/src/open_inwoner/cms/profile/migrations/0008_profileconfig_newsletters.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("profile", "0007_profileconfig_selected_categories"), ] diff --git a/src/open_inwoner/cms/profile/migrations/0009_profileconfig_appointments.py b/src/open_inwoner/cms/profile/migrations/0009_profileconfig_appointments.py index 42782281fc..7f574e939d 100644 --- a/src/open_inwoner/cms/profile/migrations/0009_profileconfig_appointments.py +++ b/src/open_inwoner/cms/profile/migrations/0009_profileconfig_appointments.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("profile", "0008_profileconfig_newsletters"), ] diff --git a/src/open_inwoner/cms/tests/cms_tools.py b/src/open_inwoner/cms/tests/cms_tools.py index feb695d36a..23783a0eb8 100644 --- a/src/open_inwoner/cms/tests/cms_tools.py +++ b/src/open_inwoner/cms/tests/cms_tools.py @@ -1,14 +1,13 @@ -from django.conf import settings -from django.contrib.auth.models import AnonymousUser -from django.test import RequestFactory -from django.utils.module_loading import import_string - from cms import api from cms.api import add_plugin from cms.app_base import CMSApp from cms.apphook_pool import apphook_pool from cms.models import Placeholder from cms.plugin_rendering import ContentRenderer +from django.conf import settings +from django.contrib.auth.models import AnonymousUser +from django.test import RequestFactory +from django.utils.module_loading import import_string from open_inwoner.cms.extensions.models import CommonExtension from open_inwoner.utils.test import SessionMiddleware diff --git a/src/open_inwoner/cms/tests/test_cms_tools.py b/src/open_inwoner/cms/tests/test_cms_tools.py index 8ea978a74b..32030cf597 100644 --- a/src/open_inwoner/cms/tests/test_cms_tools.py +++ b/src/open_inwoner/cms/tests/test_cms_tools.py @@ -1,5 +1,4 @@ from django.test import override_settings - from django_webtest import WebTest from open_inwoner.cms.tests import cms_tools diff --git a/src/open_inwoner/cms/tests/test_middleware.py b/src/open_inwoner/cms/tests/test_middleware.py index 6cb291075a..64b6c26025 100644 --- a/src/open_inwoner/cms/tests/test_middleware.py +++ b/src/open_inwoner/cms/tests/test_middleware.py @@ -1,7 +1,6 @@ from django.conf import settings from django.test import TestCase, override_settings from django.urls import reverse - from maykin_2fa.test import disable_admin_mfa from pyquery import PyQuery as pq diff --git a/src/open_inwoner/cms/utils/middleware.py b/src/open_inwoner/cms/utils/middleware.py index b6a2fc2a41..8a11812fc8 100644 --- a/src/open_inwoner/cms/utils/middleware.py +++ b/src/open_inwoner/cms/utils/middleware.py @@ -1,6 +1,5 @@ -from django.http import HttpResponseRedirect - from cms.toolbar.utils import get_toolbar_from_request +from django.http import HttpResponseRedirect from open_inwoner.configurations.models import SiteConfiguration diff --git a/src/open_inwoner/cms/utils/page_display.py b/src/open_inwoner/cms/utils/page_display.py index fae32c7ad8..ffb2096699 100644 --- a/src/open_inwoner/cms/utils/page_display.py +++ b/src/open_inwoner/cms/utils/page_display.py @@ -1,9 +1,7 @@ """Utilities for determining whether CMS pages are published""" - -from django.db.models import Q - from cms.models import Page +from django.db.models import Q from open_inwoner.cms.benefits.cms_apps import SSDApphook from open_inwoner.cms.cases.cms_apps import CasesApphook diff --git a/src/open_inwoner/components/templatetags/action_tags.py b/src/open_inwoner/components/templatetags/action_tags.py index 83e83cf5f3..4892e01e28 100644 --- a/src/open_inwoner/components/templatetags/action_tags.py +++ b/src/open_inwoner/components/templatetags/action_tags.py @@ -80,9 +80,9 @@ def action_status_button(action, request, plan=None, **kwargs): for value, label, icon in StatusChoices.choices_with_icons() ] - kwargs[ - "class" - ] = f"actions__status-selector actions__status-selector--{action.status}" + kwargs["class"] = ( + f"actions__status-selector actions__status-selector--{action.status}" + ) kwargs.update( action=action, request=request, diff --git a/src/open_inwoner/components/templatetags/file_tags.py b/src/open_inwoner/components/templatetags/file_tags.py index b43143611f..308ef31e3f 100644 --- a/src/open_inwoner/components/templatetags/file_tags.py +++ b/src/open_inwoner/components/templatetags/file_tags.py @@ -3,7 +3,6 @@ from django import template from django.conf import settings - from filer.models.filemodels import File from open_inwoner.cms.cases.views.status import SimpleFile diff --git a/src/open_inwoner/components/templatetags/link_tags.py b/src/open_inwoner/components/templatetags/link_tags.py index 3e5d7a0b1c..cbda8d4787 100644 --- a/src/open_inwoner/components/templatetags/link_tags.py +++ b/src/open_inwoner/components/templatetags/link_tags.py @@ -1,7 +1,6 @@ from django import template from django.urls import NoReverseMatch, reverse from django.utils.html import format_html - from furl import furl register = template.Library() diff --git a/src/open_inwoner/components/templatetags/querystring_tags.py b/src/open_inwoner/components/templatetags/querystring_tags.py index b054dda8a3..5de93dc316 100644 --- a/src/open_inwoner/components/templatetags/querystring_tags.py +++ b/src/open_inwoner/components/templatetags/querystring_tags.py @@ -3,7 +3,6 @@ from django import template from django.http import QueryDict from django.utils.html import format_html - from furl import furl logger = logging.getLogger(__name__) diff --git a/src/open_inwoner/components/templatetags/string_tags.py b/src/open_inwoner/components/templatetags/string_tags.py index 5662f1c87f..09948c31b1 100644 --- a/src/open_inwoner/components/templatetags/string_tags.py +++ b/src/open_inwoner/components/templatetags/string_tags.py @@ -25,9 +25,7 @@ def optional_paragraph(optional_text: str) -> str: if not optional_text: return "" return format_html( - '
{optional_text}
'.format( - optional_text=linebreaksbr(optional_text) - ) + f'{linebreaksbr(optional_text)}
' ) diff --git a/src/open_inwoner/components/tests/abstract.py b/src/open_inwoner/components/tests/abstract.py index 29ef9ca6ce..aa5c74b688 100644 --- a/src/open_inwoner/components/tests/abstract.py +++ b/src/open_inwoner/components/tests/abstract.py @@ -1,8 +1,7 @@ -from django.template import Context, Template -from django.test import RequestFactory - from bs4 import BeautifulSoup from bs4.element import ResultSet, Tag +from django.template import Context, Template +from django.test import RequestFactory from django_webtest import WebTest diff --git a/src/open_inwoner/components/tests/test_header.py b/src/open_inwoner/components/tests/test_header.py index 1b52d2ec93..9002371122 100644 --- a/src/open_inwoner/components/tests/test_header.py +++ b/src/open_inwoner/components/tests/test_header.py @@ -1,5 +1,4 @@ from django.test import TestCase - from pyquery import PyQuery from open_inwoner.accounts.tests.factories import ( diff --git a/src/open_inwoner/components/tests/test_messages.py b/src/open_inwoner/components/tests/test_messages.py index 5885b32378..ba25782bba 100644 --- a/src/open_inwoner/components/tests/test_messages.py +++ b/src/open_inwoner/components/tests/test_messages.py @@ -1,7 +1,6 @@ import datetime from django.utils import timezone - from freezegun import freeze_time from ...accounts.forms import InboxForm diff --git a/src/open_inwoner/conf/base.py b/src/open_inwoner/conf/base.py index 74e0fba8da..aa1223445e 100644 --- a/src/open_inwoner/conf/base.py +++ b/src/open_inwoner/conf/base.py @@ -1,9 +1,8 @@ import os -from django.utils.translation import gettext_lazy as _ - import sentry_sdk from celery.schedules import crontab +from django.utils.translation import gettext_lazy as _ from easy_thumbnails.conf import Settings as thumbnail_settings from log_outgoing_requests.formatters import HttpFormatter @@ -995,7 +994,7 @@ ) if ALLOWED_HOSTS: - BASE_URL = "https://{}".format(ALLOWED_HOSTS[0]) + BASE_URL = f"https://{ALLOWED_HOSTS[0]}" else: BASE_URL = "https://example.com" diff --git a/src/open_inwoner/conf/dev.py b/src/open_inwoner/conf/dev.py index c2a1c13db9..12a623a022 100644 --- a/src/open_inwoner/conf/dev.py +++ b/src/open_inwoner/conf/dev.py @@ -10,9 +10,9 @@ os.environ.setdefault("IS_HTTPS", "no") os.environ.setdefault("VERSION_TAG", "dev") -os.environ.setdefault("DB_NAME", "open_inwoner"), -os.environ.setdefault("DB_USER", "open_inwoner"), -os.environ.setdefault("DB_PASSWORD", "open_inwoner"), +(os.environ.setdefault("DB_NAME", "open_inwoner"),) +(os.environ.setdefault("DB_USER", "open_inwoner"),) +(os.environ.setdefault("DB_PASSWORD", "open_inwoner"),) os.environ.setdefault("ENVIRONMENT", "development") diff --git a/src/open_inwoner/conf/production.py b/src/open_inwoner/conf/production.py index 44163a88fe..4dc72c6e95 100644 --- a/src/open_inwoner/conf/production.py +++ b/src/open_inwoner/conf/production.py @@ -3,6 +3,7 @@ Tweaks the base settings so that caching mechanisms are used where possible, and HTTPS is leveraged where possible to further secure things. """ + import os os.environ.setdefault("ENVIRONMENT", "production") diff --git a/src/open_inwoner/conf/staging.py b/src/open_inwoner/conf/staging.py index d0cc9d1eca..07e7044cbd 100644 --- a/src/open_inwoner/conf/staging.py +++ b/src/open_inwoner/conf/staging.py @@ -2,6 +2,7 @@ Staging environment settings module. This *should* be nearly identical to production. """ + import os os.environ.setdefault("ENVIRONMENT", "staging") diff --git a/src/open_inwoner/conf/test.py b/src/open_inwoner/conf/test.py index 1da205d479..ad0bf44b9a 100644 --- a/src/open_inwoner/conf/test.py +++ b/src/open_inwoner/conf/test.py @@ -2,6 +2,7 @@ Staging environment settings module. This *should* be nearly identical to production. """ + import os os.environ.setdefault("ENVIRONMENT", "test") diff --git a/src/open_inwoner/conf/utils.py b/src/open_inwoner/conf/utils.py index 2356a4ad8e..d315ee2835 100644 --- a/src/open_inwoner/conf/utils.py +++ b/src/open_inwoner/conf/utils.py @@ -4,9 +4,9 @@ from subprocess import CalledProcessError, check_output from typing import Any +from decouple import Csv, undefined +from decouple import config as _config from django.conf import settings - -from decouple import Csv, config as _config, undefined from sentry_sdk.integrations import DidNotEnable, django, redis logger = logging.getLogger(__name__) diff --git a/src/open_inwoner/configurations/admin.py b/src/open_inwoner/configurations/admin.py index 9481a625b4..a589b7344e 100644 --- a/src/open_inwoner/configurations/admin.py +++ b/src/open_inwoner/configurations/admin.py @@ -15,7 +15,6 @@ from django.urls.exceptions import Resolver404 from django.utils.html import format_html, format_html_join from django.utils.translation import gettext_lazy as _ - from ordered_model.admin import OrderedInlineModelAdminMixin, OrderedTabularInline from solo.admin import SingletonModelAdmin @@ -340,14 +339,7 @@ def report_contrast_ratio(self, request, obj): def check_contrast_ratio(label1, color1, label2, color2, expected_ratio): ratio = get_contrast_ratio(color1, color2) if ratio < expected_ratio: - message = "'{label1}' ({color1}) en '{label2}' ({color2}) hebben niet genoeg contrast: {ratio}:1 waar {expected}:1 wordt verwacht.".format( - label1=label1, - color1=color1, - label2=label2, - color2=color2, - ratio=round(ratio, 1), - expected=expected_ratio, - ) + message = f"'{label1}' ({color1}) en '{label2}' ({color2}) hebben niet genoeg contrast: {round(ratio, 1)}:1 waar {expected_ratio}:1 wordt verwacht." self.message_user(request, message, messages.WARNING) check_contrast_ratio( diff --git a/src/open_inwoner/configurations/bootstrap/auth.py b/src/open_inwoner/configurations/bootstrap/auth.py index 9ef6b2c22a..d645f73d7a 100644 --- a/src/open_inwoner/configurations/bootstrap/auth.py +++ b/src/open_inwoner/configurations/bootstrap/auth.py @@ -1,15 +1,14 @@ -from django.conf import settings -from django.contrib.admin.sites import AdminSite -from django.contrib.auth.models import Group -from django.core.exceptions import ValidationError -from django.test import RequestFactory - from digid_eherkenning.admin import ( DigidConfigurationAdmin, EherkenningConfigurationAdmin, ) from digid_eherkenning.models import DigidConfiguration, EherkenningConfiguration from digid_eherkenning.oidc.admin import admin_modelform_factory +from django.conf import settings +from django.contrib.admin.sites import AdminSite +from django.contrib.auth.models import Group +from django.core.exceptions import ValidationError +from django.test import RequestFactory from django_jsonform.forms.fields import JSONFormField from django_setup_configuration.config_settings import ConfigSettings from django_setup_configuration.configuration import BaseConfigurationStep diff --git a/src/open_inwoner/configurations/bootstrap/cms.py b/src/open_inwoner/configurations/bootstrap/cms.py index 3c06acdfc8..78022e70f8 100644 --- a/src/open_inwoner/configurations/bootstrap/cms.py +++ b/src/open_inwoner/configurations/bootstrap/cms.py @@ -1,5 +1,4 @@ from django.conf import settings - from django_setup_configuration.config_settings import ConfigSettings from django_setup_configuration.configuration import BaseConfigurationStep @@ -61,8 +60,7 @@ def configure(self): cms_tools.create_apphook_page(self.app_hook, extension_args=extension_args) - def test_configuration(self): - ... + def test_configuration(self): ... class CMSConfigSettings(ConfigSettings): @@ -83,7 +81,6 @@ def __init__( *args, **kwargs, ): - super().__init__( *args, namespace=namespace, diff --git a/src/open_inwoner/configurations/bootstrap/openklant.py b/src/open_inwoner/configurations/bootstrap/openklant.py index a44986bfe4..89b9ab026e 100644 --- a/src/open_inwoner/configurations/bootstrap/openklant.py +++ b/src/open_inwoner/configurations/bootstrap/openklant.py @@ -1,5 +1,4 @@ from django.core.exceptions import ValidationError - from django_setup_configuration.configuration import BaseConfigurationStep from django_setup_configuration.exceptions import ConfigurationRunFailed from django_setup_configuration.fields import DjangoModelRef @@ -13,7 +12,6 @@ class OpenKlant2Configuration(ConfigurationModel): - service_identifier: str = DjangoModelRef(OpenKlant2Config, "service") mijn_vragen_actor: UUID4 = DjangoModelRef(OpenKlant2Config, "mijn_vragen_actor") diff --git a/src/open_inwoner/configurations/bootstrap/siteconfig.py b/src/open_inwoner/configurations/bootstrap/siteconfig.py index 35cf3ea3a3..40dc40203b 100644 --- a/src/open_inwoner/configurations/bootstrap/siteconfig.py +++ b/src/open_inwoner/configurations/bootstrap/siteconfig.py @@ -1,5 +1,4 @@ from django.conf import settings - from django_setup_configuration.config_settings import ConfigSettings from django_setup_configuration.configuration import BaseConfigurationStep from django_setup_configuration.exceptions import ConfigurationRunFailed @@ -150,5 +149,4 @@ def configure(self): form.save() - def test_configuration(self): - ... + def test_configuration(self): ... diff --git a/src/open_inwoner/configurations/bootstrap/zgw.py b/src/open_inwoner/configurations/bootstrap/zgw.py index cb6e06f79d..35a0b7fd8d 100644 --- a/src/open_inwoner/configurations/bootstrap/zgw.py +++ b/src/open_inwoner/configurations/bootstrap/zgw.py @@ -56,7 +56,6 @@ def execute(self, model: OpenZaakConfigurationModel): config = OpenZaakConfig.get_solo() for api_group in model.api_groups: - try: zrc_service = get_service( api_group.zaken_api_identifier, diff --git a/src/open_inwoner/configurations/emails.py b/src/open_inwoner/configurations/emails.py index 0dff80d0df..9a67d9608b 100644 --- a/src/open_inwoner/configurations/emails.py +++ b/src/open_inwoner/configurations/emails.py @@ -2,7 +2,6 @@ from django.db.models import F from django.utils import timezone - from django_yubin.models import Message from mail_editor.helpers import find_template diff --git a/src/open_inwoner/configurations/migrations/0001_initial.py b/src/open_inwoner/configurations/migrations/0001_initial.py index 5eef778bbb..9802b8ae9c 100644 --- a/src/open_inwoner/configurations/migrations/0001_initial.py +++ b/src/open_inwoner/configurations/migrations/0001_initial.py @@ -1,15 +1,13 @@ # Generated by Django 3.2.7 on 2021-11-23 13:03 +import colorfield.fields import django.db.models.deletion +import filer.fields.image from django.conf import settings from django.db import migrations, models -import colorfield.fields -import filer.fields.image - class Migration(migrations.Migration): - initial = True dependencies = [ diff --git a/src/open_inwoner/configurations/migrations/0002_auto_20211215_1410.py b/src/open_inwoner/configurations/migrations/0002_auto_20211215_1410.py index b0d67bf865..857393c7e6 100644 --- a/src/open_inwoner/configurations/migrations/0002_auto_20211215_1410.py +++ b/src/open_inwoner/configurations/migrations/0002_auto_20211215_1410.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0001_initial"), ] diff --git a/src/open_inwoner/configurations/migrations/0002_siteconfiguration_hero_image_login.py b/src/open_inwoner/configurations/migrations/0002_siteconfiguration_hero_image_login.py index 539801477e..aa3f828d3a 100644 --- a/src/open_inwoner/configurations/migrations/0002_siteconfiguration_hero_image_login.py +++ b/src/open_inwoner/configurations/migrations/0002_siteconfiguration_hero_image_login.py @@ -1,13 +1,12 @@ # Generated by Django 3.2.7 on 2021-12-08 13:25 -from django.conf import settings -from django.db import migrations import django.db.models.deletion import filer.fields.image +from django.conf import settings +from django.db import migrations class Migration(migrations.Migration): - dependencies = [ migrations.swappable_dependency(settings.FILER_IMAGE_MODEL), ("configurations", "0001_initial"), diff --git a/src/open_inwoner/configurations/migrations/0003_auto_20211210_1254.py b/src/open_inwoner/configurations/migrations/0003_auto_20211210_1254.py index 4a7fdf38e8..01e1ae99f7 100644 --- a/src/open_inwoner/configurations/migrations/0003_auto_20211210_1254.py +++ b/src/open_inwoner/configurations/migrations/0003_auto_20211210_1254.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0002_siteconfiguration_hero_image_login"), ] diff --git a/src/open_inwoner/configurations/migrations/0004_merge_0002_auto_20211215_1410_0003_auto_20211210_1254.py b/src/open_inwoner/configurations/migrations/0004_merge_0002_auto_20211215_1410_0003_auto_20211210_1254.py index e57629cf58..c368c903db 100644 --- a/src/open_inwoner/configurations/migrations/0004_merge_0002_auto_20211215_1410_0003_auto_20211210_1254.py +++ b/src/open_inwoner/configurations/migrations/0004_merge_0002_auto_20211215_1410_0003_auto_20211210_1254.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0002_auto_20211215_1410"), ("configurations", "0003_auto_20211210_1254"), diff --git a/src/open_inwoner/configurations/migrations/0005_auto_20220110_1042.py b/src/open_inwoner/configurations/migrations/0005_auto_20220110_1042.py index 9d4e710d9e..26ee01c0a8 100644 --- a/src/open_inwoner/configurations/migrations/0005_auto_20220110_1042.py +++ b/src/open_inwoner/configurations/migrations/0005_auto_20220110_1042.py @@ -1,11 +1,10 @@ # Generated by Django 3.2.7 on 2022-01-10 09:42 -from django.db import migrations, models import django.db.models.deletion +from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ("flatpages", "0001_initial"), ( diff --git a/src/open_inwoner/configurations/migrations/0006_auto_20220117_1626.py b/src/open_inwoner/configurations/migrations/0006_auto_20220117_1626.py index 2c3c64b78a..7081ed1c21 100644 --- a/src/open_inwoner/configurations/migrations/0006_auto_20220117_1626.py +++ b/src/open_inwoner/configurations/migrations/0006_auto_20220117_1626.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0005_auto_20220110_1042"), ] diff --git a/src/open_inwoner/configurations/migrations/0007_auto_20220202_1307.py b/src/open_inwoner/configurations/migrations/0007_auto_20220202_1307.py index 9ee15a13a0..f9779213c3 100644 --- a/src/open_inwoner/configurations/migrations/0007_auto_20220202_1307.py +++ b/src/open_inwoner/configurations/migrations/0007_auto_20220202_1307.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0006_auto_20220117_1626"), ] diff --git a/src/open_inwoner/configurations/migrations/0007_auto_20220202_1835.py b/src/open_inwoner/configurations/migrations/0007_auto_20220202_1835.py index 04ddc50036..1e6684929e 100644 --- a/src/open_inwoner/configurations/migrations/0007_auto_20220202_1835.py +++ b/src/open_inwoner/configurations/migrations/0007_auto_20220202_1835.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0006_auto_20220117_1626"), ] diff --git a/src/open_inwoner/configurations/migrations/0008_merge_0007_auto_20220202_1307_0007_auto_20220202_1835.py b/src/open_inwoner/configurations/migrations/0008_merge_0007_auto_20220202_1307_0007_auto_20220202_1835.py index f2b813a4f8..165fbf0079 100644 --- a/src/open_inwoner/configurations/migrations/0008_merge_0007_auto_20220202_1307_0007_auto_20220202_1835.py +++ b/src/open_inwoner/configurations/migrations/0008_merge_0007_auto_20220202_1307_0007_auto_20220202_1835.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0007_auto_20220202_1307"), ("configurations", "0007_auto_20220202_1835"), diff --git a/src/open_inwoner/configurations/migrations/0009_auto_20220215_1428.py b/src/open_inwoner/configurations/migrations/0009_auto_20220215_1428.py index 2fce268278..0180b61d59 100644 --- a/src/open_inwoner/configurations/migrations/0009_auto_20220215_1428.py +++ b/src/open_inwoner/configurations/migrations/0009_auto_20220215_1428.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ( "configurations", diff --git a/src/open_inwoner/configurations/migrations/0009_auto_20220218_1359.py b/src/open_inwoner/configurations/migrations/0009_auto_20220218_1359.py index ec0aedbaed..d6a4685747 100644 --- a/src/open_inwoner/configurations/migrations/0009_auto_20220218_1359.py +++ b/src/open_inwoner/configurations/migrations/0009_auto_20220218_1359.py @@ -1,15 +1,13 @@ # Generated by Django 3.2.12 on 2022-02-18 12:59 +import colorfield.fields import django.db.models.deletion +import filer.fields.image from django.conf import settings from django.db import migrations, models -import colorfield.fields -import filer.fields.image - class Migration(migrations.Migration): - dependencies = [ ("flatpages", "0001_initial"), migrations.swappable_dependency(settings.FILER_IMAGE_MODEL), diff --git a/src/open_inwoner/configurations/migrations/0009_siteconfiguration_show_cases.py b/src/open_inwoner/configurations/migrations/0009_siteconfiguration_show_cases.py index 3a0f6cb2f1..425382ff14 100644 --- a/src/open_inwoner/configurations/migrations/0009_siteconfiguration_show_cases.py +++ b/src/open_inwoner/configurations/migrations/0009_siteconfiguration_show_cases.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ( "configurations", diff --git a/src/open_inwoner/configurations/migrations/0010_merge_0009_auto_20220215_1428_0009_auto_20220218_1359.py b/src/open_inwoner/configurations/migrations/0010_merge_0009_auto_20220215_1428_0009_auto_20220218_1359.py index 193974be29..bef3f0d700 100644 --- a/src/open_inwoner/configurations/migrations/0010_merge_0009_auto_20220215_1428_0009_auto_20220218_1359.py +++ b/src/open_inwoner/configurations/migrations/0010_merge_0009_auto_20220215_1428_0009_auto_20220218_1359.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0009_auto_20220215_1428"), ("configurations", "0009_auto_20220218_1359"), diff --git a/src/open_inwoner/configurations/migrations/0010_merge_20220228_1623.py b/src/open_inwoner/configurations/migrations/0010_merge_20220228_1623.py index 0194403112..a332fd85b5 100644 --- a/src/open_inwoner/configurations/migrations/0010_merge_20220228_1623.py +++ b/src/open_inwoner/configurations/migrations/0010_merge_20220228_1623.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0009_auto_20220218_1359"), ("configurations", "0009_siteconfiguration_show_cases"), diff --git a/src/open_inwoner/configurations/migrations/0011_merge_20220302_1245.py b/src/open_inwoner/configurations/migrations/0011_merge_20220302_1245.py index cc9d3bd4e0..127615216b 100644 --- a/src/open_inwoner/configurations/migrations/0011_merge_20220302_1245.py +++ b/src/open_inwoner/configurations/migrations/0011_merge_20220302_1245.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0009_auto_20220215_1428"), ("configurations", "0010_merge_20220228_1623"), diff --git a/src/open_inwoner/configurations/migrations/0012_merge_20220302_1815.py b/src/open_inwoner/configurations/migrations/0012_merge_20220302_1815.py index c3791a892a..f5df750a78 100644 --- a/src/open_inwoner/configurations/migrations/0012_merge_20220302_1815.py +++ b/src/open_inwoner/configurations/migrations/0012_merge_20220302_1815.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ( "configurations", diff --git a/src/open_inwoner/configurations/migrations/0012_merge_20220303_1128.py b/src/open_inwoner/configurations/migrations/0012_merge_20220303_1128.py index 2c43bdd60a..30f35e67a1 100644 --- a/src/open_inwoner/configurations/migrations/0012_merge_20220303_1128.py +++ b/src/open_inwoner/configurations/migrations/0012_merge_20220303_1128.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ( "configurations", diff --git a/src/open_inwoner/configurations/migrations/0013_merge_20220309_1710.py b/src/open_inwoner/configurations/migrations/0013_merge_20220309_1710.py index 4f6dc3d851..b7e3bc59cf 100644 --- a/src/open_inwoner/configurations/migrations/0013_merge_20220309_1710.py +++ b/src/open_inwoner/configurations/migrations/0013_merge_20220309_1710.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0012_merge_20220302_1815"), ("configurations", "0012_merge_20220303_1128"), diff --git a/src/open_inwoner/configurations/migrations/0013_merge_20220311_1841.py b/src/open_inwoner/configurations/migrations/0013_merge_20220311_1841.py index 6de0196fde..9667a13eb1 100644 --- a/src/open_inwoner/configurations/migrations/0013_merge_20220311_1841.py +++ b/src/open_inwoner/configurations/migrations/0013_merge_20220311_1841.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0012_merge_20220302_1815"), ("configurations", "0012_merge_20220303_1128"), diff --git a/src/open_inwoner/configurations/migrations/0014_merge_20220314_1716.py b/src/open_inwoner/configurations/migrations/0014_merge_20220314_1716.py index 19774ab5b2..6369ec9adc 100644 --- a/src/open_inwoner/configurations/migrations/0014_merge_20220314_1716.py +++ b/src/open_inwoner/configurations/migrations/0014_merge_20220314_1716.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0013_merge_20220309_1710"), ("configurations", "0013_merge_20220311_1841"), diff --git a/src/open_inwoner/configurations/migrations/0015_siteconfiguration_show_product_finder.py b/src/open_inwoner/configurations/migrations/0015_siteconfiguration_show_product_finder.py index 647edb27b9..3e391fc632 100644 --- a/src/open_inwoner/configurations/migrations/0015_siteconfiguration_show_product_finder.py +++ b/src/open_inwoner/configurations/migrations/0015_siteconfiguration_show_product_finder.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0014_merge_20220314_1716"), ] diff --git a/src/open_inwoner/configurations/migrations/0016_alter_siteconfigurationpage_options.py b/src/open_inwoner/configurations/migrations/0016_alter_siteconfigurationpage_options.py index a07437c54a..3b4ccfc4e3 100644 --- a/src/open_inwoner/configurations/migrations/0016_alter_siteconfigurationpage_options.py +++ b/src/open_inwoner/configurations/migrations/0016_alter_siteconfigurationpage_options.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0015_siteconfiguration_show_product_finder"), ] diff --git a/src/open_inwoner/configurations/migrations/0017_auto_20220330_1436.py b/src/open_inwoner/configurations/migrations/0017_auto_20220330_1436.py index a506bec0b9..2058a072a5 100644 --- a/src/open_inwoner/configurations/migrations/0017_auto_20220330_1436.py +++ b/src/open_inwoner/configurations/migrations/0017_auto_20220330_1436.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0016_alter_siteconfigurationpage_options"), ] diff --git a/src/open_inwoner/configurations/migrations/0018_auto_20220629_1504.py b/src/open_inwoner/configurations/migrations/0018_auto_20220629_1504.py index a2a1572a21..a5c5994495 100644 --- a/src/open_inwoner/configurations/migrations/0018_auto_20220629_1504.py +++ b/src/open_inwoner/configurations/migrations/0018_auto_20220629_1504.py @@ -1,13 +1,12 @@ # Generated by Django 3.2.13 on 2022-06-29 13:04 -from django.conf import settings -from django.db import migrations, models import django.db.models.deletion import filer.fields.image +from django.conf import settings +from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ migrations.swappable_dependency(settings.FILER_IMAGE_MODEL), ("configurations", "0017_auto_20220330_1436"), diff --git a/src/open_inwoner/configurations/migrations/0019_auto_20220704_1002.py b/src/open_inwoner/configurations/migrations/0019_auto_20220704_1002.py index 48ffb0f7f7..e8389d7790 100644 --- a/src/open_inwoner/configurations/migrations/0019_auto_20220704_1002.py +++ b/src/open_inwoner/configurations/migrations/0019_auto_20220704_1002.py @@ -1,13 +1,12 @@ # Generated by Django 3.2.13 on 2022-07-04 08:02 -from django.conf import settings -from django.db import migrations, models import django.db.models.deletion import filer.fields.image +from django.conf import settings +from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ migrations.swappable_dependency(settings.FILER_IMAGE_MODEL), ("configurations", "0018_auto_20220629_1504"), diff --git a/src/open_inwoner/configurations/migrations/0020_siteconfiguration_login_show.py b/src/open_inwoner/configurations/migrations/0020_siteconfiguration_login_show.py index bb7b0ee17d..c0cce450bd 100644 --- a/src/open_inwoner/configurations/migrations/0020_siteconfiguration_login_show.py +++ b/src/open_inwoner/configurations/migrations/0020_siteconfiguration_login_show.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0019_auto_20220704_1002"), ] diff --git a/src/open_inwoner/configurations/migrations/0021_siteconfiguration_more_titles.py b/src/open_inwoner/configurations/migrations/0021_siteconfiguration_more_titles.py index e01b5de86f..ac07112539 100644 --- a/src/open_inwoner/configurations/migrations/0021_siteconfiguration_more_titles.py +++ b/src/open_inwoner/configurations/migrations/0021_siteconfiguration_more_titles.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0020_siteconfiguration_login_show"), ] diff --git a/src/open_inwoner/configurations/migrations/0022_siteconfiguration_more_text.py b/src/open_inwoner/configurations/migrations/0022_siteconfiguration_more_text.py index e06028494c..92b41f7052 100644 --- a/src/open_inwoner/configurations/migrations/0022_siteconfiguration_more_text.py +++ b/src/open_inwoner/configurations/migrations/0022_siteconfiguration_more_text.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0021_siteconfiguration_more_titles"), ] diff --git a/src/open_inwoner/configurations/migrations/0023_rename_home_questionnaire_subtitle_siteconfiguration_home_questionnaire_intro.py b/src/open_inwoner/configurations/migrations/0023_rename_home_questionnaire_subtitle_siteconfiguration_home_questionnaire_intro.py index 80750db48d..cc097411bd 100644 --- a/src/open_inwoner/configurations/migrations/0023_rename_home_questionnaire_subtitle_siteconfiguration_home_questionnaire_intro.py +++ b/src/open_inwoner/configurations/migrations/0023_rename_home_questionnaire_subtitle_siteconfiguration_home_questionnaire_intro.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0022_siteconfiguration_more_text"), ] diff --git a/src/open_inwoner/configurations/migrations/0024_alter_siteconfiguration_home_questionnaire_intro.py b/src/open_inwoner/configurations/migrations/0024_alter_siteconfiguration_home_questionnaire_intro.py index 46322d989a..41fb646079 100644 --- a/src/open_inwoner/configurations/migrations/0024_alter_siteconfiguration_home_questionnaire_intro.py +++ b/src/open_inwoner/configurations/migrations/0024_alter_siteconfiguration_home_questionnaire_intro.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ( "configurations", diff --git a/src/open_inwoner/configurations/migrations/0025_rename_select_questionnaire_subtitle_siteconfiguration_select_questionnaire_intro.py b/src/open_inwoner/configurations/migrations/0025_rename_select_questionnaire_subtitle_siteconfiguration_select_questionnaire_intro.py index 82101698cc..3037e0e91b 100644 --- a/src/open_inwoner/configurations/migrations/0025_rename_select_questionnaire_subtitle_siteconfiguration_select_questionnaire_intro.py +++ b/src/open_inwoner/configurations/migrations/0025_rename_select_questionnaire_subtitle_siteconfiguration_select_questionnaire_intro.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0024_alter_siteconfiguration_home_questionnaire_intro"), ] diff --git a/src/open_inwoner/configurations/migrations/0026_alter_siteconfiguration_select_questionnaire_intro.py b/src/open_inwoner/configurations/migrations/0026_alter_siteconfiguration_select_questionnaire_intro.py index 7968cd795a..fe1d163d68 100644 --- a/src/open_inwoner/configurations/migrations/0026_alter_siteconfiguration_select_questionnaire_intro.py +++ b/src/open_inwoner/configurations/migrations/0026_alter_siteconfiguration_select_questionnaire_intro.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ( "configurations", diff --git a/src/open_inwoner/configurations/migrations/0027_siteconfiguration_show_plans.py b/src/open_inwoner/configurations/migrations/0027_siteconfiguration_show_plans.py index 4f54ac3674..117d851274 100644 --- a/src/open_inwoner/configurations/migrations/0027_siteconfiguration_show_plans.py +++ b/src/open_inwoner/configurations/migrations/0027_siteconfiguration_show_plans.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0026_alter_siteconfiguration_select_questionnaire_intro"), ] diff --git a/src/open_inwoner/configurations/migrations/0028_siteconfiguration_show_actions.py b/src/open_inwoner/configurations/migrations/0028_siteconfiguration_show_actions.py index f4457973f4..60dab10c62 100644 --- a/src/open_inwoner/configurations/migrations/0028_siteconfiguration_show_actions.py +++ b/src/open_inwoner/configurations/migrations/0028_siteconfiguration_show_actions.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0027_siteconfiguration_show_plans"), ] diff --git a/src/open_inwoner/configurations/migrations/0029_auto_20221221_1636.py b/src/open_inwoner/configurations/migrations/0029_auto_20221221_1636.py index 1cd2d88217..eafd37993c 100644 --- a/src/open_inwoner/configurations/migrations/0029_auto_20221221_1636.py +++ b/src/open_inwoner/configurations/migrations/0029_auto_20221221_1636.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0028_siteconfiguration_show_actions"), ] diff --git a/src/open_inwoner/configurations/migrations/0030_auto_20230120_1331.py b/src/open_inwoner/configurations/migrations/0030_auto_20230120_1331.py index 28cb24683a..272b93fc5f 100644 --- a/src/open_inwoner/configurations/migrations/0030_auto_20230120_1331.py +++ b/src/open_inwoner/configurations/migrations/0030_auto_20230120_1331.py @@ -1,13 +1,12 @@ # Generated by Django 3.2.15 on 2023-01-20 12:31 -from django.conf import settings -from django.db import migrations, models import django.db.models.deletion import filer.fields.image +from django.conf import settings +from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ migrations.swappable_dependency(settings.FILER_IMAGE_MODEL), ("configurations", "0029_auto_20221221_1636"), diff --git a/src/open_inwoner/configurations/migrations/0031_siteconfiguration_siteimprove_id.py b/src/open_inwoner/configurations/migrations/0031_siteconfiguration_siteimprove_id.py index 1f4ecc04a0..1fa0dfb93c 100644 --- a/src/open_inwoner/configurations/migrations/0031_siteconfiguration_siteimprove_id.py +++ b/src/open_inwoner/configurations/migrations/0031_siteconfiguration_siteimprove_id.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0030_auto_20230120_1331"), ] diff --git a/src/open_inwoner/configurations/migrations/0032_siteconfiguration_favicon.py b/src/open_inwoner/configurations/migrations/0032_siteconfiguration_favicon.py index 744890c099..2fed312ab1 100644 --- a/src/open_inwoner/configurations/migrations/0032_siteconfiguration_favicon.py +++ b/src/open_inwoner/configurations/migrations/0032_siteconfiguration_favicon.py @@ -1,16 +1,14 @@ # Generated by Django 3.2.15 on 2023-02-07 11:43 import django.db.models.deletion +import filer.fields.image from django.conf import settings from django.db import migrations -import filer.fields.image - import open_inwoner.utils.validators class Migration(migrations.Migration): - dependencies = [ migrations.swappable_dependency(settings.FILER_IMAGE_MODEL), ("configurations", "0031_siteconfiguration_siteimprove_id"), diff --git a/src/open_inwoner/configurations/migrations/0033_alter_siteconfiguration_favicon.py b/src/open_inwoner/configurations/migrations/0033_alter_siteconfiguration_favicon.py index 75c6d4faa9..2e5354dd2b 100644 --- a/src/open_inwoner/configurations/migrations/0033_alter_siteconfiguration_favicon.py +++ b/src/open_inwoner/configurations/migrations/0033_alter_siteconfiguration_favicon.py @@ -1,16 +1,14 @@ # Generated by Django 3.2.15 on 2023-02-15 22:58 import django.db.models.deletion +import filer.fields.image from django.conf import settings from django.db import migrations -import filer.fields.image - import open_inwoner.utils.validators class Migration(migrations.Migration): - dependencies = [ migrations.swappable_dependency(settings.FILER_IMAGE_MODEL), ("configurations", "0032_siteconfiguration_favicon"), diff --git a/src/open_inwoner/configurations/migrations/0034_siteconfiguration_footer_visiting_phonenumber.py b/src/open_inwoner/configurations/migrations/0034_siteconfiguration_footer_visiting_phonenumber.py index 0b24170dbf..0d33130ff4 100644 --- a/src/open_inwoner/configurations/migrations/0034_siteconfiguration_footer_visiting_phonenumber.py +++ b/src/open_inwoner/configurations/migrations/0034_siteconfiguration_footer_visiting_phonenumber.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0033_alter_siteconfiguration_favicon"), ] diff --git a/src/open_inwoner/configurations/migrations/0034_siteconfiguration_plans_banner.py b/src/open_inwoner/configurations/migrations/0034_siteconfiguration_plans_banner.py index deaae445b2..a8506cbcff 100644 --- a/src/open_inwoner/configurations/migrations/0034_siteconfiguration_plans_banner.py +++ b/src/open_inwoner/configurations/migrations/0034_siteconfiguration_plans_banner.py @@ -1,13 +1,12 @@ # Generated by Django 3.2.15 on 2023-03-01 07:45 -from django.conf import settings -from django.db import migrations import django.db.models.deletion import filer.fields.image +from django.conf import settings +from django.db import migrations class Migration(migrations.Migration): - dependencies = [ migrations.swappable_dependency(settings.FILER_IMAGE_MODEL), ("configurations", "0033_alter_siteconfiguration_favicon"), diff --git a/src/open_inwoner/configurations/migrations/0035_alter_siteconfiguration_footer_visiting_phonenumber.py b/src/open_inwoner/configurations/migrations/0035_alter_siteconfiguration_footer_visiting_phonenumber.py index 7afd5ca354..485c73c642 100644 --- a/src/open_inwoner/configurations/migrations/0035_alter_siteconfiguration_footer_visiting_phonenumber.py +++ b/src/open_inwoner/configurations/migrations/0035_alter_siteconfiguration_footer_visiting_phonenumber.py @@ -1,11 +1,11 @@ # Generated by Django 3.2.15 on 2023-02-24 16:58 from django.db import migrations, models + import open_inwoner.utils.validators class Migration(migrations.Migration): - dependencies = [ ("configurations", "0034_siteconfiguration_footer_visiting_phonenumber"), ] diff --git a/src/open_inwoner/configurations/migrations/0036_merge_20230303_1004.py b/src/open_inwoner/configurations/migrations/0036_merge_20230303_1004.py index 8ff19dcffc..15c2e18e65 100644 --- a/src/open_inwoner/configurations/migrations/0036_merge_20230303_1004.py +++ b/src/open_inwoner/configurations/migrations/0036_merge_20230303_1004.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0034_siteconfiguration_plans_banner"), ("configurations", "0035_alter_siteconfiguration_footer_visiting_phonenumber"), diff --git a/src/open_inwoner/configurations/migrations/0037_auto_20230403_1301.py b/src/open_inwoner/configurations/migrations/0037_auto_20230403_1301.py index c66fb050db..562d1c2c84 100644 --- a/src/open_inwoner/configurations/migrations/0037_auto_20230403_1301.py +++ b/src/open_inwoner/configurations/migrations/0037_auto_20230403_1301.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0036_merge_20230303_1004"), ] diff --git a/src/open_inwoner/configurations/migrations/0038_auto_20230404_1745.py b/src/open_inwoner/configurations/migrations/0038_auto_20230404_1745.py index ca47510141..69f3215a88 100644 --- a/src/open_inwoner/configurations/migrations/0038_auto_20230404_1745.py +++ b/src/open_inwoner/configurations/migrations/0038_auto_20230404_1745.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0037_auto_20230403_1301"), ] diff --git a/src/open_inwoner/configurations/migrations/0039_alter_siteconfiguration_hero_image_login.py b/src/open_inwoner/configurations/migrations/0039_alter_siteconfiguration_hero_image_login.py index a88bf0f9b4..c81508e046 100644 --- a/src/open_inwoner/configurations/migrations/0039_alter_siteconfiguration_hero_image_login.py +++ b/src/open_inwoner/configurations/migrations/0039_alter_siteconfiguration_hero_image_login.py @@ -1,13 +1,12 @@ # Generated by Django 3.2.15 on 2023-04-20 13:11 -from django.conf import settings -from django.db import migrations import django.db.models.deletion import filer.fields.image +from django.conf import settings +from django.db import migrations class Migration(migrations.Migration): - dependencies = [ migrations.swappable_dependency(settings.FILER_IMAGE_MODEL), ("configurations", "0038_auto_20230404_1745"), diff --git a/src/open_inwoner/configurations/migrations/0040_auto_20230503_1417.py b/src/open_inwoner/configurations/migrations/0040_auto_20230503_1417.py index d084b265e8..830754d864 100644 --- a/src/open_inwoner/configurations/migrations/0040_auto_20230503_1417.py +++ b/src/open_inwoner/configurations/migrations/0040_auto_20230503_1417.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0039_alter_siteconfiguration_hero_image_login"), ] diff --git a/src/open_inwoner/configurations/migrations/0044_siteconfiguration_openid_display.py b/src/open_inwoner/configurations/migrations/0044_siteconfiguration_openid_display.py index 9d8a45dd6a..703af0f510 100644 --- a/src/open_inwoner/configurations/migrations/0044_siteconfiguration_openid_display.py +++ b/src/open_inwoner/configurations/migrations/0044_siteconfiguration_openid_display.py @@ -1,11 +1,11 @@ # Generated by Django 3.2.15 on 2023-06-20 07:32 from django.db import migrations, models + import open_inwoner.configurations.validators class Migration(migrations.Migration): - dependencies = [ ("configurations", "0043_siteconfiguration_allow_messages_file_sharing"), ] diff --git a/src/open_inwoner/configurations/migrations/0046_siteconfiguration_cookie_consent.py b/src/open_inwoner/configurations/migrations/0046_siteconfiguration_cookie_consent.py index ec6da4c68b..30aa91b549 100644 --- a/src/open_inwoner/configurations/migrations/0046_siteconfiguration_cookie_consent.py +++ b/src/open_inwoner/configurations/migrations/0046_siteconfiguration_cookie_consent.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0045_alter_siteconfiguration_footer_visiting_phonenumber"), ] diff --git a/src/open_inwoner/configurations/migrations/0047_siteconfiguration_hide_categories_from_anonymous_users.py b/src/open_inwoner/configurations/migrations/0047_siteconfiguration_hide_categories_from_anonymous_users.py index 37382b1441..5648fef37d 100644 --- a/src/open_inwoner/configurations/migrations/0047_siteconfiguration_hide_categories_from_anonymous_users.py +++ b/src/open_inwoner/configurations/migrations/0047_siteconfiguration_hide_categories_from_anonymous_users.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0046_siteconfiguration_cookie_consent"), ] diff --git a/src/open_inwoner/configurations/migrations/0048_auto_20230816_1255.py b/src/open_inwoner/configurations/migrations/0048_auto_20230816_1255.py index cd8e61c0d0..941ad37454 100644 --- a/src/open_inwoner/configurations/migrations/0048_auto_20230816_1255.py +++ b/src/open_inwoner/configurations/migrations/0048_auto_20230816_1255.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ( "configurations", diff --git a/src/open_inwoner/configurations/migrations/0049_auto_20230821_1523.py b/src/open_inwoner/configurations/migrations/0049_auto_20230821_1523.py index 883405c32d..e06912fc22 100644 --- a/src/open_inwoner/configurations/migrations/0049_auto_20230821_1523.py +++ b/src/open_inwoner/configurations/migrations/0049_auto_20230821_1523.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0048_auto_20230816_1255"), ] diff --git a/src/open_inwoner/configurations/migrations/0049_siteconfiguration_extra_css.py b/src/open_inwoner/configurations/migrations/0049_siteconfiguration_extra_css.py index d5d69efafd..d43b7c1cc5 100644 --- a/src/open_inwoner/configurations/migrations/0049_siteconfiguration_extra_css.py +++ b/src/open_inwoner/configurations/migrations/0049_siteconfiguration_extra_css.py @@ -6,7 +6,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0048_auto_20230816_1255"), ] diff --git a/src/open_inwoner/configurations/migrations/0050_siteconfig_warning_banner.py b/src/open_inwoner/configurations/migrations/0050_siteconfig_warning_banner.py index 4dfa049550..2705b5c3b7 100644 --- a/src/open_inwoner/configurations/migrations/0050_siteconfig_warning_banner.py +++ b/src/open_inwoner/configurations/migrations/0050_siteconfig_warning_banner.py @@ -1,12 +1,10 @@ # Generated by Django 3.2.15 on 2023-08-09 06:33 -from django.db import migrations, models - import colorfield.fields +from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ("configurations", "0049_siteconfiguration_extra_css"), ] diff --git a/src/open_inwoner/configurations/migrations/0051_merge_20230907_1800.py b/src/open_inwoner/configurations/migrations/0051_merge_20230907_1800.py index 6beec22d77..ae7c939046 100644 --- a/src/open_inwoner/configurations/migrations/0051_merge_20230907_1800.py +++ b/src/open_inwoner/configurations/migrations/0051_merge_20230907_1800.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0049_auto_20230821_1523"), ("configurations", "0050_siteconfig_warning_banner"), diff --git a/src/open_inwoner/configurations/migrations/0052_siteconfiguration_registration_text.py b/src/open_inwoner/configurations/migrations/0052_siteconfiguration_registration_text.py index 77b86fa39b..08a1e045fa 100644 --- a/src/open_inwoner/configurations/migrations/0052_siteconfiguration_registration_text.py +++ b/src/open_inwoner/configurations/migrations/0052_siteconfiguration_registration_text.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0051_merge_20230907_1800"), ] diff --git a/src/open_inwoner/configurations/migrations/0052_siteconfiguration_search_filters.py b/src/open_inwoner/configurations/migrations/0052_siteconfiguration_search_filters.py index 92b460ace0..f721d70ecf 100644 --- a/src/open_inwoner/configurations/migrations/0052_siteconfiguration_search_filters.py +++ b/src/open_inwoner/configurations/migrations/0052_siteconfiguration_search_filters.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0051_merge_20230907_1800"), ] diff --git a/src/open_inwoner/configurations/migrations/0053_merge_20230928_1457.py b/src/open_inwoner/configurations/migrations/0053_merge_20230928_1457.py index a7b763a322..e55f913ba9 100644 --- a/src/open_inwoner/configurations/migrations/0053_merge_20230928_1457.py +++ b/src/open_inwoner/configurations/migrations/0053_merge_20230928_1457.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0052_siteconfiguration_registration_text"), ("configurations", "0052_siteconfiguration_search_filters"), diff --git a/src/open_inwoner/configurations/migrations/0054_siteconfiguration_display_social.py b/src/open_inwoner/configurations/migrations/0054_siteconfiguration_display_social.py index 3b730857b3..194d141763 100644 --- a/src/open_inwoner/configurations/migrations/0054_siteconfiguration_display_social.py +++ b/src/open_inwoner/configurations/migrations/0054_siteconfiguration_display_social.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0053_merge_20230928_1457"), ] diff --git a/src/open_inwoner/configurations/migrations/0055_siteconfiguration_eherkenning_enabled.py b/src/open_inwoner/configurations/migrations/0055_siteconfiguration_eherkenning_enabled.py index a27631cbeb..7df309a316 100644 --- a/src/open_inwoner/configurations/migrations/0055_siteconfiguration_eherkenning_enabled.py +++ b/src/open_inwoner/configurations/migrations/0055_siteconfiguration_eherkenning_enabled.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0054_siteconfiguration_display_social"), ] diff --git a/src/open_inwoner/configurations/migrations/0056_alter_siteconfiguration_eherkenning_enabled.py b/src/open_inwoner/configurations/migrations/0056_alter_siteconfiguration_eherkenning_enabled.py index 8c5c95e0d9..938737821b 100644 --- a/src/open_inwoner/configurations/migrations/0056_alter_siteconfiguration_eherkenning_enabled.py +++ b/src/open_inwoner/configurations/migrations/0056_alter_siteconfiguration_eherkenning_enabled.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0055_siteconfiguration_eherkenning_enabled"), ] diff --git a/src/open_inwoner/configurations/migrations/0057_siteconfiguration_theme_stylesheet.py b/src/open_inwoner/configurations/migrations/0057_siteconfiguration_theme_stylesheet.py index b064f67006..e477219211 100644 --- a/src/open_inwoner/configurations/migrations/0057_siteconfiguration_theme_stylesheet.py +++ b/src/open_inwoner/configurations/migrations/0057_siteconfiguration_theme_stylesheet.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0056_alter_siteconfiguration_eherkenning_enabled"), ] diff --git a/src/open_inwoner/configurations/migrations/0058_customfontset.py b/src/open_inwoner/configurations/migrations/0058_customfontset.py index 38d2fb5b5a..2782d157bd 100644 --- a/src/open_inwoner/configurations/migrations/0058_customfontset.py +++ b/src/open_inwoner/configurations/migrations/0058_customfontset.py @@ -9,7 +9,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0057_siteconfiguration_theme_stylesheet"), ] diff --git a/src/open_inwoner/configurations/migrations/0058_siteconfiguration_recipients_email_digest.py b/src/open_inwoner/configurations/migrations/0058_siteconfiguration_recipients_email_digest.py index a7a78cc94d..1f2acdfb7a 100644 --- a/src/open_inwoner/configurations/migrations/0058_siteconfiguration_recipients_email_digest.py +++ b/src/open_inwoner/configurations/migrations/0058_siteconfiguration_recipients_email_digest.py @@ -1,11 +1,10 @@ # Generated by Django 3.2.23 on 2024-01-22 10:18 -from django.db import migrations, models import django_jsonform.models.fields +from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ("configurations", "0057_siteconfiguration_theme_stylesheet"), ] diff --git a/src/open_inwoner/configurations/migrations/0059_alter_siteconfigurationpage_options.py b/src/open_inwoner/configurations/migrations/0059_alter_siteconfigurationpage_options.py index bcb27f5632..532dee7f02 100644 --- a/src/open_inwoner/configurations/migrations/0059_alter_siteconfigurationpage_options.py +++ b/src/open_inwoner/configurations/migrations/0059_alter_siteconfigurationpage_options.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0058_siteconfiguration_recipients_email_digest"), ] diff --git a/src/open_inwoner/configurations/migrations/0059_merge_20240129_1645.py b/src/open_inwoner/configurations/migrations/0059_merge_20240129_1645.py index 8b218577e5..8f2340a6fe 100644 --- a/src/open_inwoner/configurations/migrations/0059_merge_20240129_1645.py +++ b/src/open_inwoner/configurations/migrations/0059_merge_20240129_1645.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0058_customfontset"), ("configurations", "0058_siteconfiguration_recipients_email_digest"), diff --git a/src/open_inwoner/configurations/migrations/0059_siteconfiguration_email_logo.py b/src/open_inwoner/configurations/migrations/0059_siteconfiguration_email_logo.py index 97224531d1..192eb20bea 100644 --- a/src/open_inwoner/configurations/migrations/0059_siteconfiguration_email_logo.py +++ b/src/open_inwoner/configurations/migrations/0059_siteconfiguration_email_logo.py @@ -1,14 +1,12 @@ # Generated by Django 3.2.23 on 2024-02-13 08:43 import django.db.models.deletion +import filer.fields.image from django.conf import settings from django.db import migrations -import filer.fields.image - class Migration(migrations.Migration): - dependencies = [ migrations.swappable_dependency(settings.FILER_IMAGE_MODEL), ("configurations", "0058_siteconfiguration_recipients_email_digest"), diff --git a/src/open_inwoner/configurations/migrations/0060_auto_20240208_1426.py b/src/open_inwoner/configurations/migrations/0060_auto_20240208_1426.py index 84a77b28a2..6255156f82 100644 --- a/src/open_inwoner/configurations/migrations/0060_auto_20240208_1426.py +++ b/src/open_inwoner/configurations/migrations/0060_auto_20240208_1426.py @@ -8,7 +8,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0059_merge_20240129_1645"), ] diff --git a/src/open_inwoner/configurations/migrations/0061_merge_20240214_1308.py b/src/open_inwoner/configurations/migrations/0061_merge_20240214_1308.py index 8559d22306..58f0c67b39 100644 --- a/src/open_inwoner/configurations/migrations/0061_merge_20240214_1308.py +++ b/src/open_inwoner/configurations/migrations/0061_merge_20240214_1308.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0059_siteconfiguration_email_logo"), ("configurations", "0060_auto_20240208_1426"), diff --git a/src/open_inwoner/configurations/migrations/0062_merge_20240214_1644.py b/src/open_inwoner/configurations/migrations/0062_merge_20240214_1644.py index 2a29fd124d..440a2c2c1e 100644 --- a/src/open_inwoner/configurations/migrations/0062_merge_20240214_1644.py +++ b/src/open_inwoner/configurations/migrations/0062_merge_20240214_1644.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0059_alter_siteconfigurationpage_options"), ("configurations", "0061_merge_20240214_1308"), diff --git a/src/open_inwoner/configurations/migrations/0062_merge_20240215_1501.py b/src/open_inwoner/configurations/migrations/0062_merge_20240215_1501.py index 9843b5f8ca..29879afba0 100644 --- a/src/open_inwoner/configurations/migrations/0062_merge_20240215_1501.py +++ b/src/open_inwoner/configurations/migrations/0062_merge_20240215_1501.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0059_alter_siteconfigurationpage_options"), ("configurations", "0061_merge_20240214_1308"), diff --git a/src/open_inwoner/configurations/migrations/0063_merge_20240216_1622.py b/src/open_inwoner/configurations/migrations/0063_merge_20240216_1622.py index cb0bf43e98..ba5659317e 100644 --- a/src/open_inwoner/configurations/migrations/0063_merge_20240216_1622.py +++ b/src/open_inwoner/configurations/migrations/0063_merge_20240216_1622.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0062_merge_20240214_1644"), ("configurations", "0062_merge_20240215_1501"), diff --git a/src/open_inwoner/configurations/migrations/0064_auto_20240304_1200.py b/src/open_inwoner/configurations/migrations/0064_auto_20240304_1200.py index 20001a8394..b613a82bac 100644 --- a/src/open_inwoner/configurations/migrations/0064_auto_20240304_1200.py +++ b/src/open_inwoner/configurations/migrations/0064_auto_20240304_1200.py @@ -6,7 +6,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0063_merge_20240216_1622"), ] diff --git a/src/open_inwoner/configurations/migrations/0065_siteconfiguration_email_verification_required.py b/src/open_inwoner/configurations/migrations/0065_siteconfiguration_email_verification_required.py index 6d9c1e3742..9c07c83250 100644 --- a/src/open_inwoner/configurations/migrations/0065_siteconfiguration_email_verification_required.py +++ b/src/open_inwoner/configurations/migrations/0065_siteconfiguration_email_verification_required.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0064_auto_20240304_1200"), ] diff --git a/src/open_inwoner/configurations/migrations/0065_siteconfiguration_kcm_survey_link_text_and_more.py b/src/open_inwoner/configurations/migrations/0065_siteconfiguration_kcm_survey_link_text_and_more.py index 351f312329..e0e2830ebc 100644 --- a/src/open_inwoner/configurations/migrations/0065_siteconfiguration_kcm_survey_link_text_and_more.py +++ b/src/open_inwoner/configurations/migrations/0065_siteconfiguration_kcm_survey_link_text_and_more.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0064_auto_20240304_1200"), ] diff --git a/src/open_inwoner/configurations/migrations/0066_merge_20240405_1100.py b/src/open_inwoner/configurations/migrations/0066_merge_20240405_1100.py index 9661c3b168..551c418ee8 100644 --- a/src/open_inwoner/configurations/migrations/0066_merge_20240405_1100.py +++ b/src/open_inwoner/configurations/migrations/0066_merge_20240405_1100.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0065_siteconfiguration_email_verification_required"), ("configurations", "0065_siteconfiguration_kcm_survey_link_text_and_more"), diff --git a/src/open_inwoner/configurations/migrations/0067_alter_siteconfiguration_warning_banner_text.py b/src/open_inwoner/configurations/migrations/0067_alter_siteconfiguration_warning_banner_text.py index 8c57e9223b..8533a3ff2a 100644 --- a/src/open_inwoner/configurations/migrations/0067_alter_siteconfiguration_warning_banner_text.py +++ b/src/open_inwoner/configurations/migrations/0067_alter_siteconfiguration_warning_banner_text.py @@ -1,12 +1,10 @@ # Generated by Django 4.2.11 on 2024-05-15 14:44 -from django.db import migrations - import ckeditor.fields +from django.db import migrations class Migration(migrations.Migration): - dependencies = [ ("configurations", "0066_merge_20240405_1100"), ] diff --git a/src/open_inwoner/configurations/migrations/0068_change_siteconfiguration_notifications.py b/src/open_inwoner/configurations/migrations/0068_change_siteconfiguration_notifications.py index 1cccb18cbe..b543afddf5 100644 --- a/src/open_inwoner/configurations/migrations/0068_change_siteconfiguration_notifications.py +++ b/src/open_inwoner/configurations/migrations/0068_change_siteconfiguration_notifications.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0067_alter_siteconfiguration_warning_banner_text"), ] diff --git a/src/open_inwoner/configurations/migrations/0068_siteconfiguration_contactmoment_contact_form.py b/src/open_inwoner/configurations/migrations/0068_siteconfiguration_contactmoment_contact_form.py index 0630cc9f9b..6b1711f4ec 100644 --- a/src/open_inwoner/configurations/migrations/0068_siteconfiguration_contactmoment_contact_form.py +++ b/src/open_inwoner/configurations/migrations/0068_siteconfiguration_contactmoment_contact_form.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0067_alter_siteconfiguration_warning_banner_text"), ] diff --git a/src/open_inwoner/configurations/migrations/0069_merge_20240724_0945.py b/src/open_inwoner/configurations/migrations/0069_merge_20240724_0945.py index ad1ac7a03b..734a855970 100644 --- a/src/open_inwoner/configurations/migrations/0069_merge_20240724_0945.py +++ b/src/open_inwoner/configurations/migrations/0069_merge_20240724_0945.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0068_change_siteconfiguration_notifications"), ("configurations", "0068_siteconfiguration_contactmoment_contact_form"), diff --git a/src/open_inwoner/configurations/migrations/0070_siteconfiguration_enable_notification_channels.py b/src/open_inwoner/configurations/migrations/0070_siteconfiguration_enable_notification_channels.py index 187dfb0c75..02c0b841bd 100644 --- a/src/open_inwoner/configurations/migrations/0070_siteconfiguration_enable_notification_channels.py +++ b/src/open_inwoner/configurations/migrations/0070_siteconfiguration_enable_notification_channels.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0069_merge_20240724_0945"), ] diff --git a/src/open_inwoner/configurations/migrations/0071_correct_siteconfiguration.py b/src/open_inwoner/configurations/migrations/0071_correct_siteconfiguration.py index e7b10377f9..60ac7e564a 100644 --- a/src/open_inwoner/configurations/migrations/0071_correct_siteconfiguration.py +++ b/src/open_inwoner/configurations/migrations/0071_correct_siteconfiguration.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0070_siteconfiguration_enable_notification_channels"), ] diff --git a/src/open_inwoner/configurations/migrations/0072_alter_siteconfiguration_notifications_actions_enabled_and_more.py b/src/open_inwoner/configurations/migrations/0072_alter_siteconfiguration_notifications_actions_enabled_and_more.py index deacfb7695..d62a4d046c 100644 --- a/src/open_inwoner/configurations/migrations/0072_alter_siteconfiguration_notifications_actions_enabled_and_more.py +++ b/src/open_inwoner/configurations/migrations/0072_alter_siteconfiguration_notifications_actions_enabled_and_more.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("configurations", "0071_correct_siteconfiguration"), ] diff --git a/src/open_inwoner/configurations/migrations/0073_alter_siteconfiguration_notifications_actions_enabled.py b/src/open_inwoner/configurations/migrations/0073_alter_siteconfiguration_notifications_actions_enabled.py index 1353de83ef..6054f3e536 100644 --- a/src/open_inwoner/configurations/migrations/0073_alter_siteconfiguration_notifications_actions_enabled.py +++ b/src/open_inwoner/configurations/migrations/0073_alter_siteconfiguration_notifications_actions_enabled.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ( "configurations", diff --git a/src/open_inwoner/configurations/migrations/0074_alter_siteconfiguration_accent_color_and_more.py b/src/open_inwoner/configurations/migrations/0074_alter_siteconfiguration_accent_color_and_more.py index 1941c31147..521b000a19 100644 --- a/src/open_inwoner/configurations/migrations/0074_alter_siteconfiguration_accent_color_and_more.py +++ b/src/open_inwoner/configurations/migrations/0074_alter_siteconfiguration_accent_color_and_more.py @@ -1,12 +1,10 @@ # Generated by Django 4.2.15 on 2024-08-29 09:57 -from django.db import migrations, models - import colorfield.fields +from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ("flatpages", "0001_initial"), ( diff --git a/src/open_inwoner/configurations/models.py b/src/open_inwoner/configurations/models.py index a9aa419eaa..eacc223f50 100644 --- a/src/open_inwoner/configurations/models.py +++ b/src/open_inwoner/configurations/models.py @@ -1,5 +1,7 @@ import os +import ckeditor.fields as ckeditor_fields +from colorfield.fields import ColorField from django.conf import settings from django.contrib.flatpages.models import FlatPage from django.core.validators import FileExtensionValidator @@ -7,9 +9,6 @@ from django.db.models.signals import post_save from django.dispatch import receiver from django.utils.translation import gettext_lazy as _ - -import ckeditor.fields as ckeditor_fields -from colorfield.fields import ColorField from django_jsonform.models.fields import ArrayField from filer.fields.image import FilerImageField from ordered_model.models import OrderedModel, OrderedModelManager @@ -703,7 +702,7 @@ class CustomFontSet(models.Model): def update_filename(self, filename: str, new_name: str, path: str) -> str: ext = filename.split(".")[1] filename = f"{new_name}.{ext}" - return "{path}/{filename}".format(path=path, filename=filename) + return f"{path}/{filename}" def update_filename_body(self, filename: str) -> str: return CustomFontSet.update_filename( diff --git a/src/open_inwoner/configurations/tests/bootstrap/_test_setup_auth_config.py b/src/open_inwoner/configurations/tests/bootstrap/_test_setup_auth_config.py index 6e501a8599..2e43416ecd 100644 --- a/src/open_inwoner/configurations/tests/bootstrap/_test_setup_auth_config.py +++ b/src/open_inwoner/configurations/tests/bootstrap/_test_setup_auth_config.py @@ -3,9 +3,6 @@ from unittest import skip from uuid import UUID -from django.conf import settings -from django.test import TestCase, override_settings - import requests import requests_mock from digid_eherkenning.choices import ( @@ -15,6 +12,8 @@ XMLContentTypes, ) from digid_eherkenning.models import DigidConfiguration, EherkenningConfiguration +from django.conf import settings +from django.test import TestCase, override_settings from django_setup_configuration.exceptions import ConfigurationRunFailed from mozilla_django_oidc_db.models import ( OpenIDConnectConfig, diff --git a/src/open_inwoner/configurations/tests/bootstrap/_test_setup_cms.py b/src/open_inwoner/configurations/tests/bootstrap/_test_setup_cms.py index 7812088e27..0e9bd00fbe 100644 --- a/src/open_inwoner/configurations/tests/bootstrap/_test_setup_cms.py +++ b/src/open_inwoner/configurations/tests/bootstrap/_test_setup_cms.py @@ -1,6 +1,5 @@ -from django.test import TestCase, override_settings - from cms.models import Page +from django.test import TestCase, override_settings from open_inwoner.cms.profile.cms_apps import ProfileConfig from open_inwoner.cms.utils.page_display import ( diff --git a/src/open_inwoner/configurations/tests/bootstrap/_test_setup_configuration.py b/src/open_inwoner/configurations/tests/bootstrap/_test_setup_configuration.py index d0b3f19e39..8766275ae3 100644 --- a/src/open_inwoner/configurations/tests/bootstrap/_test_setup_configuration.py +++ b/src/open_inwoner/configurations/tests/bootstrap/_test_setup_configuration.py @@ -3,7 +3,6 @@ from django.core.management import call_command from django.test import override_settings - from rest_framework.test import APITestCase from open_inwoner.configurations.bootstrap.auth import ( diff --git a/src/open_inwoner/configurations/tests/bootstrap/_test_setup_site_config.py b/src/open_inwoner/configurations/tests/bootstrap/_test_setup_site_config.py index 593a20af7b..b52419dd20 100644 --- a/src/open_inwoner/configurations/tests/bootstrap/_test_setup_site_config.py +++ b/src/open_inwoner/configurations/tests/bootstrap/_test_setup_site_config.py @@ -1,5 +1,4 @@ from django.test import TestCase, override_settings - from django_setup_configuration.exceptions import ConfigurationRunFailed from open_inwoner.configurations.choices import ColorTypeChoices, OpenIDDisplayChoices @@ -94,83 +93,103 @@ def test_site_configure(self): self.assertTrue(configuration_step.is_configured()) self.assertEqual(config.name, "My site") - self.assertEqual(config.secondary_color, "#000000"), - self.assertEqual(config.accent_color, "#000000"), - self.assertEqual(config.primary_font_color, ColorTypeChoices.dark), - self.assertEqual(config.secondary_font_color, ColorTypeChoices.light), - self.assertEqual(config.accent_font_color, ColorTypeChoices.light), - self.assertTrue(config.warning_banner_enabled), - self.assertEqual(config.warning_banner_text, "warning banner text"), - self.assertEqual(config.warning_banner_background_color, "#444444"), - self.assertEqual(config.warning_banner_font_color, "#555555"), - self.assertFalse(config.contactmoment_contact_form_enabled), - self.assertFalse(config.login_show), - self.assertTrue(config.login_allow_registration), - self.assertTrue(config.login_2fa_sms), - self.assertEqual(config.login_text, "login text"), - self.assertEqual(config.registration_text, "registration text"), - self.assertEqual(config.home_welcome_title, "welcome title"), - self.assertEqual(config.home_welcome_intro, "welcome intro"), - self.assertEqual(config.home_theme_title, "home theme title"), - self.assertEqual(config.home_theme_intro, "home theme intro"), - self.assertEqual(config.theme_title, "theme title"), - self.assertEqual(config.theme_intro, "theme intro"), - self.assertEqual(config.home_map_title, "home map title"), - self.assertEqual(config.home_map_intro, "home map intro"), - self.assertEqual(config.home_questionnaire_title, "home questionnaire title"), - self.assertEqual(config.home_questionnaire_intro, "home questionnaire intro"), - self.assertEqual(config.home_product_finder_title, "home product finder title"), - self.assertEqual(config.home_product_finder_intro, "home product finder intro"), - self.assertEqual( - config.select_questionnaire_title, "select questionnaire title" - ), - self.assertEqual( - config.select_questionnaire_intro, "select questionnaire intro" - ), - self.assertEqual(config.plans_intro, "plans intro"), - self.assertEqual(config.plans_no_plans_message, "plans no plans_message"), - self.assertEqual(config.plans_edit_message, "plans edit message"), - self.assertEqual(config.footer_logo_title, "footer logo title"), - self.assertEqual(config.footer_logo_url, "http://www.oip-footer-logo.nl"), - self.assertEqual(config.home_help_text, "home help text"), - self.assertEqual(config.theme_help_text, "theme help text"), - self.assertEqual(config.product_help_text, "product help text"), - self.assertEqual(config.search_help_text, "search help text"), - self.assertEqual(config.account_help_text, "account help text"), - self.assertEqual(config.questionnaire_help_text, "questionnaire help text"), - self.assertEqual(config.plan_help_text, "plan help text"), - self.assertFalse(config.search_filter_categories), - self.assertFalse(config.search_filter_tags), - self.assertFalse(config.search_filter_organizations), - self.assertFalse(config.notifications_actions_enabled), - self.assertFalse(config.notifications_cases_enabled), - self.assertFalse(config.notifications_messages_enabled), - self.assertFalse(config.notifications_plans_enabled), - self.assertEqual( - config.recipients_email_digest, ["test1@test.nl", "test2@test.nl"] - ), - self.assertEqual(config.contact_phonenumber, "0612345678"), - self.assertEqual(config.contact_page, "https://test.test"), - self.assertEqual(config.gtm_code, "gtm code"), - self.assertEqual(config.ga_code, "ga code"), - self.assertEqual(config.matomo_url, "matomo url"), - self.assertEqual(config.matomo_site_id, 88), - self.assertEqual(config.siteimprove_id, "88"), - self.assertEqual(config.cookie_info_text, "cookie info text"), - self.assertEqual(config.cookie_link_text, "cookie link text"), - self.assertEqual(config.cookie_link_url, "cookie link url"), - self.assertEqual(config.kcm_survey_link_text, "kcm survey link text"), - self.assertEqual( - config.kcm_survey_link_url, "http://www.oip-kcm-survey-link.nl" - ), - self.assertEqual(config.openid_connect_login_text, "openid connect login_text"), - self.assertEqual(config.openid_display, OpenIDDisplayChoices.admin), - self.assertEqual(config.redirect_to, "http://oip-test-home.nl"), - self.assertFalse(config.allow_messages_file_sharing), - self.assertTrue(config.hide_categories_from_anonymous_users), - self.assertTrue(config.hide_search_from_anonymous_users), - self.assertFalse(config.display_social), - self.assertTrue(config.eherkenning_enabled), + (self.assertEqual(config.secondary_color, "#000000"),) + (self.assertEqual(config.accent_color, "#000000"),) + (self.assertEqual(config.primary_font_color, ColorTypeChoices.dark),) + (self.assertEqual(config.secondary_font_color, ColorTypeChoices.light),) + (self.assertEqual(config.accent_font_color, ColorTypeChoices.light),) + (self.assertTrue(config.warning_banner_enabled),) + (self.assertEqual(config.warning_banner_text, "warning banner text"),) + (self.assertEqual(config.warning_banner_background_color, "#444444"),) + (self.assertEqual(config.warning_banner_font_color, "#555555"),) + (self.assertFalse(config.contactmoment_contact_form_enabled),) + (self.assertFalse(config.login_show),) + (self.assertTrue(config.login_allow_registration),) + (self.assertTrue(config.login_2fa_sms),) + (self.assertEqual(config.login_text, "login text"),) + (self.assertEqual(config.registration_text, "registration text"),) + (self.assertEqual(config.home_welcome_title, "welcome title"),) + (self.assertEqual(config.home_welcome_intro, "welcome intro"),) + (self.assertEqual(config.home_theme_title, "home theme title"),) + (self.assertEqual(config.home_theme_intro, "home theme intro"),) + (self.assertEqual(config.theme_title, "theme title"),) + (self.assertEqual(config.theme_intro, "theme intro"),) + (self.assertEqual(config.home_map_title, "home map title"),) + (self.assertEqual(config.home_map_intro, "home map intro"),) + (self.assertEqual(config.home_questionnaire_title, "home questionnaire title"),) + (self.assertEqual(config.home_questionnaire_intro, "home questionnaire intro"),) + ( + self.assertEqual( + config.home_product_finder_title, "home product finder title" + ), + ) + ( + self.assertEqual( + config.home_product_finder_intro, "home product finder intro" + ), + ) + ( + self.assertEqual( + config.select_questionnaire_title, "select questionnaire title" + ), + ) + ( + self.assertEqual( + config.select_questionnaire_intro, "select questionnaire intro" + ), + ) + (self.assertEqual(config.plans_intro, "plans intro"),) + (self.assertEqual(config.plans_no_plans_message, "plans no plans_message"),) + (self.assertEqual(config.plans_edit_message, "plans edit message"),) + (self.assertEqual(config.footer_logo_title, "footer logo title"),) + (self.assertEqual(config.footer_logo_url, "http://www.oip-footer-logo.nl"),) + (self.assertEqual(config.home_help_text, "home help text"),) + (self.assertEqual(config.theme_help_text, "theme help text"),) + (self.assertEqual(config.product_help_text, "product help text"),) + (self.assertEqual(config.search_help_text, "search help text"),) + (self.assertEqual(config.account_help_text, "account help text"),) + (self.assertEqual(config.questionnaire_help_text, "questionnaire help text"),) + (self.assertEqual(config.plan_help_text, "plan help text"),) + (self.assertFalse(config.search_filter_categories),) + (self.assertFalse(config.search_filter_tags),) + (self.assertFalse(config.search_filter_organizations),) + (self.assertFalse(config.notifications_actions_enabled),) + (self.assertFalse(config.notifications_cases_enabled),) + (self.assertFalse(config.notifications_messages_enabled),) + (self.assertFalse(config.notifications_plans_enabled),) + ( + self.assertEqual( + config.recipients_email_digest, ["test1@test.nl", "test2@test.nl"] + ), + ) + (self.assertEqual(config.contact_phonenumber, "0612345678"),) + (self.assertEqual(config.contact_page, "https://test.test"),) + (self.assertEqual(config.gtm_code, "gtm code"),) + (self.assertEqual(config.ga_code, "ga code"),) + (self.assertEqual(config.matomo_url, "matomo url"),) + (self.assertEqual(config.matomo_site_id, 88),) + (self.assertEqual(config.siteimprove_id, "88"),) + (self.assertEqual(config.cookie_info_text, "cookie info text"),) + (self.assertEqual(config.cookie_link_text, "cookie link text"),) + (self.assertEqual(config.cookie_link_url, "cookie link url"),) + (self.assertEqual(config.kcm_survey_link_text, "kcm survey link text"),) + ( + self.assertEqual( + config.kcm_survey_link_url, "http://www.oip-kcm-survey-link.nl" + ), + ) + ( + self.assertEqual( + config.openid_connect_login_text, "openid connect login_text" + ), + ) + (self.assertEqual(config.openid_display, OpenIDDisplayChoices.admin),) + (self.assertEqual(config.redirect_to, "http://oip-test-home.nl"),) + (self.assertFalse(config.allow_messages_file_sharing),) + (self.assertTrue(config.hide_categories_from_anonymous_users),) + (self.assertTrue(config.hide_search_from_anonymous_users),) + (self.assertFalse(config.display_social),) + (self.assertTrue(config.eherkenning_enabled),) @override_settings( SITE_NAME="My site", diff --git a/src/open_inwoner/configurations/tests/bootstrap/test_setup_openklant_config.py b/src/open_inwoner/configurations/tests/bootstrap/test_setup_openklant_config.py index 6f142692f4..68f13a32b4 100644 --- a/src/open_inwoner/configurations/tests/bootstrap/test_setup_openklant_config.py +++ b/src/open_inwoner/configurations/tests/bootstrap/test_setup_openklant_config.py @@ -1,7 +1,6 @@ from pathlib import Path from django.test import TestCase - from django_setup_configuration.exceptions import ConfigurationRunFailed from django_setup_configuration.test_utils import execute_single_step from zgw_consumers.constants import APITypes diff --git a/src/open_inwoner/configurations/tests/bootstrap/test_setup_zgw_config.py b/src/open_inwoner/configurations/tests/bootstrap/test_setup_zgw_config.py index 89b4c05644..6be4b12730 100644 --- a/src/open_inwoner/configurations/tests/bootstrap/test_setup_zgw_config.py +++ b/src/open_inwoner/configurations/tests/bootstrap/test_setup_zgw_config.py @@ -1,7 +1,6 @@ from pathlib import Path from django.test import TestCase - from django_setup_configuration.exceptions import ( ConfigurationRunFailed, PrerequisiteFailed, diff --git a/src/open_inwoner/configurations/tests/test_admin.py b/src/open_inwoner/configurations/tests/test_admin.py index d3695a8434..2df4afd8e1 100644 --- a/src/open_inwoner/configurations/tests/test_admin.py +++ b/src/open_inwoner/configurations/tests/test_admin.py @@ -1,7 +1,6 @@ from django.contrib.sites.models import Site from django.urls import reverse from django.utils.translation import gettext_lazy as _ - from django_webtest import WebTest from maykin_2fa.test import disable_admin_mfa from pyquery import PyQuery diff --git a/src/open_inwoner/configurations/tests/test_analytics.py b/src/open_inwoner/configurations/tests/test_analytics.py index 0d87401d89..06126d5cbd 100644 --- a/src/open_inwoner/configurations/tests/test_analytics.py +++ b/src/open_inwoner/configurations/tests/test_analytics.py @@ -1,7 +1,6 @@ from django.test import TestCase, override_settings, tag from django.urls import reverse from django.utils.translation import gettext as _ - from playwright.sync_api import expect from open_inwoner.utils.test import ClearCachesMixin diff --git a/src/open_inwoner/configurations/tests/test_colors.py b/src/open_inwoner/configurations/tests/test_colors.py index 9e9fa404d9..3abd97648b 100644 --- a/src/open_inwoner/configurations/tests/test_colors.py +++ b/src/open_inwoner/configurations/tests/test_colors.py @@ -1,6 +1,5 @@ from django.urls import reverse from django.utils.translation import gettext as _ - from django_webtest import WebTest from maykin_2fa.test import disable_admin_mfa diff --git a/src/open_inwoner/configurations/tests/test_emails.py b/src/open_inwoner/configurations/tests/test_emails.py index 197be50b8e..a4c3d7f0be 100644 --- a/src/open_inwoner/configurations/tests/test_emails.py +++ b/src/open_inwoner/configurations/tests/test_emails.py @@ -3,7 +3,6 @@ from django.core import mail from django.core.management import call_command from django.test import TestCase, override_settings - from django_yubin.models import Message from freezegun import freeze_time diff --git a/src/open_inwoner/configurations/tests/test_extra_css.py b/src/open_inwoner/configurations/tests/test_extra_css.py index b5decd38e8..66cdf251f0 100644 --- a/src/open_inwoner/configurations/tests/test_extra_css.py +++ b/src/open_inwoner/configurations/tests/test_extra_css.py @@ -2,7 +2,6 @@ from django.test import override_settings from django.urls import reverse from django.utils.html import escape - from django_webtest import WebTest from ...cms.tests import cms_tools diff --git a/src/open_inwoner/configurations/tests/test_help_modal.py b/src/open_inwoner/configurations/tests/test_help_modal.py index ebc6301128..d59fdb22ee 100644 --- a/src/open_inwoner/configurations/tests/test_help_modal.py +++ b/src/open_inwoner/configurations/tests/test_help_modal.py @@ -1,7 +1,6 @@ from django.test import override_settings from django.urls import reverse from django.utils.translation import gettext_lazy as _ - from django_webtest import WebTest from open_inwoner.accounts.tests.factories import UserFactory diff --git a/src/open_inwoner/configurations/tests/test_kcm_survey.py b/src/open_inwoner/configurations/tests/test_kcm_survey.py index ca91e4c872..e3d33a9b49 100644 --- a/src/open_inwoner/configurations/tests/test_kcm_survey.py +++ b/src/open_inwoner/configurations/tests/test_kcm_survey.py @@ -1,7 +1,6 @@ from unittest.mock import patch from django.test import TestCase - from pyquery import PyQuery as PQ from open_inwoner.cms.profile.cms_apps import ProfileApphook @@ -37,7 +36,6 @@ def test_kcm_survey_not_configured(self): ) for text, url in invalid_configs: with self.subTest(text=text, url=url): - with patch( "open_inwoner.configurations.models.SiteConfiguration.get_solo", return_value=SiteConfiguration( diff --git a/src/open_inwoner/configurations/tests/test_oidc.py b/src/open_inwoner/configurations/tests/test_oidc.py index 4ee990c058..5675596d01 100644 --- a/src/open_inwoner/configurations/tests/test_oidc.py +++ b/src/open_inwoner/configurations/tests/test_oidc.py @@ -1,6 +1,5 @@ from django.urls import reverse from django.utils.translation import gettext_lazy as _ - from django_webtest import WebTest from maykin_2fa.test import disable_admin_mfa from mozilla_django_oidc_db.models import OpenIDConnectConfig diff --git a/src/open_inwoner/configurations/tests/test_redirect_to.py b/src/open_inwoner/configurations/tests/test_redirect_to.py index f60a8d2b15..1d0a8f593d 100644 --- a/src/open_inwoner/configurations/tests/test_redirect_to.py +++ b/src/open_inwoner/configurations/tests/test_redirect_to.py @@ -1,5 +1,4 @@ from django.urls import reverse - from django_webtest import WebTest from open_inwoner.accounts.tests.factories import UserFactory diff --git a/src/open_inwoner/configurations/tests/test_show_actions.py b/src/open_inwoner/configurations/tests/test_show_actions.py index 1d05ff5343..7acfcdd2d7 100644 --- a/src/open_inwoner/configurations/tests/test_show_actions.py +++ b/src/open_inwoner/configurations/tests/test_show_actions.py @@ -1,7 +1,6 @@ +from cms import api from django.test import override_settings from django.urls import reverse - -from cms import api from django_webtest import WebTest from open_inwoner.accounts.tests.factories import ActionFactory, UserFactory diff --git a/src/open_inwoner/configurations/tests/test_social.py b/src/open_inwoner/configurations/tests/test_social.py index 668a4015ea..ac123d336f 100644 --- a/src/open_inwoner/configurations/tests/test_social.py +++ b/src/open_inwoner/configurations/tests/test_social.py @@ -1,6 +1,5 @@ from django.test import Client, TestCase, override_settings from django.urls import reverse - from pyquery import PyQuery from ...pdc.tests.factories import ProductFactory diff --git a/src/open_inwoner/configurations/tests/test_upload.py b/src/open_inwoner/configurations/tests/test_upload.py index 2d6d452f8e..0f6a16cdbc 100644 --- a/src/open_inwoner/configurations/tests/test_upload.py +++ b/src/open_inwoner/configurations/tests/test_upload.py @@ -1,5 +1,4 @@ from django.urls import reverse - from django_webtest import WebTest from maykin_2fa.test import disable_admin_mfa from webtest import Upload diff --git a/src/open_inwoner/configurations/validators.py b/src/open_inwoner/configurations/validators.py index d6d218f3ef..f447c67178 100644 --- a/src/open_inwoner/configurations/validators.py +++ b/src/open_inwoner/configurations/validators.py @@ -1,6 +1,5 @@ from django.core.exceptions import ValidationError from django.utils.translation import gettext_lazy as _ - from mozilla_django_oidc_db.models import OpenIDConnectConfig from .choices import OpenIDDisplayChoices diff --git a/src/open_inwoner/custom_csp/migrations/0001_initial.py b/src/open_inwoner/custom_csp/migrations/0001_initial.py index a9cf59dc03..db2af0c622 100644 --- a/src/open_inwoner/custom_csp/migrations/0001_initial.py +++ b/src/open_inwoner/custom_csp/migrations/0001_initial.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - initial = True dependencies = [] diff --git a/src/open_inwoner/custom_csp/tests/test_csp.py b/src/open_inwoner/custom_csp/tests/test_csp.py index 0a3fd5218f..ec603c871e 100644 --- a/src/open_inwoner/custom_csp/tests/test_csp.py +++ b/src/open_inwoner/custom_csp/tests/test_csp.py @@ -1,5 +1,4 @@ from django.test import override_settings - from django_webtest import WebTest from open_inwoner.accounts.tests.factories import DigidUserFactory, UserFactory diff --git a/src/open_inwoner/extended_sessions/tests/test_extended_session.py b/src/open_inwoner/extended_sessions/tests/test_extended_session.py index f5489e9fb6..f5e817f793 100644 --- a/src/open_inwoner/extended_sessions/tests/test_extended_session.py +++ b/src/open_inwoner/extended_sessions/tests/test_extended_session.py @@ -1,6 +1,5 @@ from django.conf import settings from django.urls import reverse - from django_webtest import WebTest from open_inwoner.accounts.tests.factories import UserFactory diff --git a/src/open_inwoner/extended_sessions/tests/test_views.py b/src/open_inwoner/extended_sessions/tests/test_views.py index 081ee1fecb..2259c320e8 100644 --- a/src/open_inwoner/extended_sessions/tests/test_views.py +++ b/src/open_inwoner/extended_sessions/tests/test_views.py @@ -1,5 +1,4 @@ from django.urls import reverse - from django_webtest import WebTest from open_inwoner.accounts.tests.factories import UserFactory diff --git a/src/open_inwoner/haalcentraal/admin.py b/src/open_inwoner/haalcentraal/admin.py index 83cff459a5..0ab754a63c 100644 --- a/src/open_inwoner/haalcentraal/admin.py +++ b/src/open_inwoner/haalcentraal/admin.py @@ -1,5 +1,4 @@ from django.contrib import admin - from solo.admin import SingletonModelAdmin from .models import HaalCentraalConfig diff --git a/src/open_inwoner/haalcentraal/migrations/0001_initial.py b/src/open_inwoner/haalcentraal/migrations/0001_initial.py index b954176a3d..1bbb5ffa16 100644 --- a/src/open_inwoner/haalcentraal/migrations/0001_initial.py +++ b/src/open_inwoner/haalcentraal/migrations/0001_initial.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - initial = True dependencies = [ diff --git a/src/open_inwoner/haalcentraal/migrations/0002_auto_20230206_1511.py b/src/open_inwoner/haalcentraal/migrations/0002_auto_20230206_1511.py index 08eed954e3..052794dbb0 100644 --- a/src/open_inwoner/haalcentraal/migrations/0002_auto_20230206_1511.py +++ b/src/open_inwoner/haalcentraal/migrations/0002_auto_20230206_1511.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("haalcentraal", "0001_initial"), ] diff --git a/src/open_inwoner/haalcentraal/migrations/0003_haalcentraalconfig_api_verwerking_and_more.py b/src/open_inwoner/haalcentraal/migrations/0003_haalcentraalconfig_api_verwerking_and_more.py index 9f193a4239..de3b269ac1 100644 --- a/src/open_inwoner/haalcentraal/migrations/0003_haalcentraalconfig_api_verwerking_and_more.py +++ b/src/open_inwoner/haalcentraal/migrations/0003_haalcentraalconfig_api_verwerking_and_more.py @@ -6,7 +6,6 @@ class Migration(migrations.Migration): - dependencies = [ ("haalcentraal", "0002_auto_20230206_1511"), ] diff --git a/src/open_inwoner/haalcentraal/migrations/0004_haalcentraalconfig_api_afnemer_oin.py b/src/open_inwoner/haalcentraal/migrations/0004_haalcentraalconfig_api_afnemer_oin.py index df8ff483fa..08d74e6222 100644 --- a/src/open_inwoner/haalcentraal/migrations/0004_haalcentraalconfig_api_afnemer_oin.py +++ b/src/open_inwoner/haalcentraal/migrations/0004_haalcentraalconfig_api_afnemer_oin.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("haalcentraal", "0003_haalcentraalconfig_api_verwerking_and_more"), ] diff --git a/src/open_inwoner/haalcentraal/models.py b/src/open_inwoner/haalcentraal/models.py index f4209de818..55c64f2a75 100644 --- a/src/open_inwoner/haalcentraal/models.py +++ b/src/open_inwoner/haalcentraal/models.py @@ -1,6 +1,5 @@ from django.db import models from django.utils.translation import gettext_lazy as _ - from solo.models import SingletonModel from zgw_consumers.constants import APITypes diff --git a/src/open_inwoner/haalcentraal/tests/test_client.py b/src/open_inwoner/haalcentraal/tests/test_client.py index bb4761571d..4ba87be5dc 100644 --- a/src/open_inwoner/haalcentraal/tests/test_client.py +++ b/src/open_inwoner/haalcentraal/tests/test_client.py @@ -1,8 +1,7 @@ import json -from django.test import TestCase - import requests_mock +from django.test import TestCase from ..api import BRP_2_1 from ..models import HaalCentraalConfig diff --git a/src/open_inwoner/haalcentraal/tests/test_logging.py b/src/open_inwoner/haalcentraal/tests/test_logging.py index 1bc265584e..c4940b7c03 100644 --- a/src/open_inwoner/haalcentraal/tests/test_logging.py +++ b/src/open_inwoner/haalcentraal/tests/test_logging.py @@ -1,6 +1,5 @@ -from django.test import TestCase, override_settings - import requests_mock +from django.test import TestCase, override_settings from freezegun import freeze_time from log_outgoing_requests.models import OutgoingRequestsLog diff --git a/src/open_inwoner/haalcentraal/tests/test_signal.py b/src/open_inwoner/haalcentraal/tests/test_signal.py index df61235656..1f35056d79 100644 --- a/src/open_inwoner/haalcentraal/tests/test_signal.py +++ b/src/open_inwoner/haalcentraal/tests/test_signal.py @@ -1,9 +1,8 @@ import logging +import requests_mock from django.test import TestCase, override_settings from django.utils.translation import gettext as _ - -import requests_mock from freezegun import freeze_time from timeline_logger.models import TimelineLog diff --git a/src/open_inwoner/kvk/admin.py b/src/open_inwoner/kvk/admin.py index eaa741b631..70ea41170f 100644 --- a/src/open_inwoner/kvk/admin.py +++ b/src/open_inwoner/kvk/admin.py @@ -1,6 +1,5 @@ from django.contrib import admin from django.utils.translation import gettext_lazy as _ - from solo.admin import SingletonModelAdmin from .models import KvKConfig diff --git a/src/open_inwoner/kvk/migrations/0001_initial.py b/src/open_inwoner/kvk/migrations/0001_initial.py index d0cd78cc29..56bd6453ca 100644 --- a/src/open_inwoner/kvk/migrations/0001_initial.py +++ b/src/open_inwoner/kvk/migrations/0001_initial.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - initial = True dependencies = [ diff --git a/src/open_inwoner/kvk/migrations/0002_alter_kvkconfig_api_root.py b/src/open_inwoner/kvk/migrations/0002_alter_kvkconfig_api_root.py index f8515354a7..1ce0adf526 100644 --- a/src/open_inwoner/kvk/migrations/0002_alter_kvkconfig_api_root.py +++ b/src/open_inwoner/kvk/migrations/0002_alter_kvkconfig_api_root.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("kvk", "0001_initial"), ] diff --git a/src/open_inwoner/kvk/migrations/0003_api_root.py b/src/open_inwoner/kvk/migrations/0003_api_root.py index b505d8edf4..fd81c72dba 100644 --- a/src/open_inwoner/kvk/migrations/0003_api_root.py +++ b/src/open_inwoner/kvk/migrations/0003_api_root.py @@ -15,7 +15,6 @@ def strip_version_number(apps, _): class Migration(migrations.Migration): - dependencies = [ ("kvk", "0002_alter_kvkconfig_api_root"), ] diff --git a/src/open_inwoner/kvk/migrations/0004_alter_kvkconfig_api_root.py b/src/open_inwoner/kvk/migrations/0004_alter_kvkconfig_api_root.py index 911a5cb45b..75bed8b744 100644 --- a/src/open_inwoner/kvk/migrations/0004_alter_kvkconfig_api_root.py +++ b/src/open_inwoner/kvk/migrations/0004_alter_kvkconfig_api_root.py @@ -1,11 +1,11 @@ # Generated by Django 3.2.23 on 2024-02-19 08:26 from django.db import migrations, models + import open_inwoner.kvk.validators class Migration(migrations.Migration): - dependencies = [ ("kvk", "0003_api_root"), ] diff --git a/src/open_inwoner/kvk/models.py b/src/open_inwoner/kvk/models.py index 57b6f8223e..6dd0a330c5 100644 --- a/src/open_inwoner/kvk/models.py +++ b/src/open_inwoner/kvk/models.py @@ -1,6 +1,5 @@ from django.db import models from django.utils.translation import gettext_lazy as _ - from simple_certmanager.models import Certificate from solo.models import SingletonModel diff --git a/src/open_inwoner/kvk/tests/test_api.py b/src/open_inwoner/kvk/tests/test_api.py index 0c6281e9fd..5cf2a8e88e 100644 --- a/src/open_inwoner/kvk/tests/test_api.py +++ b/src/open_inwoner/kvk/tests/test_api.py @@ -1,8 +1,7 @@ from unittest.mock import patch -from django.test import TestCase - import requests_mock +from django.test import TestCase from requests.exceptions import InvalidJSONError, SSLError from ..client import KvKClient diff --git a/src/open_inwoner/kvk/tests/test_signals.py b/src/open_inwoner/kvk/tests/test_signals.py index 74f48f9c77..68dc829ec1 100644 --- a/src/open_inwoner/kvk/tests/test_signals.py +++ b/src/open_inwoner/kvk/tests/test_signals.py @@ -1,10 +1,9 @@ import logging +import requests_mock from django.contrib.auth import get_user_model from django.test import TestCase from django.utils.translation import gettext as _ - -import requests_mock from freezegun import freeze_time from timeline_logger.models import TimelineLog diff --git a/src/open_inwoner/kvk/tests/test_views.py b/src/open_inwoner/kvk/tests/test_views.py index 832559af2f..0cab8c0933 100644 --- a/src/open_inwoner/kvk/tests/test_views.py +++ b/src/open_inwoner/kvk/tests/test_views.py @@ -2,7 +2,6 @@ from django.test import TestCase from django.urls import reverse, reverse_lazy - from pyquery import PyQuery from open_inwoner.accounts.tests.factories import eHerkenningUserFactory @@ -19,7 +18,6 @@ class KvKViewsTestCase(TestCase): @classmethod def setUpTestData(cls): - super().setUpTestData() cls.user = eHerkenningUserFactory.create( diff --git a/src/open_inwoner/kvk/views.py b/src/open_inwoner/kvk/views.py index 846a3f7589..7db6ea0ce5 100644 --- a/src/open_inwoner/kvk/views.py +++ b/src/open_inwoner/kvk/views.py @@ -3,7 +3,6 @@ from django.urls import reverse from django.utils.translation import gettext_lazy as _ from django.views.generic import FormView - from furl import furl from open_inwoner.kvk.branches import KVK_BRANCH_SESSION_VARIABLE diff --git a/src/open_inwoner/laposta/admin.py b/src/open_inwoner/laposta/admin.py index 1465fdb8c6..85aae4ad21 100644 --- a/src/open_inwoner/laposta/admin.py +++ b/src/open_inwoner/laposta/admin.py @@ -1,7 +1,6 @@ from django import forms from django.contrib import admin from django.utils.translation import gettext_lazy as _ - from solo.admin import SingletonModelAdmin from .choices import get_list_choices diff --git a/src/open_inwoner/laposta/client.py b/src/open_inwoner/laposta/client.py index 79b82b8d74..a864438d39 100644 --- a/src/open_inwoner/laposta/client.py +++ b/src/open_inwoner/laposta/client.py @@ -1,10 +1,9 @@ import logging from urllib.parse import quote +from ape_pie.client import APIClient from django.conf import settings from django.core.cache import cache - -from ape_pie.client import APIClient from requests.exceptions import RequestException from open_inwoner.utils.api import ClientError, get_json_response diff --git a/src/open_inwoner/laposta/forms.py b/src/open_inwoner/laposta/forms.py index 4df041335d..2e68fb090b 100644 --- a/src/open_inwoner/laposta/forms.py +++ b/src/open_inwoner/laposta/forms.py @@ -4,7 +4,6 @@ from django.contrib import messages from django.core.exceptions import ValidationError from django.utils.translation import gettext_lazy as _ - from ipware import get_client_ip from requests.exceptions import RequestException diff --git a/src/open_inwoner/laposta/migrations/0001_initial.py b/src/open_inwoner/laposta/migrations/0001_initial.py index 4bbad06ec3..20aa0c7c07 100644 --- a/src/open_inwoner/laposta/migrations/0001_initial.py +++ b/src/open_inwoner/laposta/migrations/0001_initial.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - initial = True dependencies = [] diff --git a/src/open_inwoner/laposta/migrations/0002_subscription.py b/src/open_inwoner/laposta/migrations/0002_subscription.py index 3385b1fd78..1b5ee4f82b 100644 --- a/src/open_inwoner/laposta/migrations/0002_subscription.py +++ b/src/open_inwoner/laposta/migrations/0002_subscription.py @@ -1,12 +1,11 @@ # Generated by Django 4.2.10 on 2024-03-08 13:42 +import django.db.models.deletion from django.conf import settings from django.db import migrations, models -import django.db.models.deletion class Migration(migrations.Migration): - dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ("laposta", "0001_initial"), diff --git a/src/open_inwoner/laposta/migrations/0003_lapostaconfig_limit_list_selection_to.py b/src/open_inwoner/laposta/migrations/0003_lapostaconfig_limit_list_selection_to.py index 3ee758c50e..99adb0811f 100644 --- a/src/open_inwoner/laposta/migrations/0003_lapostaconfig_limit_list_selection_to.py +++ b/src/open_inwoner/laposta/migrations/0003_lapostaconfig_limit_list_selection_to.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - dependencies = [ ("laposta", "0002_subscription"), ] diff --git a/src/open_inwoner/laposta/migrations/0004_delete_subscription.py b/src/open_inwoner/laposta/migrations/0004_delete_subscription.py index d41977058b..984bd9a24a 100644 --- a/src/open_inwoner/laposta/migrations/0004_delete_subscription.py +++ b/src/open_inwoner/laposta/migrations/0004_delete_subscription.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("laposta", "0003_lapostaconfig_limit_list_selection_to"), ] diff --git a/src/open_inwoner/laposta/migrations/0005_alter_lapostaconfig_limit_list_selection_to.py b/src/open_inwoner/laposta/migrations/0005_alter_lapostaconfig_limit_list_selection_to.py index ea51a87842..a4127f4f3b 100644 --- a/src/open_inwoner/laposta/migrations/0005_alter_lapostaconfig_limit_list_selection_to.py +++ b/src/open_inwoner/laposta/migrations/0005_alter_lapostaconfig_limit_list_selection_to.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - dependencies = [ ("laposta", "0004_delete_subscription"), ] diff --git a/src/open_inwoner/laposta/models.py b/src/open_inwoner/laposta/models.py index eff59e3dde..eef1492ebf 100644 --- a/src/open_inwoner/laposta/models.py +++ b/src/open_inwoner/laposta/models.py @@ -1,7 +1,6 @@ from django.contrib.postgres.fields import ArrayField from django.db import models from django.utils.translation import gettext_lazy as _ - from requests.auth import HTTPBasicAuth from solo.models import SingletonModel diff --git a/src/open_inwoner/laposta/tests/test_forms.py b/src/open_inwoner/laposta/tests/test_forms.py index 84717b438c..86a5c5004c 100644 --- a/src/open_inwoner/laposta/tests/test_forms.py +++ b/src/open_inwoner/laposta/tests/test_forms.py @@ -1,11 +1,10 @@ from unittest.mock import patch +import requests_mock from django.contrib.messages.middleware import MessageMiddleware from django.test import TestCase, tag from django.utils.translation import gettext as _ -import requests_mock - from open_inwoner.accounts.tests.factories import DigidUserFactory from open_inwoner.cms.tests.cms_tools import get_request from open_inwoner.utils.test import ClearCachesMixin diff --git a/src/open_inwoner/mail/admin.py b/src/open_inwoner/mail/admin.py index 73b7b90f13..062f837bf4 100644 --- a/src/open_inwoner/mail/admin.py +++ b/src/open_inwoner/mail/admin.py @@ -1,10 +1,12 @@ from django.contrib import admin - from django_yubin.admin import ( LogAdmin as YubinLogAdmin, +) +from django_yubin.admin import ( MessageAdmin as YubinMessageAdmin, ) -from django_yubin.models import Log as YubinLog, Message as YubinMessage +from django_yubin.models import Log as YubinLog +from django_yubin.models import Message as YubinMessage from ..utils.admin import ReadOnlyAdminMixin diff --git a/src/open_inwoner/mail/tests/test_verification.py b/src/open_inwoner/mail/tests/test_verification.py index 538390c753..c4ffe8ecd3 100644 --- a/src/open_inwoner/mail/tests/test_verification.py +++ b/src/open_inwoner/mail/tests/test_verification.py @@ -4,7 +4,6 @@ from django.core import mail from django.test import TestCase, override_settings from django.urls import reverse - from django_webtest import WebTest from freezegun.api import freeze_time from furl.furl import furl diff --git a/src/open_inwoner/mail/verification.py b/src/open_inwoner/mail/verification.py index dfbe57d369..4b2b991923 100644 --- a/src/open_inwoner/mail/verification.py +++ b/src/open_inwoner/mail/verification.py @@ -3,7 +3,6 @@ from django.core import signing from django.urls import reverse - from furl import furl from mail_editor.helpers import find_template diff --git a/src/open_inwoner/media/migrations/0001_initial.py b/src/open_inwoner/media/migrations/0001_initial.py index bbc96f78f7..ab61dad750 100644 --- a/src/open_inwoner/media/migrations/0001_initial.py +++ b/src/open_inwoner/media/migrations/0001_initial.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - initial = True dependencies = [] diff --git a/src/open_inwoner/media/migrations/0002_alter_video_link_id.py b/src/open_inwoner/media/migrations/0002_alter_video_link_id.py index 91716c2715..cf8c3501e0 100644 --- a/src/open_inwoner/media/migrations/0002_alter_video_link_id.py +++ b/src/open_inwoner/media/migrations/0002_alter_video_link_id.py @@ -7,7 +7,6 @@ class Migration(migrations.Migration): - dependencies = [ ("media", "0001_initial"), ] diff --git a/src/open_inwoner/media/tests/test_admin.py b/src/open_inwoner/media/tests/test_admin.py index 7b54e05b4b..d7662da40c 100644 --- a/src/open_inwoner/media/tests/test_admin.py +++ b/src/open_inwoner/media/tests/test_admin.py @@ -1,6 +1,5 @@ -from django.urls import reverse - from cms.utils.permissions import set_current_user +from django.urls import reverse from django_webtest import WebTest from maykin_2fa.test import disable_admin_mfa diff --git a/src/open_inwoner/openklant/admin.py b/src/open_inwoner/openklant/admin.py index bca5941f29..a7b21aadca 100644 --- a/src/open_inwoner/openklant/admin.py +++ b/src/open_inwoner/openklant/admin.py @@ -1,7 +1,6 @@ from django import forms from django.contrib import admin from django.utils.translation import gettext_lazy as _ - from ordered_model.admin import OrderedInlineModelAdminMixin, OrderedTabularInline from solo.admin import SingletonModelAdmin diff --git a/src/open_inwoner/openklant/api_models.py b/src/open_inwoner/openklant/api_models.py index 58c0803895..b2dc137b6c 100644 --- a/src/open_inwoner/openklant/api_models.py +++ b/src/open_inwoner/openklant/api_models.py @@ -1,7 +1,7 @@ import dataclasses from dataclasses import dataclass from datetime import datetime -from typing import NotRequired, Optional, TypedDict, Union +from typing import NotRequired, TypedDict from zgw_consumers.api_models.base import ZGWModel @@ -63,11 +63,11 @@ class ContactMoment(ZGWModel): # eSuite OAS (compatible) url: str bronorganisatie: str - registratiedatum: Optional[datetime] = None + registratiedatum: datetime | None = None kanaal: str = "" tekst: str = "" # NOTE annoyingly we can't put MedewerkerIdentificatie here as type because of - medewerker_identificatie: Optional[dict] = None + medewerker_identificatie: dict | None = None # modification to API for eSuite usefulness *AFWIJKING* identificatie: str = "" @@ -79,8 +79,8 @@ class ContactMoment(ZGWModel): # open-klant OAS voorkeurskanaal: str = "" voorkeurstaal: str = "" - vorig_contactmoment: Optional[str] = None - volgend_contactmoment: Optional[str] = None + vorig_contactmoment: str | None = None + volgend_contactmoment: str | None = None onderwerp_links: list[str] = dataclasses.field(default_factory=list) initiatiefnemer: str = "" @@ -124,8 +124,8 @@ class KlantContactMoment(ZGWModel): # eSuite OAS (compatible) url: str - contactmoment: Union[str, ContactMoment] - klant: Union[str, Klant] + contactmoment: str | ContactMoment + klant: str | Klant rol: str # open-klant non-standard *AFWIJKING* @@ -138,6 +138,6 @@ class ObjectContactMoment(ZGWModel): Contactmomenten API """ - contactmoment: Union[str, ContactMoment] - object: Union[str, Klant] + contactmoment: str | ContactMoment + object: str | Klant object_type: str diff --git a/src/open_inwoner/openklant/clients.py b/src/open_inwoner/openklant/clients.py index 96b6459ada..cfc8c8b6c3 100644 --- a/src/open_inwoner/openklant/clients.py +++ b/src/open_inwoner/openklant/clients.py @@ -309,7 +309,6 @@ def retrieve_klantcontactmomenten_for_klant( def retrieve_objectcontactmomenten_for_object_type( self, contactmoment: ContactMoment, object_type: str ) -> list[ObjectContactMoment]: - moments = self.retrieve_objectcontactmomenten_for_contactmoment(contactmoment) # eSuite doesn't implement a `object_type` query parameter diff --git a/src/open_inwoner/openklant/cms_plugins.py b/src/open_inwoner/openklant/cms_plugins.py index a229f9ad8d..16e1c34c58 100644 --- a/src/open_inwoner/openklant/cms_plugins.py +++ b/src/open_inwoner/openklant/cms_plugins.py @@ -1,10 +1,9 @@ -from django import forms -from django.db import models -from django.utils.translation import gettext_lazy as _ - from cms.models import CMSPlugin from cms.plugin_base import CMSPluginBase from cms.plugin_pool import plugin_pool +from django import forms +from django.db import models +from django.utils.translation import gettext_lazy as _ from open_inwoner.ckeditor5.widgets import CKEditorWidget diff --git a/src/open_inwoner/openklant/migrations/0001_initial.py b/src/open_inwoner/openklant/migrations/0001_initial.py index 61efc30917..3eae0e278b 100644 --- a/src/open_inwoner/openklant/migrations/0001_initial.py +++ b/src/open_inwoner/openklant/migrations/0001_initial.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - initial = True dependencies = [ diff --git a/src/open_inwoner/openklant/migrations/0002_auto_20230519_1210.py b/src/open_inwoner/openklant/migrations/0002_auto_20230519_1210.py index 7ca5ee8e4b..c7bd24d32c 100644 --- a/src/open_inwoner/openklant/migrations/0002_auto_20230519_1210.py +++ b/src/open_inwoner/openklant/migrations/0002_auto_20230519_1210.py @@ -1,11 +1,10 @@ # Generated by Django 3.2.15 on 2023-05-19 10:10 -from django.db import migrations, models import django.db.models.deletion +from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ("zgw_consumers", "0016_auto_20220818_1412"), ("openklant", "0001_initial"), diff --git a/src/open_inwoner/openklant/migrations/0003_auto_20230526_1013.py b/src/open_inwoner/openklant/migrations/0003_auto_20230526_1013.py index b2f744bb57..9db27770a5 100644 --- a/src/open_inwoner/openklant/migrations/0003_auto_20230526_1013.py +++ b/src/open_inwoner/openklant/migrations/0003_auto_20230526_1013.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("openklant", "0002_auto_20230519_1210"), ] diff --git a/src/open_inwoner/openklant/migrations/0007_contactformsubject_subject_code.py b/src/open_inwoner/openklant/migrations/0007_contactformsubject_subject_code.py index 31f39e4a14..a8b2d3a1c5 100644 --- a/src/open_inwoner/openklant/migrations/0007_contactformsubject_subject_code.py +++ b/src/open_inwoner/openklant/migrations/0007_contactformsubject_subject_code.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("openklant", "0006_alter_contactformsubject_order"), ] diff --git a/src/open_inwoner/openklant/migrations/0008_openklantconfig_use_rsin_for_innnnpid_query_parameter.py b/src/open_inwoner/openklant/migrations/0008_openklantconfig_use_rsin_for_innnnpid_query_parameter.py index 4cf6c59dcf..c783dfd801 100644 --- a/src/open_inwoner/openklant/migrations/0008_openklantconfig_use_rsin_for_innnnpid_query_parameter.py +++ b/src/open_inwoner/openklant/migrations/0008_openklantconfig_use_rsin_for_innnnpid_query_parameter.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("openklant", "0007_contactformsubject_subject_code"), ] diff --git a/src/open_inwoner/openklant/migrations/0009_klantcontactmomentanswer.py b/src/open_inwoner/openklant/migrations/0009_klantcontactmomentanswer.py index a1df74185c..99872ead76 100644 --- a/src/open_inwoner/openklant/migrations/0009_klantcontactmomentanswer.py +++ b/src/open_inwoner/openklant/migrations/0009_klantcontactmomentanswer.py @@ -1,12 +1,11 @@ # Generated by Django 4.2.10 on 2024-03-15 15:19 +import django.db.models.deletion from django.conf import settings from django.db import migrations, models -import django.db.models.deletion class Migration(migrations.Migration): - dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ("openklant", "0008_openklantconfig_use_rsin_for_innnnpid_query_parameter"), diff --git a/src/open_inwoner/openklant/migrations/0010_openklantconfig_register_channel.py b/src/open_inwoner/openklant/migrations/0010_openklantconfig_register_channel.py index 5a6c401c0d..3c794a682d 100644 --- a/src/open_inwoner/openklant/migrations/0010_openklantconfig_register_channel.py +++ b/src/open_inwoner/openklant/migrations/0010_openklantconfig_register_channel.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("openklant", "0009_klantcontactmomentanswer"), ] diff --git a/src/open_inwoner/openklant/migrations/0011_alter_openklantconfig_use_rsin_for_innnnpid_query_parameter.py b/src/open_inwoner/openklant/migrations/0011_alter_openklantconfig_use_rsin_for_innnnpid_query_parameter.py index a25b1f493b..b042999b10 100644 --- a/src/open_inwoner/openklant/migrations/0011_alter_openklantconfig_use_rsin_for_innnnpid_query_parameter.py +++ b/src/open_inwoner/openklant/migrations/0011_alter_openklantconfig_use_rsin_for_innnnpid_query_parameter.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("openklant", "0010_openklantconfig_register_channel"), ] diff --git a/src/open_inwoner/openklant/migrations/0012_openklantconfig_send_email_confirmation.py b/src/open_inwoner/openklant/migrations/0012_openklantconfig_send_email_confirmation.py index 182179601e..bd94cbc805 100644 --- a/src/open_inwoner/openklant/migrations/0012_openklantconfig_send_email_confirmation.py +++ b/src/open_inwoner/openklant/migrations/0012_openklantconfig_send_email_confirmation.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ( "openklant", diff --git a/src/open_inwoner/openklant/migrations/0013_openklantconfig_exclude_contactmoment_kanalen.py b/src/open_inwoner/openklant/migrations/0013_openklantconfig_exclude_contactmoment_kanalen.py index 9b712fa80e..125c94c9a6 100644 --- a/src/open_inwoner/openklant/migrations/0013_openklantconfig_exclude_contactmoment_kanalen.py +++ b/src/open_inwoner/openklant/migrations/0013_openklantconfig_exclude_contactmoment_kanalen.py @@ -1,14 +1,12 @@ # Generated by Django 4.2.15 on 2024-09-06 10:04 -from django.db import migrations, models - import django_jsonform.models.fields +from django.db import migrations, models import open_inwoner.utils.validators class Migration(migrations.Migration): - dependencies = [ ("openklant", "0012_openklantconfig_send_email_confirmation"), ] diff --git a/src/open_inwoner/openklant/migrations/0014_contactformconfig.py b/src/open_inwoner/openklant/migrations/0014_contactformconfig.py index 99ffe49cb1..7f0b403e32 100644 --- a/src/open_inwoner/openklant/migrations/0014_contactformconfig.py +++ b/src/open_inwoner/openklant/migrations/0014_contactformconfig.py @@ -1,11 +1,10 @@ # Generated by Django 4.2.16 on 2024-09-24 07:17 -from django.db import migrations, models import django.db.models.deletion +from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ("cms", "0022_auto_20180620_1551"), ("openklant", "0013_openklantconfig_exclude_contactmoment_kanalen"), diff --git a/src/open_inwoner/openklant/migrations/0015_openklant2config.py b/src/open_inwoner/openklant/migrations/0015_openklant2config.py index 7c83d120d9..bb6d729913 100644 --- a/src/open_inwoner/openklant/migrations/0015_openklant2config.py +++ b/src/open_inwoner/openklant/migrations/0015_openklant2config.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - dependencies = [ ("zgw_consumers", "0022_set_default_service_slug"), ("openklant", "0014_contactformconfig"), diff --git a/src/open_inwoner/openklant/models.py b/src/open_inwoner/openklant/models.py index 2f20e55502..743a5ef40a 100644 --- a/src/open_inwoner/openklant/models.py +++ b/src/open_inwoner/openklant/models.py @@ -1,6 +1,5 @@ from django.db import models from django.utils.translation import gettext_lazy as _ - from django_jsonform.models.fields import ArrayField from ordered_model.models import OrderedModel, OrderedModelManager from solo.models import SingletonModel diff --git a/src/open_inwoner/openklant/services.py b/src/open_inwoner/openklant/services.py index bdd198b1c7..d93f2a6eba 100644 --- a/src/open_inwoner/openklant/services.py +++ b/src/open_inwoner/openklant/services.py @@ -1,18 +1,18 @@ import datetime import logging import uuid +from collections.abc import Iterable from datetime import timedelta -from typing import Iterable, Literal, NotRequired, Protocol, Self +from typing import Literal, NotRequired, Protocol, Self +import glom +from ape_pie.client import APIClient +from attr import dataclass from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.urls import reverse from django.utils import timezone from django.utils.translation import gettext_lazy as _ - -import glom -from ape_pie.client import APIClient -from attr import dataclass from pydantic import BaseModel, ConfigDict, TypeAdapter from requests.exceptions import RequestException from typing_extensions import TypedDict @@ -306,18 +306,18 @@ def update_user_from_klant(self, klant: Klant, user: User): and user.case_notification_channel != NotificationChannelChoice.digital_only ): - update_data[ - "case_notification_channel" - ] = NotificationChannelChoice.digital_only + update_data["case_notification_channel"] = ( + NotificationChannelChoice.digital_only + ) elif ( klant.toestemming_zaak_notificaties_alleen_digitaal is False and user.case_notification_channel != NotificationChannelChoice.digital_and_post ): - update_data[ - "case_notification_channel" - ] = NotificationChannelChoice.digital_and_post + update_data["case_notification_channel"] = ( + NotificationChannelChoice.digital_and_post + ) else: # This is a guard against the scenario where a deployment is # configured to use an older version of the klanten backend (that @@ -435,7 +435,6 @@ def retrieve_objectcontactmoment( def retrieve_objectcontactmomenten_for_object_type( self, contactmoment: ContactMoment, object_type: str ) -> list[ObjectContactMoment]: - moments = self.retrieve_objectcontactmomenten_for_contactmoment(contactmoment) # eSuite doesn't implement a `object_type` query parameter @@ -597,7 +596,6 @@ def _build_question_dto( kcm: KlantContactMoment, local_kcm_mapping: dict[str, KlantContactMomentAnswer] | None = None, ) -> Question: - if isinstance(kcm.contactmoment, str): raise ValueError("Received unresolved contactmoment") @@ -956,7 +954,6 @@ def get_or_create_partij_for_user( partij = persoon elif kvk := fetch_params.get("user_kvk_or_rsin"): - # Prefer vestigingsnummer if present, to stay consistent with OK1 behavior organisatie: Partij | None if vestigingsnummer := fetch_params.get("vestigingsnummer"): @@ -1130,7 +1127,6 @@ def update_partij_from_user(self, partij_uuid: str, user: User): def create_question( self, partij_uuid: str, question: str, subject: str ) -> OpenKlant2Question: - if len(question.rstrip()) == 0: raise ValueError("You must provide a question") @@ -1257,13 +1253,12 @@ def questions_for_partij(self, partij_uuid: str) -> list[OpenKlant2Question]: for klantcontact in self.klantcontacten_for_partij( partij_uuid, kanaal=self.config.mijn_vragen_kanaal ): - klantcontact_uuid_to_klantcontact_object[ - klantcontact["uuid"] - ] = klantcontact + klantcontact_uuid_to_klantcontact_object[klantcontact["uuid"]] = ( + klantcontact + ) # A klantcontact is an answer if it is linked to a Question via an onderwerp object if onderwerp_objecten := klantcontact["gingOverOnderwerpobjecten"]: - # To which question klantcontact is this an answer? answer_onderwerp_object = self.client.onderwerp_object.retrieve( onderwerp_objecten[0]["uuid"] diff --git a/src/open_inwoner/openklant/tests/helpers.py b/src/open_inwoner/openklant/tests/helpers.py index 31793f2429..52adecda98 100644 --- a/src/open_inwoner/openklant/tests/helpers.py +++ b/src/open_inwoner/openklant/tests/helpers.py @@ -1,5 +1,4 @@ from django.test import TestCase as DjangoTestCase - from typing_extensions import TypedDict from vcr.record_mode import RecordMode from vcr.unittest import VCRMixin diff --git a/src/open_inwoner/openklant/tests/test_contactform.py b/src/open_inwoner/openklant/tests/test_contactform.py index 477fd87eba..404e41bf2c 100644 --- a/src/open_inwoner/openklant/tests/test_contactform.py +++ b/src/open_inwoner/openklant/tests/test_contactform.py @@ -1,12 +1,11 @@ from unittest.mock import patch +import requests_mock from django.contrib import messages from django.core import mail from django.test import modify_settings from django.urls import reverse from django.utils.translation import gettext as _ - -import requests_mock from django_webtest import WebTest from open_inwoner.accounts.tests.factories import UserFactory diff --git a/src/open_inwoner/openklant/tests/test_esuite_vragen_service.py b/src/open_inwoner/openklant/tests/test_esuite_vragen_service.py index 99cfa248cc..cdbf454706 100644 --- a/src/open_inwoner/openklant/tests/test_esuite_vragen_service.py +++ b/src/open_inwoner/openklant/tests/test_esuite_vragen_service.py @@ -1,8 +1,7 @@ from datetime import datetime -from django.test import TestCase, override_settings - import requests_mock +from django.test import TestCase, override_settings from open_inwoner.accounts.tests.factories import UserFactory from open_inwoner.openklant.constants import KlantenServiceType, Status diff --git a/src/open_inwoner/openklant/tests/test_fetch.py b/src/open_inwoner/openklant/tests/test_fetch.py index 30c179d130..4aa3ea4b22 100644 --- a/src/open_inwoner/openklant/tests/test_fetch.py +++ b/src/open_inwoner/openklant/tests/test_fetch.py @@ -1,6 +1,5 @@ -from django.test import TestCase - import requests_mock +from django.test import TestCase from open_inwoner.openklant.api_models import KlantContactMoment from open_inwoner.openklant.tests.data import MockAPIReadData diff --git a/src/open_inwoner/openklant/tests/test_helpers.py b/src/open_inwoner/openklant/tests/test_helpers.py index 8a6bbc6556..0acb67feea 100644 --- a/src/open_inwoner/openklant/tests/test_helpers.py +++ b/src/open_inwoner/openklant/tests/test_helpers.py @@ -1,6 +1,5 @@ -from django.test import TestCase - import requests_mock +from django.test import TestCase from open_inwoner.openklant.models import KlantContactMomentAnswer from open_inwoner.openklant.tests.data import MockAPIReadData diff --git a/src/open_inwoner/openklant/tests/test_openklant2_service.py b/src/open_inwoner/openklant/tests/test_openklant2_service.py index 8e5a4dbbaa..274df7d5df 100644 --- a/src/open_inwoner/openklant/tests/test_openklant2_service.py +++ b/src/open_inwoner/openklant/tests/test_openklant2_service.py @@ -1,8 +1,7 @@ import datetime -from django.test import tag - import freezegun +from django.test import tag from open_inwoner.accounts.models import User from open_inwoner.accounts.tests.factories import UserFactory @@ -305,9 +304,7 @@ def test_update_partij_from_user(self): ) -QUESTION_DATE = datetime.datetime( - 2024, 10, 2, 14, 0, 25, 587564, tzinfo=datetime.timezone.utc -) +QUESTION_DATE = datetime.datetime(2024, 10, 2, 14, 0, 25, 587564, tzinfo=datetime.UTC) @tag("openklant2") diff --git a/src/open_inwoner/openklant/tests/test_signal.py b/src/open_inwoner/openklant/tests/test_signal.py index 8936771c0f..b9fa7c7dce 100644 --- a/src/open_inwoner/openklant/tests/test_signal.py +++ b/src/open_inwoner/openklant/tests/test_signal.py @@ -1,7 +1,6 @@ +import requests_mock from django.contrib.auth import user_logged_in from django.test import RequestFactory - -import requests_mock from django_webtest import WebTest from open_inwoner.accounts.choices import LoginTypeChoices, NotificationChannelChoice diff --git a/src/open_inwoner/openklant/tests/test_views.py b/src/open_inwoner/openklant/tests/test_views.py index 26c34e3e04..af3b211d2f 100644 --- a/src/open_inwoner/openklant/tests/test_views.py +++ b/src/open_inwoner/openklant/tests/test_views.py @@ -3,12 +3,11 @@ from unittest.mock import patch from uuid import uuid4 +import requests_mock from django.contrib.auth import signals from django.test import modify_settings, override_settings from django.urls import reverse from django.utils.translation import gettext as _ - -import requests_mock from django_webtest import TransactionWebTest from freezegun import freeze_time from pyquery import PyQuery diff --git a/src/open_inwoner/openklant/views/contactform.py b/src/open_inwoner/openklant/views/contactform.py index ff0104462f..58baf08879 100644 --- a/src/open_inwoner/openklant/views/contactform.py +++ b/src/open_inwoner/openklant/views/contactform.py @@ -6,7 +6,6 @@ from django.utils.http import url_has_allowed_host_and_scheme from django.utils.translation import gettext_lazy as _ from django.views.generic import FormView - from mail_editor.helpers import find_template from view_breadcrumbs import BaseBreadcrumbMixin diff --git a/src/open_inwoner/openzaak/admin.py b/src/open_inwoner/openzaak/admin.py index 10bec8e2e7..d1bfc6cb7f 100644 --- a/src/open_inwoner/openzaak/admin.py +++ b/src/open_inwoner/openzaak/admin.py @@ -11,8 +11,8 @@ from django.template.response import TemplateResponse from django.urls import path, reverse from django.utils.html import format_html, format_html_join -from django.utils.translation import gettext_lazy as _, ngettext - +from django.utils.translation import gettext_lazy as _ +from django.utils.translation import ngettext from privates.storages import PrivateMediaFileSystemStorage from solo.admin import SingletonModelAdmin @@ -145,9 +145,9 @@ def export_catalogus_configs(modeladmin, request, queryset): export.as_jsonl_iter(), content_type="application/json", ) - response[ - "Content-Disposition" - ] = 'attachment; filename="zgw-catalogi-export.json"' + response["Content-Disposition"] = ( + 'attachment; filename="zgw-catalogi-export.json"' + ) return response def process_file_view(self, request): @@ -453,9 +453,9 @@ def export_zaaktype_configs(modeladmin, request, queryset): export.as_jsonl_iter(), content_type="application/json", ) - response[ - "Content-Disposition" - ] = 'attachment; filename="zgw-zaaktype-export.json"' + response["Content-Disposition"] = ( + 'attachment; filename="zgw-zaaktype-export.json"' + ) return response def process_file_view(self, request): diff --git a/src/open_inwoner/openzaak/api_models.py b/src/open_inwoner/openzaak/api_models.py index 0b58d4448e..a011112d9e 100644 --- a/src/open_inwoner/openzaak/api_models.py +++ b/src/open_inwoner/openzaak/api_models.py @@ -2,11 +2,10 @@ import re from dataclasses import dataclass, field from datetime import date, datetime -from typing import Optional, Union - -from django.utils.translation import gettext as _ +from typing import Union from dateutil.relativedelta import relativedelta +from django.utils.translation import gettext as _ from zgw_consumers.api_models.base import Model, ZGWModel from zgw_consumers.api_models.constants import RolOmschrijving, RolTypes @@ -32,12 +31,12 @@ class Zaak(ZGWModel): registratiedatum: date startdatum: date vertrouwelijkheidaanduiding: str - status: Optional[Union[str, "Status"]] - einddatum_gepland: Optional[date] = None - uiterlijke_einddatum_afdoening: Optional[date] = None + status: Union[str, "Status"] | None + einddatum_gepland: date | None = None + uiterlijke_einddatum_afdoening: date | None = None # publicatiedatum: Optional[date] - einddatum: Optional[date] = None - resultaat: Optional[Union[str, "Resultaat"]] = None + einddatum: date | None = None + resultaat: Union[str, "Resultaat"] | None = None # relevante_andere_zaken: list # zaakgeometrie: dict @@ -155,21 +154,21 @@ class ZaakType(ZGWModel): # roltypen: list # besluittypen: list - begin_geldigheid: Optional[date] = None - einde_geldigheid: Optional[date] = None - versiedatum: Optional[date] = None - concept: Optional[bool] = None + begin_geldigheid: date | None = None + einde_geldigheid: date | None = None + versiedatum: date | None = None + concept: bool | None = None @dataclass class ZaakInformatieObject(ZGWModel): url: str informatieobject: Union[str, "InformatieObject"] - zaak: Union[str, Zaak] + zaak: str | Zaak # aard_relatie_weergave: str titel: str # beschrijving: str - registratiedatum: Optional[datetime] + registratiedatum: datetime | None @dataclass @@ -178,8 +177,8 @@ class InformatieObjectType(ZGWModel): catalogus: str omschrijving: str vertrouwelijkheidaanduiding: str - begin_geldigheid: Optional[date] = None - einde_geldigheid: Optional[date] = None + begin_geldigheid: date | None = None + einde_geldigheid: date | None = None concept: bool = False @@ -201,15 +200,15 @@ class InformatieObject(ZGWModel): inhoud: str bestandsomvang: int # indicatieGebruiksrecht: str - informatieobjecttype: Union[str, InformatieObjectType] + informatieobjecttype: str | InformatieObjectType locked: bool # bestandsdelen: List[str] - beschrijving: Optional[str] = "" - link: Optional[str] = "" - ontvangstdatum: Optional[str] = "" - verzenddatum: Optional[str] = "" - ondertekening: Optional[dict] = None # {'soort': '', 'datum': None} - integriteit: Optional[dict] = None # {'algoritme': '', 'waarde': '', 'datum': None} + beschrijving: str | None = "" + link: str | None = "" + ontvangstdatum: str | None = "" + verzenddatum: str | None = "" + ondertekening: dict | None = None # {'soort': '', 'datum': None} + integriteit: dict | None = None # {'algoritme': '', 'waarde': '', 'datum': None} @dataclass @@ -225,14 +224,14 @@ class Rol(ZGWModel): url: str zaak: str betrokkene_type: str - roltype: Union[str, RolType] + roltype: str | RolType omschrijving: str omschrijving_generiek: str roltoelichting: str - indicatie_machtiging: Optional[str] = "" - registratiedatum: Optional[datetime] = None - betrokkene: Optional[str] = "" - betrokkene_identificatie: Optional[dict] = None + indicatie_machtiging: str | None = "" + registratiedatum: datetime | None = None + betrokkene: str | None = "" + betrokkene_identificatie: dict | None = None def get_betrokkene_type_display(self): return RolTypes[self.betrokkene_type].label @@ -252,8 +251,8 @@ class ResultaatType(ZGWModel): omschrijving_generiek: str = "" toelichting: str = "" archiefnominatie: str = "" - archiefactietermijn: Optional[relativedelta] = None - brondatum_archiefprocedure: Optional[dict] = None + archiefactietermijn: relativedelta | None = None + brondatum_archiefprocedure: dict | None = None # E-suite compatibility # result description ("omschrijving") with >20 chars @@ -263,9 +262,9 @@ class ResultaatType(ZGWModel): @dataclass class Resultaat(ZGWModel): url: str - zaak: Union[str, Zaak] - resultaattype: Union[str, ResultaatType] - toelichting: Optional[str] = "" + zaak: str | Zaak + resultaattype: str | ResultaatType + toelichting: str | None = "" @dataclass @@ -273,21 +272,21 @@ class StatusType(ZGWModel): url: str # bug: not required according to OAS zaaktype: str omschrijving: str - volgnummer: Optional[int] # not in eSuite + volgnummer: int | None # not in eSuite omschrijving_generiek: str = "" statustekst: str = "" is_eindstatus: bool = False # not in eSuite - informeren: Optional[bool] = False + informeren: bool | None = False @dataclass class Status(ZGWModel): url: str - zaak: Union[str, Zaak] - statustype: Union[str, StatusType] - datum_status_gezet: Optional[datetime] = None - statustoelichting: Optional[str] = "" + zaak: str | Zaak + statustype: str | StatusType + datum_status_gezet: datetime | None = None + statustoelichting: str | None = "" @dataclass @@ -325,8 +324,8 @@ class OpenSubmission(Model): uuid: str naam: str datum_laatste_wijziging: datetime - vervolg_link: Optional[str] = None - eind_datum_geldigheid: Optional[datetime] = None + vervolg_link: str | None = None + eind_datum_geldigheid: datetime | None = None @property def identification(self) -> str: diff --git a/src/open_inwoner/openzaak/clients.py b/src/open_inwoner/openzaak/clients.py index 68fe7a30ba..86c877d7d1 100644 --- a/src/open_inwoner/openzaak/clients.py +++ b/src/open_inwoner/openzaak/clients.py @@ -2,15 +2,15 @@ import concurrent.futures import logging import warnings +from collections.abc import Mapping from dataclasses import dataclass from datetime import date -from typing import Any, Literal, Mapping, Type, TypeAlias, TypeVar +from typing import Any, Literal, TypeAlias, TypeVar +from ape_pie.client import APIClient from django.conf import settings from django.core.files.uploadedfile import InMemoryUploadedFile from django.utils.functional import SimpleLazyObject - -from ape_pie.client import APIClient from requests import HTTPError, RequestException, Response from zgw_consumers.api_models.base import factory from zgw_consumers.api_models.catalogi import Catalogus @@ -883,7 +883,7 @@ def wrapper(*args, **kwargs): def build_zgw_client_from_service(service: Service) -> ZgwClientFactoryReturn: - services_to_client_mapping: Mapping[str, Type[ZgwClientFactoryReturn]] = { + services_to_client_mapping: Mapping[str, type[ZgwClientFactoryReturn]] = { APITypes.zrc: ZakenClient, APITypes.ztc: CatalogiClient, APITypes.drc: DocumentenClient, diff --git a/src/open_inwoner/openzaak/exceptions.py b/src/open_inwoner/openzaak/exceptions.py index ff20d4b4f5..00e6e5904e 100644 --- a/src/open_inwoner/openzaak/exceptions.py +++ b/src/open_inwoner/openzaak/exceptions.py @@ -1,4 +1,4 @@ -from typing import Sequence +from collections.abc import Sequence class InvalidAuth(Exception): diff --git a/src/open_inwoner/openzaak/import_export.py b/src/open_inwoner/openzaak/import_export.py index 6fbcc7a2cf..02d30098a1 100644 --- a/src/open_inwoner/openzaak/import_export.py +++ b/src/open_inwoner/openzaak/import_export.py @@ -3,7 +3,8 @@ import json import logging from collections import defaultdict -from typing import IO, Any, Generator, Self +from collections.abc import Generator +from typing import IO, Any, Self from urllib.parse import urlparse from django.apps import apps @@ -183,7 +184,7 @@ def __iter__(self) -> Generator[QuerySet, Any, None]: ) def __eq__(self, other: QuerySet) -> bool: - for a, b in zip(self, other): + for a, b in zip(self, other, strict=False): if a.difference(b).exists(): return False return True diff --git a/src/open_inwoner/openzaak/migrations/0001_initial.py b/src/open_inwoner/openzaak/migrations/0001_initial.py index 2a855c97e4..395a22ef87 100644 --- a/src/open_inwoner/openzaak/migrations/0001_initial.py +++ b/src/open_inwoner/openzaak/migrations/0001_initial.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - initial = True dependencies = [ diff --git a/src/open_inwoner/openzaak/migrations/0002_auto_20220128_1323.py b/src/open_inwoner/openzaak/migrations/0002_auto_20220128_1323.py index 6aa470de03..606561fc10 100644 --- a/src/open_inwoner/openzaak/migrations/0002_auto_20220128_1323.py +++ b/src/open_inwoner/openzaak/migrations/0002_auto_20220128_1323.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - dependencies = [ ("zgw_consumers", "0013_oas_field"), ("openzaak", "0001_initial"), diff --git a/src/open_inwoner/openzaak/migrations/0003_openzaakconfig_document_service.py b/src/open_inwoner/openzaak/migrations/0003_openzaakconfig_document_service.py index 22e5b98f8b..a1810cad92 100644 --- a/src/open_inwoner/openzaak/migrations/0003_openzaakconfig_document_service.py +++ b/src/open_inwoner/openzaak/migrations/0003_openzaakconfig_document_service.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - dependencies = [ ("zgw_consumers", "0015_auto_20220307_1522"), ("openzaak", "0002_auto_20220128_1323"), diff --git a/src/open_inwoner/openzaak/migrations/0004_openzaakconfig_document_max_confidentiality.py b/src/open_inwoner/openzaak/migrations/0004_openzaakconfig_document_max_confidentiality.py index 3586c28b69..b64b7e570d 100644 --- a/src/open_inwoner/openzaak/migrations/0004_openzaakconfig_document_max_confidentiality.py +++ b/src/open_inwoner/openzaak/migrations/0004_openzaakconfig_document_max_confidentiality.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("openzaak", "0003_openzaakconfig_document_service"), ] diff --git a/src/open_inwoner/openzaak/migrations/0005_openzaakconfig_zaak_max_confidentiality.py b/src/open_inwoner/openzaak/migrations/0005_openzaakconfig_zaak_max_confidentiality.py index aac8001870..2658294d54 100644 --- a/src/open_inwoner/openzaak/migrations/0005_openzaakconfig_zaak_max_confidentiality.py +++ b/src/open_inwoner/openzaak/migrations/0005_openzaakconfig_zaak_max_confidentiality.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("openzaak", "0004_openzaakconfig_document_max_confidentiality"), ] diff --git a/src/open_inwoner/openzaak/migrations/0006_auto_20230123_1619.py b/src/open_inwoner/openzaak/migrations/0006_auto_20230123_1619.py index bbd4d193d0..2d97233755 100644 --- a/src/open_inwoner/openzaak/migrations/0006_auto_20230123_1619.py +++ b/src/open_inwoner/openzaak/migrations/0006_auto_20230123_1619.py @@ -1,11 +1,10 @@ # Generated by Django 3.2.15 on 2023-01-23 15:19 -from django.db import migrations, models import django_jsonform.models.fields +from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ("openzaak", "0005_openzaakconfig_zaak_max_confidentiality"), ] diff --git a/src/open_inwoner/openzaak/migrations/0007_alter_openzaakconfig_allowed_file_extensions.py b/src/open_inwoner/openzaak/migrations/0007_alter_openzaakconfig_allowed_file_extensions.py index 38178cb101..138fdcf848 100644 --- a/src/open_inwoner/openzaak/migrations/0007_alter_openzaakconfig_allowed_file_extensions.py +++ b/src/open_inwoner/openzaak/migrations/0007_alter_openzaakconfig_allowed_file_extensions.py @@ -1,12 +1,12 @@ # Generated by Django 3.2.15 on 2023-01-25 10:12 -from django.db import migrations, models import django_jsonform.models.fields +from django.db import migrations, models + import open_inwoner.openzaak.models class Migration(migrations.Migration): - dependencies = [ ("openzaak", "0006_auto_20230123_1619"), ] diff --git a/src/open_inwoner/openzaak/migrations/0008_auto_20230126_1034.py b/src/open_inwoner/openzaak/migrations/0008_auto_20230126_1034.py index e9397e2575..6818cd516d 100644 --- a/src/open_inwoner/openzaak/migrations/0008_auto_20230126_1034.py +++ b/src/open_inwoner/openzaak/migrations/0008_auto_20230126_1034.py @@ -7,7 +7,6 @@ class Migration(migrations.Migration): - dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ("openzaak", "0007_alter_openzaakconfig_allowed_file_extensions"), diff --git a/src/open_inwoner/openzaak/migrations/0009_auto_20230131_1253.py b/src/open_inwoner/openzaak/migrations/0009_auto_20230131_1253.py index aaf7967c8f..be8341af5f 100644 --- a/src/open_inwoner/openzaak/migrations/0009_auto_20230131_1253.py +++ b/src/open_inwoner/openzaak/migrations/0009_auto_20230131_1253.py @@ -1,13 +1,11 @@ # Generated by Django 3.2.15 on 2023-01-31 11:53 import django.db.models.deletion -from django.db import migrations, models - import django_jsonform.models.fields +from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ("openzaak", "0008_auto_20230126_1034"), ] diff --git a/src/open_inwoner/openzaak/migrations/0010_openzaakconfig_reformat_esuite_zaak_identificatie.py b/src/open_inwoner/openzaak/migrations/0010_openzaakconfig_reformat_esuite_zaak_identificatie.py index 4794120f66..8eeb1d08d0 100644 --- a/src/open_inwoner/openzaak/migrations/0010_openzaakconfig_reformat_esuite_zaak_identificatie.py +++ b/src/open_inwoner/openzaak/migrations/0010_openzaakconfig_reformat_esuite_zaak_identificatie.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("openzaak", "0009_auto_20230131_1253"), ] diff --git a/src/open_inwoner/openzaak/migrations/0011_auto_20230207_1030.py b/src/open_inwoner/openzaak/migrations/0011_auto_20230207_1030.py index c73232f351..ddf6e60a47 100644 --- a/src/open_inwoner/openzaak/migrations/0011_auto_20230207_1030.py +++ b/src/open_inwoner/openzaak/migrations/0011_auto_20230207_1030.py @@ -1,13 +1,12 @@ # Generated by Django 3.2.15 on 2023-02-07 09:30 -from django.conf import settings -from django.db import migrations, models import django.db.models.deletion import django.utils.timezone +from django.conf import settings +from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ("openzaak", "0010_openzaakconfig_reformat_esuite_zaak_identificatie"), diff --git a/src/open_inwoner/openzaak/migrations/0012_zaaktypeinformatieobjecttypeconfig_document_notification_enabled.py b/src/open_inwoner/openzaak/migrations/0012_zaaktypeinformatieobjecttypeconfig_document_notification_enabled.py index 9aada59ba9..ee0ccd1710 100644 --- a/src/open_inwoner/openzaak/migrations/0012_zaaktypeinformatieobjecttypeconfig_document_notification_enabled.py +++ b/src/open_inwoner/openzaak/migrations/0012_zaaktypeinformatieobjecttypeconfig_document_notification_enabled.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("openzaak", "0011_auto_20230207_1030"), ] diff --git a/src/open_inwoner/openzaak/migrations/0013_auto_20230209_1053.py b/src/open_inwoner/openzaak/migrations/0013_auto_20230209_1053.py index d7d449b4fb..d6ec825ea1 100644 --- a/src/open_inwoner/openzaak/migrations/0013_auto_20230209_1053.py +++ b/src/open_inwoner/openzaak/migrations/0013_auto_20230209_1053.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ( "openzaak", diff --git a/src/open_inwoner/openzaak/migrations/0014_auto_20230209_1055.py b/src/open_inwoner/openzaak/migrations/0014_auto_20230209_1055.py index 978a60b459..43c4e7a1ca 100644 --- a/src/open_inwoner/openzaak/migrations/0014_auto_20230209_1055.py +++ b/src/open_inwoner/openzaak/migrations/0014_auto_20230209_1055.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - dependencies = [ ("openzaak", "0013_auto_20230209_1053"), ] diff --git a/src/open_inwoner/openzaak/migrations/0015_openzaakconfig_form_service.py b/src/open_inwoner/openzaak/migrations/0015_openzaakconfig_form_service.py index 3f479c4fa1..3f34058d01 100644 --- a/src/open_inwoner/openzaak/migrations/0015_openzaakconfig_form_service.py +++ b/src/open_inwoner/openzaak/migrations/0015_openzaakconfig_form_service.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - dependencies = [ ("zgw_consumers", "0016_auto_20220818_1412"), ("openzaak", "0014_auto_20230209_1055"), diff --git a/src/open_inwoner/openzaak/migrations/0016_alter_zaaktypeconfig_document_upload_enabled.py b/src/open_inwoner/openzaak/migrations/0016_alter_zaaktypeconfig_document_upload_enabled.py index 9fdadab4a4..020f7d48de 100644 --- a/src/open_inwoner/openzaak/migrations/0016_alter_zaaktypeconfig_document_upload_enabled.py +++ b/src/open_inwoner/openzaak/migrations/0016_alter_zaaktypeconfig_document_upload_enabled.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("openzaak", "0015_openzaakconfig_form_service"), ] diff --git a/src/open_inwoner/openzaak/migrations/0017_auto_20230331_1418.py b/src/open_inwoner/openzaak/migrations/0017_auto_20230331_1418.py index a0f6e4e7c4..def55f6392 100644 --- a/src/open_inwoner/openzaak/migrations/0017_auto_20230331_1418.py +++ b/src/open_inwoner/openzaak/migrations/0017_auto_20230331_1418.py @@ -1,11 +1,10 @@ # Generated by Django 3.2.15 on 2023-03-31 12:18 -from django.db import migrations, models import django.db.models.deletion +from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ("zgw_consumers", "0016_auto_20220818_1412"), ("openzaak", "0016_alter_zaaktypeconfig_document_upload_enabled"), diff --git a/src/open_inwoner/openzaak/migrations/0018_zaaktypeconfig_description.py b/src/open_inwoner/openzaak/migrations/0018_zaaktypeconfig_description.py index d8613ee14e..996f95c137 100644 --- a/src/open_inwoner/openzaak/migrations/0018_zaaktypeconfig_description.py +++ b/src/open_inwoner/openzaak/migrations/0018_zaaktypeconfig_description.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("openzaak", "0017_auto_20230331_1418"), ] diff --git a/src/open_inwoner/openzaak/migrations/0021_add_is_sent_to_notification_records.py b/src/open_inwoner/openzaak/migrations/0021_add_is_sent_to_notification_records.py index cb9a9d396d..309c8865be 100644 --- a/src/open_inwoner/openzaak/migrations/0021_add_is_sent_to_notification_records.py +++ b/src/open_inwoner/openzaak/migrations/0021_add_is_sent_to_notification_records.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ( "openzaak", diff --git a/src/open_inwoner/openzaak/migrations/0021_statustranslation.py b/src/open_inwoner/openzaak/migrations/0021_statustranslation.py index 892e37aff3..bce13dbccb 100644 --- a/src/open_inwoner/openzaak/migrations/0021_statustranslation.py +++ b/src/open_inwoner/openzaak/migrations/0021_statustranslation.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ( "openzaak", diff --git a/src/open_inwoner/openzaak/migrations/0022_mark_as_is_sent.py b/src/open_inwoner/openzaak/migrations/0022_mark_as_is_sent.py index 43a956a959..38221a5e92 100644 --- a/src/open_inwoner/openzaak/migrations/0022_mark_as_is_sent.py +++ b/src/open_inwoner/openzaak/migrations/0022_mark_as_is_sent.py @@ -15,7 +15,6 @@ def mark_as_is_sent(apps, schema_editor): class Migration(migrations.Migration): - dependencies = [ ("openzaak", "0021_add_is_sent_to_notification_records"), ] diff --git a/src/open_inwoner/openzaak/migrations/0023_merge_0021_statustranslation_0022_mark_as_is_sent.py b/src/open_inwoner/openzaak/migrations/0023_merge_0021_statustranslation_0022_mark_as_is_sent.py index 1f4b6c241e..dfd30268fc 100644 --- a/src/open_inwoner/openzaak/migrations/0023_merge_0021_statustranslation_0022_mark_as_is_sent.py +++ b/src/open_inwoner/openzaak/migrations/0023_merge_0021_statustranslation_0022_mark_as_is_sent.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("openzaak", "0021_statustranslation"), ("openzaak", "0022_mark_as_is_sent"), diff --git a/src/open_inwoner/openzaak/migrations/0024_zaaktypeconfig_contact_subject_code.py b/src/open_inwoner/openzaak/migrations/0024_zaaktypeconfig_contact_subject_code.py index ba8b8abf49..7ee904175c 100644 --- a/src/open_inwoner/openzaak/migrations/0024_zaaktypeconfig_contact_subject_code.py +++ b/src/open_inwoner/openzaak/migrations/0024_zaaktypeconfig_contact_subject_code.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("openzaak", "0023_merge_0021_statustranslation_0022_mark_as_is_sent"), ] diff --git a/src/open_inwoner/openzaak/migrations/0025_auto_20231016_0957.py b/src/open_inwoner/openzaak/migrations/0025_auto_20231016_0957.py index 0510008d52..120a6d4ae4 100644 --- a/src/open_inwoner/openzaak/migrations/0025_auto_20231016_0957.py +++ b/src/open_inwoner/openzaak/migrations/0025_auto_20231016_0957.py @@ -1,12 +1,11 @@ # Generated by Django 3.2.20 on 2023-10-16 07:57 -from django.db import migrations, models import django.db.models.deletion import django_jsonform.models.fields +from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ("openzaak", "0024_zaaktypeconfig_contact_subject_code"), ] diff --git a/src/open_inwoner/openzaak/migrations/0025_openzaakconfig_title_text.py b/src/open_inwoner/openzaak/migrations/0025_openzaakconfig_title_text.py index 812c3b6352..a57eec50b7 100644 --- a/src/open_inwoner/openzaak/migrations/0025_openzaakconfig_title_text.py +++ b/src/open_inwoner/openzaak/migrations/0025_openzaakconfig_title_text.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("openzaak", "0024_zaaktypeconfig_contact_subject_code"), ] diff --git a/src/open_inwoner/openzaak/migrations/0026_merge_20231024_0949.py b/src/open_inwoner/openzaak/migrations/0026_merge_20231024_0949.py index c4268d0751..ee67e7d570 100644 --- a/src/open_inwoner/openzaak/migrations/0026_merge_20231024_0949.py +++ b/src/open_inwoner/openzaak/migrations/0026_merge_20231024_0949.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("openzaak", "0025_auto_20231016_0957"), ("openzaak", "0025_openzaakconfig_title_text"), diff --git a/src/open_inwoner/openzaak/migrations/0026_zaaktypestatustypeconfig_document_upload_description.py b/src/open_inwoner/openzaak/migrations/0026_zaaktypestatustypeconfig_document_upload_description.py index 04bbc7f8c3..483ac4eadb 100644 --- a/src/open_inwoner/openzaak/migrations/0026_zaaktypestatustypeconfig_document_upload_description.py +++ b/src/open_inwoner/openzaak/migrations/0026_zaaktypestatustypeconfig_document_upload_description.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("openzaak", "0026_merge_20231024_0949"), ] diff --git a/src/open_inwoner/openzaak/migrations/0027_auto_20231101_1641.py b/src/open_inwoner/openzaak/migrations/0027_auto_20231101_1641.py index f2780b7476..0f6cf7108d 100644 --- a/src/open_inwoner/openzaak/migrations/0027_auto_20231101_1641.py +++ b/src/open_inwoner/openzaak/migrations/0027_auto_20231101_1641.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("openzaak", "0026_zaaktypestatustypeconfig_document_upload_description"), ] diff --git a/src/open_inwoner/openzaak/migrations/0027_zaaktype_resultaattype_config.py b/src/open_inwoner/openzaak/migrations/0027_zaaktype_resultaattype_config.py index c935811dc4..ab73bc2dc6 100644 --- a/src/open_inwoner/openzaak/migrations/0027_zaaktype_resultaattype_config.py +++ b/src/open_inwoner/openzaak/migrations/0027_zaaktype_resultaattype_config.py @@ -1,12 +1,11 @@ # Generated by Django 3.2.20 on 2023-10-26 10:05 -from django.db import migrations, models import django.db.models.deletion import django_jsonform.models.fields +from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ("openzaak", "0026_zaaktypestatustypeconfig_document_upload_description"), ] diff --git a/src/open_inwoner/openzaak/migrations/0028_merge_20231101_1705.py b/src/open_inwoner/openzaak/migrations/0028_merge_20231101_1705.py index bbf3c5cc47..2ba29cf06b 100644 --- a/src/open_inwoner/openzaak/migrations/0028_merge_20231101_1705.py +++ b/src/open_inwoner/openzaak/migrations/0028_merge_20231101_1705.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("openzaak", "0027_auto_20231101_1641"), ("openzaak", "0027_zaaktype_resultaattype_config"), diff --git a/src/open_inwoner/openzaak/migrations/0028_zaaktype_statustype_button.py b/src/open_inwoner/openzaak/migrations/0028_zaaktype_statustype_button.py index 7b737fb68d..98d2134bc8 100644 --- a/src/open_inwoner/openzaak/migrations/0028_zaaktype_statustype_button.py +++ b/src/open_inwoner/openzaak/migrations/0028_zaaktype_statustype_button.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("openzaak", "0027_zaaktype_resultaattype_config"), ] diff --git a/src/open_inwoner/openzaak/migrations/0029_auto_20231113_1459.py b/src/open_inwoner/openzaak/migrations/0029_auto_20231113_1459.py index fe72c5ef77..db666fa4fc 100644 --- a/src/open_inwoner/openzaak/migrations/0029_auto_20231113_1459.py +++ b/src/open_inwoner/openzaak/migrations/0029_auto_20231113_1459.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("openzaak", "0028_merge_20231101_1705"), ] diff --git a/src/open_inwoner/openzaak/migrations/0029_merge_20231107_1355.py b/src/open_inwoner/openzaak/migrations/0029_merge_20231107_1355.py index 1dcdf537c9..3cbbea343a 100644 --- a/src/open_inwoner/openzaak/migrations/0029_merge_20231107_1355.py +++ b/src/open_inwoner/openzaak/migrations/0029_merge_20231107_1355.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("openzaak", "0028_merge_20231101_1705"), ("openzaak", "0028_zaaktype_statustype_button"), diff --git a/src/open_inwoner/openzaak/migrations/0029_zaaktypestatustypeconfig_description.py b/src/open_inwoner/openzaak/migrations/0029_zaaktypestatustypeconfig_description.py index d6e714cee1..5f4521a263 100644 --- a/src/open_inwoner/openzaak/migrations/0029_zaaktypestatustypeconfig_description.py +++ b/src/open_inwoner/openzaak/migrations/0029_zaaktypestatustypeconfig_description.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("openzaak", "0028_merge_20231101_1705"), ] diff --git a/src/open_inwoner/openzaak/migrations/0030_merge_20231113_1518.py b/src/open_inwoner/openzaak/migrations/0030_merge_20231113_1518.py index 8e0c011d03..cd48d8fd49 100644 --- a/src/open_inwoner/openzaak/migrations/0030_merge_20231113_1518.py +++ b/src/open_inwoner/openzaak/migrations/0030_merge_20231113_1518.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("openzaak", "0029_auto_20231113_1459"), ("openzaak", "0029_zaaktypestatustypeconfig_description"), diff --git a/src/open_inwoner/openzaak/migrations/0031_merge_20231114_1400.py b/src/open_inwoner/openzaak/migrations/0031_merge_20231114_1400.py index 0e5be2f24f..90bdd9548c 100644 --- a/src/open_inwoner/openzaak/migrations/0031_merge_20231114_1400.py +++ b/src/open_inwoner/openzaak/migrations/0031_merge_20231114_1400.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("openzaak", "0029_merge_20231107_1355"), ("openzaak", "0030_merge_20231113_1518"), diff --git a/src/open_inwoner/openzaak/migrations/0032_alter_zaaktypestatustypeconfig_show_document_uploads.py b/src/open_inwoner/openzaak/migrations/0032_alter_zaaktypestatustypeconfig_show_document_uploads.py index 66af96df25..a9bbf91f8d 100644 --- a/src/open_inwoner/openzaak/migrations/0032_alter_zaaktypestatustypeconfig_show_document_uploads.py +++ b/src/open_inwoner/openzaak/migrations/0032_alter_zaaktypestatustypeconfig_show_document_uploads.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("openzaak", "0031_merge_20231114_1400"), ] diff --git a/src/open_inwoner/openzaak/migrations/0033_openzaakconfig_enable_categories_filtering_with_zaken.py b/src/open_inwoner/openzaak/migrations/0033_openzaakconfig_enable_categories_filtering_with_zaken.py index bc5e932649..84dfed7fe1 100644 --- a/src/open_inwoner/openzaak/migrations/0033_openzaakconfig_enable_categories_filtering_with_zaken.py +++ b/src/open_inwoner/openzaak/migrations/0033_openzaakconfig_enable_categories_filtering_with_zaken.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("openzaak", "0032_alter_zaaktypestatustypeconfig_show_document_uploads"), ] diff --git a/src/open_inwoner/openzaak/migrations/0034_zaaktypeconfig_urls.py b/src/open_inwoner/openzaak/migrations/0034_zaaktypeconfig_urls.py index ae56b90b2b..5524a78e50 100644 --- a/src/open_inwoner/openzaak/migrations/0034_zaaktypeconfig_urls.py +++ b/src/open_inwoner/openzaak/migrations/0034_zaaktypeconfig_urls.py @@ -1,11 +1,10 @@ # Generated by Django 3.2.20 on 2023-11-20 10:06 -from django.db import migrations, models import django_jsonform.models.fields +from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ("openzaak", "0033_openzaakconfig_enable_categories_filtering_with_zaken"), ] diff --git a/src/open_inwoner/openzaak/migrations/0035_populate_zaaktypeconfig_urls.py b/src/open_inwoner/openzaak/migrations/0035_populate_zaaktypeconfig_urls.py index fe56b59a3d..6a15ecb80d 100644 --- a/src/open_inwoner/openzaak/migrations/0035_populate_zaaktypeconfig_urls.py +++ b/src/open_inwoner/openzaak/migrations/0035_populate_zaaktypeconfig_urls.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("openzaak", "0037_openzaakconfig_fetch_eherkenning_zaken_with_rsin"), ] diff --git a/src/open_inwoner/openzaak/migrations/0036_zaaktypeconfig_relevante_zaakperiode.py b/src/open_inwoner/openzaak/migrations/0036_zaaktypeconfig_relevante_zaakperiode.py index 1b68c6e024..3192045410 100644 --- a/src/open_inwoner/openzaak/migrations/0036_zaaktypeconfig_relevante_zaakperiode.py +++ b/src/open_inwoner/openzaak/migrations/0036_zaaktypeconfig_relevante_zaakperiode.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("openzaak", "0034_zaaktypeconfig_urls"), ] diff --git a/src/open_inwoner/openzaak/migrations/0037_openzaakconfig_fetch_eherkenning_zaken_with_rsin.py b/src/open_inwoner/openzaak/migrations/0037_openzaakconfig_fetch_eherkenning_zaken_with_rsin.py index 24a8467b87..0b7c770c4f 100644 --- a/src/open_inwoner/openzaak/migrations/0037_openzaakconfig_fetch_eherkenning_zaken_with_rsin.py +++ b/src/open_inwoner/openzaak/migrations/0037_openzaakconfig_fetch_eherkenning_zaken_with_rsin.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("openzaak", "0036_zaaktypeconfig_relevante_zaakperiode"), ] diff --git a/src/open_inwoner/openzaak/migrations/0037_result_description.py b/src/open_inwoner/openzaak/migrations/0037_result_description.py index 76da453c21..6636c80b4f 100644 --- a/src/open_inwoner/openzaak/migrations/0037_result_description.py +++ b/src/open_inwoner/openzaak/migrations/0037_result_description.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("openzaak", "0036_zaaktypeconfig_relevante_zaakperiode"), ] diff --git a/src/open_inwoner/openzaak/migrations/0038_auto_20231129_1212.py b/src/open_inwoner/openzaak/migrations/0038_auto_20231129_1212.py index 6ca2cf34fb..8ab7f096d6 100644 --- a/src/open_inwoner/openzaak/migrations/0038_auto_20231129_1212.py +++ b/src/open_inwoner/openzaak/migrations/0038_auto_20231129_1212.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("openzaak", "0037_result_description"), ] diff --git a/src/open_inwoner/openzaak/migrations/0038_merge_20231130_1232.py b/src/open_inwoner/openzaak/migrations/0038_merge_20231130_1232.py index 40e1080a80..0cd5893b8e 100644 --- a/src/open_inwoner/openzaak/migrations/0038_merge_20231130_1232.py +++ b/src/open_inwoner/openzaak/migrations/0038_merge_20231130_1232.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("openzaak", "0035_populate_zaaktypeconfig_urls"), ("openzaak", "0037_result_description"), diff --git a/src/open_inwoner/openzaak/migrations/0039_merge_20231130_1523.py b/src/open_inwoner/openzaak/migrations/0039_merge_20231130_1523.py index c5ef0e2c27..737f34e38c 100644 --- a/src/open_inwoner/openzaak/migrations/0039_merge_20231130_1523.py +++ b/src/open_inwoner/openzaak/migrations/0039_merge_20231130_1523.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("openzaak", "0037_openzaakconfig_fetch_eherkenning_zaken_with_rsin"), ("openzaak", "0038_merge_20231130_1232"), diff --git a/src/open_inwoner/openzaak/migrations/0040_merge_20231130_1552.py b/src/open_inwoner/openzaak/migrations/0040_merge_20231130_1552.py index 4f372e2ade..84cf7206d3 100644 --- a/src/open_inwoner/openzaak/migrations/0040_merge_20231130_1552.py +++ b/src/open_inwoner/openzaak/migrations/0040_merge_20231130_1552.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("openzaak", "0038_auto_20231129_1212"), ("openzaak", "0039_merge_20231130_1523"), diff --git a/src/open_inwoner/openzaak/migrations/0041_configuration_cases_button.py b/src/open_inwoner/openzaak/migrations/0041_configuration_cases_button.py index febaf19519..97575402b2 100644 --- a/src/open_inwoner/openzaak/migrations/0041_configuration_cases_button.py +++ b/src/open_inwoner/openzaak/migrations/0041_configuration_cases_button.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("openzaak", "0040_merge_20231130_1552"), ] diff --git a/src/open_inwoner/openzaak/migrations/0042_case_notification_mail_template_split.py b/src/open_inwoner/openzaak/migrations/0042_case_notification_mail_template_split.py index bb444a65d3..d25e8c0e45 100644 --- a/src/open_inwoner/openzaak/migrations/0042_case_notification_mail_template_split.py +++ b/src/open_inwoner/openzaak/migrations/0042_case_notification_mail_template_split.py @@ -36,7 +36,6 @@ def join_case_notification_mail_template(apps, schema_editor): class Migration(migrations.Migration): - dependencies = [ ("mail_editor", "0001_initial"), ("openzaak", "0041_configuration_cases_button"), diff --git a/src/open_inwoner/openzaak/migrations/0043_zaaktypestatustypeconfig_action_required.py b/src/open_inwoner/openzaak/migrations/0043_zaaktypestatustypeconfig_action_required.py index aecd9e5001..f960669940 100644 --- a/src/open_inwoner/openzaak/migrations/0043_zaaktypestatustypeconfig_action_required.py +++ b/src/open_inwoner/openzaak/migrations/0043_zaaktypestatustypeconfig_action_required.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("openzaak", "0042_case_notification_mail_template_split"), ] diff --git a/src/open_inwoner/openzaak/migrations/0044_openzaakconfig_action_required_deadline_days.py b/src/open_inwoner/openzaak/migrations/0044_openzaakconfig_action_required_deadline_days.py index bdc5d7e91d..d14a35c846 100644 --- a/src/open_inwoner/openzaak/migrations/0044_openzaakconfig_action_required_deadline_days.py +++ b/src/open_inwoner/openzaak/migrations/0044_openzaakconfig_action_required_deadline_days.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("openzaak", "0043_zaaktypestatustypeconfig_action_required"), ] diff --git a/src/open_inwoner/openzaak/migrations/0045_usercaseinfoobjectnotification_collision_key_and_more.py b/src/open_inwoner/openzaak/migrations/0045_usercaseinfoobjectnotification_collision_key_and_more.py index 00b0de41e0..81f5d31514 100644 --- a/src/open_inwoner/openzaak/migrations/0045_usercaseinfoobjectnotification_collision_key_and_more.py +++ b/src/open_inwoner/openzaak/migrations/0045_usercaseinfoobjectnotification_collision_key_and_more.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("openzaak", "0044_openzaakconfig_action_required_deadline_days"), ] diff --git a/src/open_inwoner/openzaak/migrations/0046_alter_openzaakconfig_fetch_eherkenning_zaken_with_rsin.py b/src/open_inwoner/openzaak/migrations/0046_alter_openzaakconfig_fetch_eherkenning_zaken_with_rsin.py index 7c96f2d4b8..709524e576 100644 --- a/src/open_inwoner/openzaak/migrations/0046_alter_openzaakconfig_fetch_eherkenning_zaken_with_rsin.py +++ b/src/open_inwoner/openzaak/migrations/0046_alter_openzaakconfig_fetch_eherkenning_zaken_with_rsin.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("openzaak", "0045_usercaseinfoobjectnotification_collision_key_and_more"), ] diff --git a/src/open_inwoner/openzaak/migrations/0047_delete_statustranslation.py b/src/open_inwoner/openzaak/migrations/0047_delete_statustranslation.py index 5c2004c0a2..833d035d47 100644 --- a/src/open_inwoner/openzaak/migrations/0047_delete_statustranslation.py +++ b/src/open_inwoner/openzaak/migrations/0047_delete_statustranslation.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("openzaak", "0048_alter_zaaktyperesultaattypeconfig_omschrijving"), ] diff --git a/src/open_inwoner/openzaak/migrations/0048_alter_zaaktyperesultaattypeconfig_omschrijving.py b/src/open_inwoner/openzaak/migrations/0048_alter_zaaktyperesultaattypeconfig_omschrijving.py index e7bbd2f9b9..5cd18bd326 100644 --- a/src/open_inwoner/openzaak/migrations/0048_alter_zaaktyperesultaattypeconfig_omschrijving.py +++ b/src/open_inwoner/openzaak/migrations/0048_alter_zaaktyperesultaattypeconfig_omschrijving.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("openzaak", "0046_alter_openzaakconfig_fetch_eherkenning_zaken_with_rsin"), ] diff --git a/src/open_inwoner/openzaak/migrations/0049_add_multiple_zgw_backends_config.py b/src/open_inwoner/openzaak/migrations/0049_add_multiple_zgw_backends_config.py index 7555c710cc..49b7db47f0 100644 --- a/src/open_inwoner/openzaak/migrations/0049_add_multiple_zgw_backends_config.py +++ b/src/open_inwoner/openzaak/migrations/0049_add_multiple_zgw_backends_config.py @@ -1,9 +1,8 @@ -from django.db import migrations, models import django.db.models.deletion +from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ("zgw_consumers", "0019_alter_service_uuid"), ("openzaak", "0047_delete_statustranslation"), diff --git a/src/open_inwoner/openzaak/migrations/0050_migrate_zgw_root_fields_to_multi_backend.py b/src/open_inwoner/openzaak/migrations/0050_migrate_zgw_root_fields_to_multi_backend.py index ed195abdab..6542ee679a 100644 --- a/src/open_inwoner/openzaak/migrations/0050_migrate_zgw_root_fields_to_multi_backend.py +++ b/src/open_inwoner/openzaak/migrations/0050_migrate_zgw_root_fields_to_multi_backend.py @@ -1,6 +1,6 @@ import logging -from django.db import migrations +from django.db import migrations logger = logging.getLogger(__name__) @@ -39,7 +39,6 @@ def reverse_migrate_zgw_service_config_to_default_group_config(apps, schema_edit class Migration(migrations.Migration): - dependencies = [ ("openzaak", "0049_add_multiple_zgw_backends_config"), ] diff --git a/src/open_inwoner/openzaak/migrations/0051_drop_root_zgw_fields.py b/src/open_inwoner/openzaak/migrations/0051_drop_root_zgw_fields.py index 9fa06bc92d..34748d3ecb 100644 --- a/src/open_inwoner/openzaak/migrations/0051_drop_root_zgw_fields.py +++ b/src/open_inwoner/openzaak/migrations/0051_drop_root_zgw_fields.py @@ -1,14 +1,13 @@ # Generated by Django 4.2.11 on 2024-06-04 10:02 import logging -from django.db import migrations +from django.db import migrations logger = logging.getLogger(__name__) class Migration(migrations.Migration): - dependencies = [ ("openzaak", "0050_migrate_zgw_root_fields_to_multi_backend"), ] diff --git a/src/open_inwoner/openzaak/migrations/0052_add_catalogusconfig_service.py b/src/open_inwoner/openzaak/migrations/0052_add_catalogusconfig_service.py index 0d2934c1c2..d72fedb82c 100644 --- a/src/open_inwoner/openzaak/migrations/0052_add_catalogusconfig_service.py +++ b/src/open_inwoner/openzaak/migrations/0052_add_catalogusconfig_service.py @@ -32,7 +32,6 @@ def reverse_migrate_catalogus_config_service_field_from_default(apps, schema_edi class Migration(migrations.Migration): - dependencies = [ ("zgw_consumers", "0019_alter_service_uuid"), ("openzaak", "0051_drop_root_zgw_fields"), diff --git a/src/open_inwoner/openzaak/migrations/0053_zaaktypeconfig_catalogus_is_required.py b/src/open_inwoner/openzaak/migrations/0053_zaaktypeconfig_catalogus_is_required.py index 471ab70f21..af490905d6 100644 --- a/src/open_inwoner/openzaak/migrations/0053_zaaktypeconfig_catalogus_is_required.py +++ b/src/open_inwoner/openzaak/migrations/0053_zaaktypeconfig_catalogus_is_required.py @@ -1,7 +1,7 @@ # Generated by Django 4.2.11 on 2024-06-18 12:04 -from django.db import DataError, migrations, models import django.db.models.deletion +from django.db import DataError, migrations, models def validate_no_missing_catalogus_fields(apps, schema_editor): @@ -19,7 +19,6 @@ def validate_no_missing_catalogus_fields(apps, schema_editor): class Migration(migrations.Migration): - dependencies = [ ("openzaak", "0052_add_catalogusconfig_service"), ] diff --git a/src/open_inwoner/openzaak/migrations/0054_zgw_api_group_requires_most_services.py b/src/open_inwoner/openzaak/migrations/0054_zgw_api_group_requires_most_services.py index c0d346a884..509983fbde 100644 --- a/src/open_inwoner/openzaak/migrations/0054_zgw_api_group_requires_most_services.py +++ b/src/open_inwoner/openzaak/migrations/0054_zgw_api_group_requires_most_services.py @@ -21,7 +21,6 @@ def validate_no_missing_service_fields(apps, schema_editor): class Migration(migrations.Migration): - dependencies = [ ("zgw_consumers", "0019_alter_service_uuid"), ("openzaak", "0053_zaaktypeconfig_catalogus_is_required"), diff --git a/src/open_inwoner/openzaak/migrations/0055_openzaakconfig_zaken_filter_enabled.py b/src/open_inwoner/openzaak/migrations/0055_openzaakconfig_zaken_filter_enabled.py index c5ec6d2fec..3361be52a7 100644 --- a/src/open_inwoner/openzaak/migrations/0055_openzaakconfig_zaken_filter_enabled.py +++ b/src/open_inwoner/openzaak/migrations/0055_openzaakconfig_zaken_filter_enabled.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("openzaak", "0054_zgw_api_group_requires_most_services"), ] diff --git a/src/open_inwoner/openzaak/migrations/0056_openzaakconfig_use_zaak_omschrijving_as_title.py b/src/open_inwoner/openzaak/migrations/0056_openzaakconfig_use_zaak_omschrijving_as_title.py index 90f86eaa68..2fc132367e 100644 --- a/src/open_inwoner/openzaak/migrations/0056_openzaakconfig_use_zaak_omschrijving_as_title.py +++ b/src/open_inwoner/openzaak/migrations/0056_openzaakconfig_use_zaak_omschrijving_as_title.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("openzaak", "0055_openzaakconfig_zaken_filter_enabled"), ] diff --git a/src/open_inwoner/openzaak/migrations/0057_openzaakconfig_order_statusses_by_date_set.py b/src/open_inwoner/openzaak/migrations/0057_openzaakconfig_order_statusses_by_date_set.py index a8d76a8e49..a502514d76 100644 --- a/src/open_inwoner/openzaak/migrations/0057_openzaakconfig_order_statusses_by_date_set.py +++ b/src/open_inwoner/openzaak/migrations/0057_openzaakconfig_order_statusses_by_date_set.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("openzaak", "0056_openzaakconfig_use_zaak_omschrijving_as_title"), ] diff --git a/src/open_inwoner/openzaak/migrations/0058_remove_zaaktypeconfig_unique_identificatie_in_catalogus_and_more.py b/src/open_inwoner/openzaak/migrations/0058_remove_zaaktypeconfig_unique_identificatie_in_catalogus_and_more.py index ee26bc46db..a51b838d82 100644 --- a/src/open_inwoner/openzaak/migrations/0058_remove_zaaktypeconfig_unique_identificatie_in_catalogus_and_more.py +++ b/src/open_inwoner/openzaak/migrations/0058_remove_zaaktypeconfig_unique_identificatie_in_catalogus_and_more.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("openzaak", "0057_openzaakconfig_order_statusses_by_date_set"), ] diff --git a/src/open_inwoner/openzaak/migrations/0059_openzaakconfig_show_cases_without_status.py b/src/open_inwoner/openzaak/migrations/0059_openzaakconfig_show_cases_without_status.py index bdea234edf..dfc1b5c3f9 100644 --- a/src/open_inwoner/openzaak/migrations/0059_openzaakconfig_show_cases_without_status.py +++ b/src/open_inwoner/openzaak/migrations/0059_openzaakconfig_show_cases_without_status.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ( "openzaak", diff --git a/src/open_inwoner/openzaak/models.py b/src/open_inwoner/openzaak/models.py index e570e86e6e..20a37fac8f 100644 --- a/src/open_inwoner/openzaak/models.py +++ b/src/open_inwoner/openzaak/models.py @@ -8,7 +8,6 @@ from django.db.models import UniqueConstraint from django.utils import timezone from django.utils.translation import gettext_lazy as _ - from django_jsonform.models.fields import ArrayField from furl import furl from solo.models import SingletonModel @@ -480,7 +479,6 @@ class Meta: class CatalogusConfig(models.Model): - objects = CatalogusConfigManager() url = models.URLField( diff --git a/src/open_inwoner/openzaak/notifications.py b/src/open_inwoner/openzaak/notifications.py index 4b6ae822a5..c509da128c 100644 --- a/src/open_inwoner/openzaak/notifications.py +++ b/src/open_inwoner/openzaak/notifications.py @@ -4,7 +4,6 @@ from django.conf import settings from django.urls import reverse from django.utils.translation import gettext as _ - from mail_editor.helpers import find_template from zgw_consumers.api_models.constants import RolOmschrijving, RolTypes diff --git a/src/open_inwoner/openzaak/tests/factories.py b/src/open_inwoner/openzaak/tests/factories.py index f52730ac05..c3fedca3d3 100644 --- a/src/open_inwoner/openzaak/tests/factories.py +++ b/src/open_inwoner/openzaak/tests/factories.py @@ -1,7 +1,6 @@ -from django.utils.text import slugify - import factory import faker +from django.utils.text import slugify from simple_certmanager.constants import CertificateTypes from simple_certmanager.models import Certificate from zgw_consumers.api_models.base import factory as zwg_factory diff --git a/src/open_inwoner/openzaak/tests/test_admin.py b/src/open_inwoner/openzaak/tests/test_admin.py index ca679835b9..9e64edc6c3 100644 --- a/src/open_inwoner/openzaak/tests/test_admin.py +++ b/src/open_inwoner/openzaak/tests/test_admin.py @@ -2,11 +2,10 @@ import json from unittest import mock +import freezegun from django.test import override_settings from django.urls import reverse from django.utils.translation import gettext_lazy as _ - -import freezegun from django_webtest import WebTest from maykin_2fa.test import disable_admin_mfa from privates.storages import PrivateMediaFileSystemStorage @@ -33,7 +32,6 @@ def setUp(self): ) def test_enabling_only_ztc_succeeds(self): - response = self.app.get( reverse( "admin:openzaak_zaaktypeconfig_change", @@ -55,7 +53,6 @@ def test_enabling_only_ztc_succeeds(self): self.assertFalse(self.ztiotc.document_upload_enabled) def test_enabling_only_ztiotc_succeeds(self): - response = self.app.get( reverse( "admin:openzaak_zaaktypeconfig_change", diff --git a/src/open_inwoner/openzaak/tests/test_api_models.py b/src/open_inwoner/openzaak/tests/test_api_models.py index ff5fdf6257..c28dd6b9b7 100644 --- a/src/open_inwoner/openzaak/tests/test_api_models.py +++ b/src/open_inwoner/openzaak/tests/test_api_models.py @@ -1,6 +1,5 @@ from django.test import TestCase from django.utils.translation import gettext as _ - from zgw_consumers.api_models.base import factory from open_inwoner.openzaak.api_models import Zaak, ZaakType diff --git a/src/open_inwoner/openzaak/tests/test_case_detail.py b/src/open_inwoner/openzaak/tests/test_case_detail.py index f1edaec850..0071a75850 100644 --- a/src/open_inwoner/openzaak/tests/test_case_detail.py +++ b/src/open_inwoner/openzaak/tests/test_case_detail.py @@ -1,15 +1,14 @@ import datetime from unittest.mock import Mock, patch +import dateutil +import requests_mock from django.conf import settings from django.contrib.auth.models import AnonymousUser from django.test import RequestFactory from django.test.utils import override_settings from django.urls import reverse from django.utils.translation import gettext_lazy as _ - -import dateutil -import requests_mock from django_webtest import TransactionWebTest from freezegun import freeze_time from pyquery import PyQuery @@ -30,6 +29,8 @@ from open_inwoner.openklant.api_models import ObjectContactMoment from open_inwoner.openklant.constants import ( KlantenServiceType, +) +from open_inwoner.openklant.constants import ( Status as ContactMomentStatus, ) from open_inwoner.openklant.models import OpenKlantConfig @@ -1029,7 +1030,7 @@ def test_status_is_retrieved_when_user_logged_in_via_digid( links = doc.find(".contactmomenten__link") self.assertEqual(len(links), 3) - for link, question in zip(links, case["questions"]): + for link, question in zip(links, case["questions"], strict=False): self.assertEqual( link.attrib["href"], reverse( @@ -1151,7 +1152,7 @@ def test_pass_endstatus_type_data_if_endstatus_not_reached( self.assertEqual(len(links), 4) - for link, question in zip(links, case["questions"]): + for link, question in zip(links, case["questions"], strict=False): self.assertEqual( link.attrib["href"], reverse( @@ -1700,7 +1701,7 @@ def test_access_as_vestiging_when_only_role_for_vestiging(self, m): response = self.client.get(self.case_detail_url) - self.assertEquals(response.status_code, 200) + self.assertEqual(response.status_code, 200) self.assertContains(response, self.zaak["identificatie"]) @set_kvk_branch_number_in_session("1234") diff --git a/src/open_inwoner/openzaak/tests/test_case_request.py b/src/open_inwoner/openzaak/tests/test_case_request.py index 6aa7c466ea..c8b8214d5d 100644 --- a/src/open_inwoner/openzaak/tests/test_case_request.py +++ b/src/open_inwoner/openzaak/tests/test_case_request.py @@ -1,6 +1,5 @@ -from django.test import TestCase - import requests_mock +from django.test import TestCase from open_inwoner.openzaak.clients import build_zaken_client diff --git a/src/open_inwoner/openzaak/tests/test_cases.py b/src/open_inwoner/openzaak/tests/test_cases.py index 95335739c5..09ee005361 100644 --- a/src/open_inwoner/openzaak/tests/test_cases.py +++ b/src/open_inwoner/openzaak/tests/test_cases.py @@ -5,13 +5,12 @@ from unittest.mock import patch from urllib.parse import urlencode +import requests_mock from django.conf import settings from django.contrib.auth.models import AnonymousUser from django.test import TransactionTestCase from django.test.utils import override_settings from django.urls import reverse_lazy - -import requests_mock from django_webtest import TransactionWebTest from furl import furl from pyquery import PyQuery as PQ diff --git a/src/open_inwoner/openzaak/tests/test_cases_cache.py b/src/open_inwoner/openzaak/tests/test_cases_cache.py index d8ac91b367..ae97e36a48 100644 --- a/src/open_inwoner/openzaak/tests/test_cases_cache.py +++ b/src/open_inwoner/openzaak/tests/test_cases_cache.py @@ -1,11 +1,10 @@ import datetime +import requests_mock from django.core.cache import cache from django.test import TransactionTestCase from django.test.utils import override_settings from django.urls import reverse_lazy - -import requests_mock from freezegun import freeze_time from furl import furl from zgw_consumers.api_models.constants import VertrouwelijkheidsAanduidingen diff --git a/src/open_inwoner/openzaak/tests/test_clients.py b/src/open_inwoner/openzaak/tests/test_clients.py index 892c097ec7..268b052bd7 100644 --- a/src/open_inwoner/openzaak/tests/test_clients.py +++ b/src/open_inwoner/openzaak/tests/test_clients.py @@ -1,10 +1,9 @@ from unittest import TestCase as PlainTestCase from unittest.mock import Mock, patch -from django.test import TestCase - import requests import requests_mock +from django.test import TestCase from zgw_consumers.constants import APITypes from open_inwoner.openzaak.clients import ( diff --git a/src/open_inwoner/openzaak/tests/test_documents.py b/src/open_inwoner/openzaak/tests/test_documents.py index 8775f9ada2..9a671cf3c6 100644 --- a/src/open_inwoner/openzaak/tests/test_documents.py +++ b/src/open_inwoner/openzaak/tests/test_documents.py @@ -1,13 +1,12 @@ from datetime import date from io import BytesIO +import requests_mock from django.contrib.auth.models import AnonymousUser from django.core.files.uploadedfile import InMemoryUploadedFile from django.test.utils import override_settings from django.urls import reverse from django.utils.translation import gettext_lazy as _ - -import requests_mock from django_webtest import TransactionWebTest from privates.test import temp_private_root from timeline_logger.models import TimelineLog diff --git a/src/open_inwoner/openzaak/tests/test_import_export.py b/src/open_inwoner/openzaak/tests/test_import_export.py index 31e9df5fac..e6a0462d02 100644 --- a/src/open_inwoner/openzaak/tests/test_import_export.py +++ b/src/open_inwoner/openzaak/tests/test_import_export.py @@ -137,6 +137,7 @@ def test_only_models_related_to_exported_catalogus_config_are_included(self): "ztc_resultaat", "ztiotc", ), + strict=False, ): with self.subTest( f"{mock_field} should not be in the export's {export_field} field" diff --git a/src/open_inwoner/openzaak/tests/test_migrations.py b/src/open_inwoner/openzaak/tests/test_migrations.py index cff57a5a27..eaf5f604ee 100644 --- a/src/open_inwoner/openzaak/tests/test_migrations.py +++ b/src/open_inwoner/openzaak/tests/test_migrations.py @@ -1,5 +1,4 @@ from django.db import DataError - from zgw_consumers.constants import APITypes from open_inwoner.openzaak.tests.factories import ( @@ -141,7 +140,6 @@ def setUpBeforeMigration(self, apps): ) def test_migration_0051_to_0052_raises_for_multiple_api_groups(self): - with self.assertRaises(DataError) as cm: self.attempt_migration() diff --git a/src/open_inwoner/openzaak/tests/test_models.py b/src/open_inwoner/openzaak/tests/test_models.py index 402c05c78e..efb75c6fbb 100644 --- a/src/open_inwoner/openzaak/tests/test_models.py +++ b/src/open_inwoner/openzaak/tests/test_models.py @@ -2,7 +2,6 @@ from uuid import uuid4 from django.test import TestCase - from freezegun import freeze_time from zgw_consumers.api_models.base import factory from zgw_consumers.test import generate_oas_component diff --git a/src/open_inwoner/openzaak/tests/test_notification_utils.py b/src/open_inwoner/openzaak/tests/test_notification_utils.py index 403a467364..07bbe79590 100644 --- a/src/open_inwoner/openzaak/tests/test_notification_utils.py +++ b/src/open_inwoner/openzaak/tests/test_notification_utils.py @@ -4,7 +4,6 @@ from django.test import TestCase from django.test.utils import override_settings from django.urls import reverse - from zgw_consumers.api_models.base import factory from zgw_consumers.api_models.constants import RolOmschrijving, RolTypes @@ -30,7 +29,6 @@ def setUp(self): ) def test_send_case_update_email(self): - config = SiteConfiguration.get_solo() data = MockAPIData() diff --git a/src/open_inwoner/openzaak/tests/test_notification_webhook.py b/src/open_inwoner/openzaak/tests/test_notification_webhook.py index 4f9aa48b86..f9c1e16d09 100644 --- a/src/open_inwoner/openzaak/tests/test_notification_webhook.py +++ b/src/open_inwoner/openzaak/tests/test_notification_webhook.py @@ -3,7 +3,6 @@ from django.test import TestCase from django.urls import reverse_lazy - from rest_framework import status from rest_framework.test import APITestCase from zds_client import ClientAuth diff --git a/src/open_inwoner/openzaak/tests/test_notification_zaak_infoobject.py b/src/open_inwoner/openzaak/tests/test_notification_zaak_infoobject.py index 70cad8ba4d..40c8dbb897 100644 --- a/src/open_inwoner/openzaak/tests/test_notification_zaak_infoobject.py +++ b/src/open_inwoner/openzaak/tests/test_notification_zaak_infoobject.py @@ -1,9 +1,8 @@ import logging from unittest.mock import Mock, patch -from django.test import TestCase, override_settings - import requests_mock +from django.test import TestCase, override_settings from freezegun import freeze_time from zgw_consumers.api_models.base import factory from zgw_consumers.api_models.constants import VertrouwelijkheidsAanduidingen @@ -293,9 +292,9 @@ def test_zio_bails_when_info_object_not_visible_because_confidentiality( self, m, mock_handle: Mock ): data = MockAPIData() - data.informatie_object[ - "vertrouwelijkheidaanduiding" - ] = VertrouwelijkheidsAanduidingen.geheim + data.informatie_object["vertrouwelijkheidaanduiding"] = ( + VertrouwelijkheidsAanduidingen.geheim + ) data.install_mocks(m) handle_zaken_notification(data.zio_notification) diff --git a/src/open_inwoner/openzaak/tests/test_notification_zaak_status.py b/src/open_inwoner/openzaak/tests/test_notification_zaak_status.py index d4e80f8df0..e47d4eec83 100644 --- a/src/open_inwoner/openzaak/tests/test_notification_zaak_status.py +++ b/src/open_inwoner/openzaak/tests/test_notification_zaak_status.py @@ -1,9 +1,8 @@ import logging from unittest.mock import Mock, patch -from django.test import RequestFactory, TestCase, override_settings - import requests_mock +from django.test import RequestFactory, TestCase, override_settings from freezegun import freeze_time from zgw_consumers.api_models.base import factory from zgw_consumers.api_models.constants import VertrouwelijkheidsAanduidingen diff --git a/src/open_inwoner/openzaak/tests/test_utils.py b/src/open_inwoner/openzaak/tests/test_utils.py index 4be9ba83b4..ef4a3eab0a 100644 --- a/src/open_inwoner/openzaak/tests/test_utils.py +++ b/src/open_inwoner/openzaak/tests/test_utils.py @@ -1,5 +1,4 @@ from django.test import TestCase - from zgw_consumers.api_models.base import factory from zgw_consumers.api_models.constants import RolTypes, VertrouwelijkheidsAanduidingen from zgw_consumers.test import generate_oas_component diff --git a/src/open_inwoner/openzaak/tests/test_zgw_imports.py b/src/open_inwoner/openzaak/tests/test_zgw_imports.py index e2c355a552..e6eb4f923f 100644 --- a/src/open_inwoner/openzaak/tests/test_zgw_imports.py +++ b/src/open_inwoner/openzaak/tests/test_zgw_imports.py @@ -1,6 +1,5 @@ -from django.test import TestCase, override_settings - import requests_mock +from django.test import TestCase, override_settings from open_inwoner.openzaak.models import CatalogusConfig, OpenZaakConfig, ZaakTypeConfig from open_inwoner.openzaak.tests.factories import ( @@ -219,7 +218,7 @@ def test_import_zaaktype_configs_with_catalogs(self, m): ) # check we linked correctly - for i, root in zip((0, 2), self.roots): + for i, root in zip((0, 2), self.roots, strict=False): self.assertEqual(res[i + 0].catalogus, cat_configs[root]["AAA"]) self.assertEqual(res[i + 1].catalogus, cat_configs[root]["BBB"]) diff --git a/src/open_inwoner/openzaak/tests/test_zgw_imports_command.py b/src/open_inwoner/openzaak/tests/test_zgw_imports_command.py index 19db15d804..27e26af969 100644 --- a/src/open_inwoner/openzaak/tests/test_zgw_imports_command.py +++ b/src/open_inwoner/openzaak/tests/test_zgw_imports_command.py @@ -2,11 +2,10 @@ from io import StringIO from unittest import mock +import requests_mock from django.core.management import call_command from django.test import TestCase -import requests_mock - from open_inwoner.openzaak.models import ( CatalogusConfig, OpenZaakConfig, diff --git a/src/open_inwoner/openzaak/tests/test_zgw_imports_iotypes.py b/src/open_inwoner/openzaak/tests/test_zgw_imports_iotypes.py index 6deaaa51b8..0d4c407316 100644 --- a/src/open_inwoner/openzaak/tests/test_zgw_imports_iotypes.py +++ b/src/open_inwoner/openzaak/tests/test_zgw_imports_iotypes.py @@ -1,8 +1,7 @@ from uuid import UUID -from django.test import TestCase - import requests_mock +from django.test import TestCase from open_inwoner.openzaak.models import ( OpenZaakConfig, @@ -319,6 +318,7 @@ def test_import_zaaktype_informatieobjecttype_configs_with_catalog(self, m): for root, root_offset in zip( self.roots, (0, 2), + strict=False, ): # first ZaakTypeConfig has two ZaakTypes and two InfoObjectTypes ztc, ztiotcs = res[root_offset] @@ -420,6 +420,7 @@ def test_import_zaaktype_informatieobjecttype_configs_with_catalog(self, m): for root, root_offset in zip( self.roots, (0, 1), + strict=False, ): self.assertEqual( catalog_and_zaak_type[root][ diff --git a/src/open_inwoner/openzaak/types.py b/src/open_inwoner/openzaak/types.py index ccecb11a7a..bbb3102567 100644 --- a/src/open_inwoner/openzaak/types.py +++ b/src/open_inwoner/openzaak/types.py @@ -9,8 +9,7 @@ class UniformCase(Protocol): """ @property - def identification(self) -> str: - ... + def identification(self) -> str: ... def process_data(self) -> dict: """ diff --git a/src/open_inwoner/openzaak/zgw_imports.py b/src/open_inwoner/openzaak/zgw_imports.py index 069e28a7dc..d666a6cd88 100644 --- a/src/open_inwoner/openzaak/zgw_imports.py +++ b/src/open_inwoner/openzaak/zgw_imports.py @@ -2,7 +2,6 @@ from collections import defaultdict from django.db import transaction - from zgw_consumers.api_models.catalogi import ( InformatieObjectType, ResultaatType, diff --git a/src/open_inwoner/pdc/admin/category.py b/src/open_inwoner/pdc/admin/category.py index 7927d0a937..df45e68763 100644 --- a/src/open_inwoner/pdc/admin/category.py +++ b/src/open_inwoner/pdc/admin/category.py @@ -2,7 +2,6 @@ from django.contrib import admin from django.forms import BaseModelFormSet from django.utils.translation import gettext as _ - from django_jsonform.forms.fields import JSONFormField from import_export.admin import ImportExportMixin from import_export.formats import base_formats diff --git a/src/open_inwoner/pdc/admin/faq.py b/src/open_inwoner/pdc/admin/faq.py index 2fd680bcf1..9187035a17 100644 --- a/src/open_inwoner/pdc/admin/faq.py +++ b/src/open_inwoner/pdc/admin/faq.py @@ -1,6 +1,5 @@ from django import forms from django.contrib import admin - from ordered_model.admin import OrderedModelAdmin from open_inwoner.ckeditor5.widgets import CKEditorWidget diff --git a/src/open_inwoner/pdc/admin/product.py b/src/open_inwoner/pdc/admin/product.py index 02664bd9c1..837cfdc6e4 100644 --- a/src/open_inwoner/pdc/admin/product.py +++ b/src/open_inwoner/pdc/admin/product.py @@ -2,7 +2,6 @@ from django.contrib import admin from django.contrib.admin.widgets import FilteredSelectMultiple from django.utils.translation import gettext as _ - from import_export.admin import ImportExportMixin from import_export.formats import base_formats from ordered_model.admin import OrderedModelAdmin diff --git a/src/open_inwoner/pdc/managers.py b/src/open_inwoner/pdc/managers.py index eb277f86fc..48390665be 100644 --- a/src/open_inwoner/pdc/managers.py +++ b/src/open_inwoner/pdc/managers.py @@ -1,8 +1,7 @@ from datetime import date -from django.db import models - from dateutil.relativedelta import relativedelta +from django.db import models from ordered_model.models import OrderedModelQuerySet from treebeard.mp_tree import MP_NodeQuerySet @@ -94,9 +93,9 @@ def filter_by_zaken(self, cases: list[Zaak]): or months_since_last_zaak_per_zaaktype[zaaktype_identificatie] > duration_since_start.months ): - months_since_last_zaak_per_zaaktype[ - zaaktype_identificatie - ] = duration_since_start.months + months_since_last_zaak_per_zaaktype[zaaktype_identificatie] = ( + duration_since_start.months + ) zaaktype_ids = list(months_since_last_zaak_per_zaaktype.keys()) diff --git a/src/open_inwoner/pdc/migrations/0001_initial.py b/src/open_inwoner/pdc/migrations/0001_initial.py index f202b306ad..0ec033a543 100644 --- a/src/open_inwoner/pdc/migrations/0001_initial.py +++ b/src/open_inwoner/pdc/migrations/0001_initial.py @@ -1,13 +1,12 @@ # Generated by Django 3.2.7 on 2021-10-06 10:49 -from django.conf import settings -from django.db import migrations, models import django.db.models.deletion import filer.fields.image +from django.conf import settings +from django.db import migrations, models class Migration(migrations.Migration): - initial = True dependencies = [ diff --git a/src/open_inwoner/pdc/migrations/0002_auto_20211013_1214.py b/src/open_inwoner/pdc/migrations/0002_auto_20211013_1214.py index c7412623f9..bda1449a89 100644 --- a/src/open_inwoner/pdc/migrations/0002_auto_20211013_1214.py +++ b/src/open_inwoner/pdc/migrations/0002_auto_20211013_1214.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0001_initial"), ] diff --git a/src/open_inwoner/pdc/migrations/0003_auto_20211020_1234.py b/src/open_inwoner/pdc/migrations/0003_auto_20211020_1234.py index 2043062fbe..33f8ef4dc3 100644 --- a/src/open_inwoner/pdc/migrations/0003_auto_20211020_1234.py +++ b/src/open_inwoner/pdc/migrations/0003_auto_20211020_1234.py @@ -1,14 +1,12 @@ # Generated by Django 3.2.7 on 2021-10-20 10:34 import django.db.models.deletion +import filer.fields.image from django.conf import settings from django.db import migrations, models -import filer.fields.image - class Migration(migrations.Migration): - dependencies = [ migrations.swappable_dependency(settings.FILER_IMAGE_MODEL), ("pdc", "0002_auto_20211013_1214"), diff --git a/src/open_inwoner/pdc/migrations/0004_productlink_productlocation.py b/src/open_inwoner/pdc/migrations/0004_productlink_productlocation.py index ff68c9108e..94de6d825f 100644 --- a/src/open_inwoner/pdc/migrations/0004_productlink_productlocation.py +++ b/src/open_inwoner/pdc/migrations/0004_productlink_productlocation.py @@ -2,13 +2,11 @@ import django.contrib.gis.db.models.fields import django.db.models.deletion -from django.db import migrations, models - import localflavor.nl.models +from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ("pdc", "0003_auto_20211020_1234"), ] diff --git a/src/open_inwoner/pdc/migrations/0005_auto_20211025_1803.py b/src/open_inwoner/pdc/migrations/0005_auto_20211025_1803.py index cb6df462b8..757ac908bc 100644 --- a/src/open_inwoner/pdc/migrations/0005_auto_20211025_1803.py +++ b/src/open_inwoner/pdc/migrations/0005_auto_20211025_1803.py @@ -2,17 +2,15 @@ import django.contrib.gis.db.models.fields import django.db.models.deletion -from django.conf import settings -from django.db import migrations, models - import filer.fields.image import localflavor.nl.models +from django.conf import settings +from django.db import migrations, models import open_inwoner.utils.validators class Migration(migrations.Migration): - dependencies = [ migrations.swappable_dependency(settings.FILER_IMAGE_MODEL), ("pdc", "0004_productlink_productlocation"), diff --git a/src/open_inwoner/pdc/migrations/0006_auto_20211027_1719.py b/src/open_inwoner/pdc/migrations/0006_auto_20211027_1719.py index f590f2078b..072612b999 100644 --- a/src/open_inwoner/pdc/migrations/0006_auto_20211027_1719.py +++ b/src/open_inwoner/pdc/migrations/0006_auto_20211027_1719.py @@ -1,12 +1,10 @@ # Generated by Django 3.2.7 on 2021-10-27 15:19 -from django.db import migrations - import autoslug.fields +from django.db import migrations class Migration(migrations.Migration): - dependencies = [ ("pdc", "0005_auto_20211025_1803"), ] diff --git a/src/open_inwoner/pdc/migrations/0007_auto_20211027_1720.py b/src/open_inwoner/pdc/migrations/0007_auto_20211027_1720.py index 50110d1e03..48bd64c340 100644 --- a/src/open_inwoner/pdc/migrations/0007_auto_20211027_1720.py +++ b/src/open_inwoner/pdc/migrations/0007_auto_20211027_1720.py @@ -11,7 +11,6 @@ def save_slug(apps, schemas): class Migration(migrations.Migration): - dependencies = [ ("pdc", "0006_auto_20211027_1719"), ] diff --git a/src/open_inwoner/pdc/migrations/0008_alter_product_slug.py b/src/open_inwoner/pdc/migrations/0008_alter_product_slug.py index 8436e7521f..e813ff9c79 100644 --- a/src/open_inwoner/pdc/migrations/0008_alter_product_slug.py +++ b/src/open_inwoner/pdc/migrations/0008_alter_product_slug.py @@ -1,12 +1,10 @@ # Generated by Django 3.2.7 on 2021-10-27 15:22 -from django.db import migrations - import autoslug.fields +from django.db import migrations class Migration(migrations.Migration): - dependencies = [ ("pdc", "0007_auto_20211027_1720"), ] diff --git a/src/open_inwoner/pdc/migrations/0009_auto_20211027_1732.py b/src/open_inwoner/pdc/migrations/0009_auto_20211027_1732.py index 7e18140451..ca4c9d8e3f 100644 --- a/src/open_inwoner/pdc/migrations/0009_auto_20211027_1732.py +++ b/src/open_inwoner/pdc/migrations/0009_auto_20211027_1732.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0008_alter_product_slug"), ] diff --git a/src/open_inwoner/pdc/migrations/0010_alter_product_slug.py b/src/open_inwoner/pdc/migrations/0010_alter_product_slug.py index 5b77173b93..caeb6e5f0e 100644 --- a/src/open_inwoner/pdc/migrations/0010_alter_product_slug.py +++ b/src/open_inwoner/pdc/migrations/0010_alter_product_slug.py @@ -2,7 +2,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0009_auto_20211027_1732"), ] diff --git a/src/open_inwoner/pdc/migrations/0010_auto_20211119_1158.py b/src/open_inwoner/pdc/migrations/0010_auto_20211119_1158.py index 919bc57b66..262553f7e1 100644 --- a/src/open_inwoner/pdc/migrations/0010_auto_20211119_1158.py +++ b/src/open_inwoner/pdc/migrations/0010_auto_20211119_1158.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0009_auto_20211027_1732"), ] diff --git a/src/open_inwoner/pdc/migrations/0010_auto_20211119_1346.py b/src/open_inwoner/pdc/migrations/0010_auto_20211119_1346.py index bb9e96a4c9..898ac379b0 100644 --- a/src/open_inwoner/pdc/migrations/0010_auto_20211119_1346.py +++ b/src/open_inwoner/pdc/migrations/0010_auto_20211119_1346.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0009_auto_20211027_1732"), ] diff --git a/src/open_inwoner/pdc/migrations/0011_auto_20211119_1025.py b/src/open_inwoner/pdc/migrations/0011_auto_20211119_1025.py index 39001a1b91..d50f74e8cc 100644 --- a/src/open_inwoner/pdc/migrations/0011_auto_20211119_1025.py +++ b/src/open_inwoner/pdc/migrations/0011_auto_20211119_1025.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0010_alter_product_slug"), ] diff --git a/src/open_inwoner/pdc/migrations/0011_migrate_slugs.py b/src/open_inwoner/pdc/migrations/0011_migrate_slugs.py index 49be09ed71..c9f88e5c7d 100644 --- a/src/open_inwoner/pdc/migrations/0011_migrate_slugs.py +++ b/src/open_inwoner/pdc/migrations/0011_migrate_slugs.py @@ -16,7 +16,6 @@ def migrate_slugs(apps, _): class Migration(migrations.Migration): - dependencies = [("pdc", "0010_auto_20211119_1158")] operations = [migrations.RunPython(migrate_slugs, migrations.RunPython.noop)] diff --git a/src/open_inwoner/pdc/migrations/0011_productfile.py b/src/open_inwoner/pdc/migrations/0011_productfile.py index 31308aa5c0..5371e27d6e 100644 --- a/src/open_inwoner/pdc/migrations/0011_productfile.py +++ b/src/open_inwoner/pdc/migrations/0011_productfile.py @@ -1,14 +1,12 @@ # Generated by Django 3.2.7 on 2021-11-22 14:23 import django.db.models.deletion +import filer.fields.image from django.conf import settings from django.db import migrations, models -import filer.fields.image - class Migration(migrations.Migration): - dependencies = [ migrations.swappable_dependency(settings.FILER_IMAGE_MODEL), ("pdc", "0010_auto_20211119_1346"), diff --git a/src/open_inwoner/pdc/migrations/0012_alter_productfile_file.py b/src/open_inwoner/pdc/migrations/0012_alter_productfile_file.py index 177cd652b8..8b0c056378 100644 --- a/src/open_inwoner/pdc/migrations/0012_alter_productfile_file.py +++ b/src/open_inwoner/pdc/migrations/0012_alter_productfile_file.py @@ -1,13 +1,11 @@ # Generated by Django 3.2.7 on 2021-11-22 14:56 import django.db.models.deletion -from django.db import migrations - import filer.fields.file +from django.db import migrations class Migration(migrations.Migration): - dependencies = [ ("filer", "0012_file_mime_type"), ("pdc", "0011_productfile"), diff --git a/src/open_inwoner/pdc/migrations/0012_auto_20211119_1645.py b/src/open_inwoner/pdc/migrations/0012_auto_20211119_1645.py index dab9ea4fbc..547128b69d 100644 --- a/src/open_inwoner/pdc/migrations/0012_auto_20211119_1645.py +++ b/src/open_inwoner/pdc/migrations/0012_auto_20211119_1645.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0011_migrate_slugs"), ] diff --git a/src/open_inwoner/pdc/migrations/0013_merge_0011_auto_20211119_1025_0012_auto_20211119_1645.py b/src/open_inwoner/pdc/migrations/0013_merge_0011_auto_20211119_1025_0012_auto_20211119_1645.py index f60d9d6edf..854f2e344f 100644 --- a/src/open_inwoner/pdc/migrations/0013_merge_0011_auto_20211119_1025_0012_auto_20211119_1645.py +++ b/src/open_inwoner/pdc/migrations/0013_merge_0011_auto_20211119_1025_0012_auto_20211119_1645.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0011_auto_20211119_1025"), ("pdc", "0012_auto_20211119_1645"), diff --git a/src/open_inwoner/pdc/migrations/0013_merge_20211122_1701.py b/src/open_inwoner/pdc/migrations/0013_merge_20211122_1701.py index de4edb2e7a..e9f9e8b912 100644 --- a/src/open_inwoner/pdc/migrations/0013_merge_20211122_1701.py +++ b/src/open_inwoner/pdc/migrations/0013_merge_20211122_1701.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0011_auto_20211119_1025"), ("pdc", "0012_alter_productfile_file"), diff --git a/src/open_inwoner/pdc/migrations/0014_merge_20211123_1220.py b/src/open_inwoner/pdc/migrations/0014_merge_20211123_1220.py index de20087e06..b1b8336e49 100644 --- a/src/open_inwoner/pdc/migrations/0014_merge_20211123_1220.py +++ b/src/open_inwoner/pdc/migrations/0014_merge_20211123_1220.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0013_merge_0011_auto_20211119_1025_0012_auto_20211119_1645"), ("pdc", "0013_merge_20211122_1701"), diff --git a/src/open_inwoner/pdc/migrations/0015_alter_productlocation_name.py b/src/open_inwoner/pdc/migrations/0015_alter_productlocation_name.py index 58b0620d25..bd57cdfb15 100644 --- a/src/open_inwoner/pdc/migrations/0015_alter_productlocation_name.py +++ b/src/open_inwoner/pdc/migrations/0015_alter_productlocation_name.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0014_merge_20211123_1220"), ] diff --git a/src/open_inwoner/pdc/migrations/0015_auto_20211124_1546.py b/src/open_inwoner/pdc/migrations/0015_auto_20211124_1546.py index 4a4f4f7e63..8a398e83ae 100644 --- a/src/open_inwoner/pdc/migrations/0015_auto_20211124_1546.py +++ b/src/open_inwoner/pdc/migrations/0015_auto_20211124_1546.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0014_merge_20211123_1220"), ] diff --git a/src/open_inwoner/pdc/migrations/0015_auto_20211206_1033.py b/src/open_inwoner/pdc/migrations/0015_auto_20211206_1033.py index ed655e57b1..f94e655cc7 100644 --- a/src/open_inwoner/pdc/migrations/0015_auto_20211206_1033.py +++ b/src/open_inwoner/pdc/migrations/0015_auto_20211206_1033.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0014_merge_20211123_1220"), ] diff --git a/src/open_inwoner/pdc/migrations/0016_merge_20211206_1627.py b/src/open_inwoner/pdc/migrations/0016_merge_20211206_1627.py index bdb94cd31d..f7217f72f3 100644 --- a/src/open_inwoner/pdc/migrations/0016_merge_20211206_1627.py +++ b/src/open_inwoner/pdc/migrations/0016_merge_20211206_1627.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0015_alter_productlocation_name"), ("pdc", "0015_auto_20211206_1033"), diff --git a/src/open_inwoner/pdc/migrations/0017_merge_20211209_1213.py b/src/open_inwoner/pdc/migrations/0017_merge_20211209_1213.py index 5562b66009..645c5d8108 100644 --- a/src/open_inwoner/pdc/migrations/0017_merge_20211209_1213.py +++ b/src/open_inwoner/pdc/migrations/0017_merge_20211209_1213.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0015_auto_20211124_1546"), ("pdc", "0016_merge_20211206_1627"), diff --git a/src/open_inwoner/pdc/migrations/0018_alter_product_keywords.py b/src/open_inwoner/pdc/migrations/0018_alter_product_keywords.py index 14183d8942..4f882b6dc1 100644 --- a/src/open_inwoner/pdc/migrations/0018_alter_product_keywords.py +++ b/src/open_inwoner/pdc/migrations/0018_alter_product_keywords.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0017_merge_20211209_1213"), ] diff --git a/src/open_inwoner/pdc/migrations/0019_product_uniforme_productnaam.py b/src/open_inwoner/pdc/migrations/0019_product_uniforme_productnaam.py index 152b9a9436..786279b1c6 100644 --- a/src/open_inwoner/pdc/migrations/0019_product_uniforme_productnaam.py +++ b/src/open_inwoner/pdc/migrations/0019_product_uniforme_productnaam.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0018_alter_product_keywords"), ] diff --git a/src/open_inwoner/pdc/migrations/0020_auto_20220202_1835.py b/src/open_inwoner/pdc/migrations/0020_auto_20220202_1835.py index 0f36949941..c5b2b3de6a 100644 --- a/src/open_inwoner/pdc/migrations/0020_auto_20220202_1835.py +++ b/src/open_inwoner/pdc/migrations/0020_auto_20220202_1835.py @@ -2,14 +2,12 @@ import django.contrib.postgres.fields import django.db.models.deletion +import filer.fields.image from django.conf import settings from django.db import migrations, models -import filer.fields.image - class Migration(migrations.Migration): - dependencies = [ migrations.swappable_dependency(settings.FILER_IMAGE_MODEL), ("pdc", "0019_product_uniforme_productnaam"), diff --git a/src/open_inwoner/pdc/migrations/0020_productcontact_role.py b/src/open_inwoner/pdc/migrations/0020_productcontact_role.py index 1bfb11e5be..fe1d25165b 100644 --- a/src/open_inwoner/pdc/migrations/0020_productcontact_role.py +++ b/src/open_inwoner/pdc/migrations/0020_productcontact_role.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0019_product_uniforme_productnaam"), ] diff --git a/src/open_inwoner/pdc/migrations/0021_merge_20220202_1847.py b/src/open_inwoner/pdc/migrations/0021_merge_20220202_1847.py index a44b2de620..eb00399fed 100644 --- a/src/open_inwoner/pdc/migrations/0021_merge_20220202_1847.py +++ b/src/open_inwoner/pdc/migrations/0021_merge_20220202_1847.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0020_auto_20220202_1835"), ("pdc", "0020_productcontact_role"), diff --git a/src/open_inwoner/pdc/migrations/0022_question.py b/src/open_inwoner/pdc/migrations/0022_question.py index ee7d883d4d..b06e0cf2f3 100644 --- a/src/open_inwoner/pdc/migrations/0022_question.py +++ b/src/open_inwoner/pdc/migrations/0022_question.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0021_merge_20220202_1847"), ] diff --git a/src/open_inwoner/pdc/migrations/0023_auto_20220218_1359.py b/src/open_inwoner/pdc/migrations/0023_auto_20220218_1359.py index 3fedaca8f5..42994aea1e 100644 --- a/src/open_inwoner/pdc/migrations/0023_auto_20220218_1359.py +++ b/src/open_inwoner/pdc/migrations/0023_auto_20220218_1359.py @@ -2,15 +2,13 @@ import django.contrib.postgres.fields import django.db.models.deletion -from django.conf import settings -from django.db import migrations, models - import filer.fields.file import filer.fields.image +from django.conf import settings +from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ("filer", "0012_file_mime_type"), migrations.swappable_dependency(settings.FILER_IMAGE_MODEL), diff --git a/src/open_inwoner/pdc/migrations/0023_productcondition.py b/src/open_inwoner/pdc/migrations/0023_productcondition.py index b45fc10031..2580d3a13b 100644 --- a/src/open_inwoner/pdc/migrations/0023_productcondition.py +++ b/src/open_inwoner/pdc/migrations/0023_productcondition.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0022_question"), ] diff --git a/src/open_inwoner/pdc/migrations/0024_merge_0023_auto_20220218_1359_0023_productcondition.py b/src/open_inwoner/pdc/migrations/0024_merge_0023_auto_20220218_1359_0023_productcondition.py index 214d0d804e..1db69e5d1f 100644 --- a/src/open_inwoner/pdc/migrations/0024_merge_0023_auto_20220218_1359_0023_productcondition.py +++ b/src/open_inwoner/pdc/migrations/0024_merge_0023_auto_20220218_1359_0023_productcondition.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0023_auto_20220218_1359"), ("pdc", "0023_productcondition"), diff --git a/src/open_inwoner/pdc/migrations/0025_auto_20220223_1153.py b/src/open_inwoner/pdc/migrations/0025_auto_20220223_1153.py index a755a68a79..0085fb05ca 100644 --- a/src/open_inwoner/pdc/migrations/0025_auto_20220223_1153.py +++ b/src/open_inwoner/pdc/migrations/0025_auto_20220223_1153.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0024_merge_0023_auto_20220218_1359_0023_productcondition"), ] diff --git a/src/open_inwoner/pdc/migrations/0026_auto_20220312_1054.py b/src/open_inwoner/pdc/migrations/0026_auto_20220312_1054.py index 170ec180cd..3d7409672c 100644 --- a/src/open_inwoner/pdc/migrations/0026_auto_20220312_1054.py +++ b/src/open_inwoner/pdc/migrations/0026_auto_20220312_1054.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0025_auto_20220223_1153"), ] diff --git a/src/open_inwoner/pdc/migrations/0027_auto_20220312_1056.py b/src/open_inwoner/pdc/migrations/0027_auto_20220312_1056.py index a1c95728c5..fc245047f0 100644 --- a/src/open_inwoner/pdc/migrations/0027_auto_20220312_1056.py +++ b/src/open_inwoner/pdc/migrations/0027_auto_20220312_1056.py @@ -20,7 +20,6 @@ def combine_locations(apps, schema_editor): class Migration(migrations.Migration): - dependencies = [ ("pdc", "0026_auto_20220312_1054"), ] diff --git a/src/open_inwoner/pdc/migrations/0028_auto_20220312_1107.py b/src/open_inwoner/pdc/migrations/0028_auto_20220312_1107.py index db49e6bd4e..5162a09db8 100644 --- a/src/open_inwoner/pdc/migrations/0028_auto_20220312_1107.py +++ b/src/open_inwoner/pdc/migrations/0028_auto_20220312_1107.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0027_auto_20220312_1056"), ] diff --git a/src/open_inwoner/pdc/migrations/0029_auto_20220325_1308.py b/src/open_inwoner/pdc/migrations/0029_auto_20220325_1308.py index 48dfdbf30f..5549b8eead 100644 --- a/src/open_inwoner/pdc/migrations/0029_auto_20220325_1308.py +++ b/src/open_inwoner/pdc/migrations/0029_auto_20220325_1308.py @@ -6,7 +6,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0028_auto_20220312_1107"), ] diff --git a/src/open_inwoner/pdc/migrations/0029_productcondition_order.py b/src/open_inwoner/pdc/migrations/0029_productcondition_order.py index 0f3ef6b562..f200464563 100644 --- a/src/open_inwoner/pdc/migrations/0029_productcondition_order.py +++ b/src/open_inwoner/pdc/migrations/0029_productcondition_order.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0028_auto_20220312_1107"), ] diff --git a/src/open_inwoner/pdc/migrations/0030_alter_question_category.py b/src/open_inwoner/pdc/migrations/0030_alter_question_category.py index 3c9ca794da..6ac35c7fa9 100644 --- a/src/open_inwoner/pdc/migrations/0030_alter_question_category.py +++ b/src/open_inwoner/pdc/migrations/0030_alter_question_category.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0029_auto_20220325_1308"), ] diff --git a/src/open_inwoner/pdc/migrations/0030_auto_20220322_1520.py b/src/open_inwoner/pdc/migrations/0030_auto_20220322_1520.py index 192da26d42..41811f3ff1 100644 --- a/src/open_inwoner/pdc/migrations/0030_auto_20220322_1520.py +++ b/src/open_inwoner/pdc/migrations/0030_auto_20220322_1520.py @@ -12,7 +12,6 @@ def set_order(apps, schemas): class Migration(migrations.Migration): - dependencies = [ ("pdc", "0029_productcondition_order"), ] diff --git a/src/open_inwoner/pdc/migrations/0031_merge_0029_auto_20220325_1308_0030_auto_20220322_1520.py b/src/open_inwoner/pdc/migrations/0031_merge_0029_auto_20220325_1308_0030_auto_20220322_1520.py index b29b729384..9b3f7bd317 100644 --- a/src/open_inwoner/pdc/migrations/0031_merge_0029_auto_20220325_1308_0030_auto_20220322_1520.py +++ b/src/open_inwoner/pdc/migrations/0031_merge_0029_auto_20220325_1308_0030_auto_20220322_1520.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0029_auto_20220325_1308"), ("pdc", "0030_auto_20220322_1520"), diff --git a/src/open_inwoner/pdc/migrations/0032_alter_productcondition_options.py b/src/open_inwoner/pdc/migrations/0032_alter_productcondition_options.py index a8cc8dc24c..94af5c33da 100644 --- a/src/open_inwoner/pdc/migrations/0032_alter_productcondition_options.py +++ b/src/open_inwoner/pdc/migrations/0032_alter_productcondition_options.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0031_merge_0029_auto_20220325_1308_0030_auto_20220322_1520"), ] diff --git a/src/open_inwoner/pdc/migrations/0033_merge_20220329_1630.py b/src/open_inwoner/pdc/migrations/0033_merge_20220329_1630.py index 4fed66feb9..86ffb4ad56 100644 --- a/src/open_inwoner/pdc/migrations/0033_merge_20220329_1630.py +++ b/src/open_inwoner/pdc/migrations/0033_merge_20220329_1630.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0030_alter_question_category"), ("pdc", "0032_alter_productcondition_options"), diff --git a/src/open_inwoner/pdc/migrations/0034_auto_20220411_1259.py b/src/open_inwoner/pdc/migrations/0034_auto_20220411_1259.py index 201da03a30..7f1c45d180 100644 --- a/src/open_inwoner/pdc/migrations/0034_auto_20220411_1259.py +++ b/src/open_inwoner/pdc/migrations/0034_auto_20220411_1259.py @@ -16,7 +16,6 @@ def remove_orphan_files(apps, schema_editor): class Migration(migrations.Migration): - dependencies = [ ("pdc", "0033_merge_20220329_1630"), ] diff --git a/src/open_inwoner/pdc/migrations/0035_alter_productfile_file.py b/src/open_inwoner/pdc/migrations/0035_alter_productfile_file.py index ccf9c53819..38cc92f853 100644 --- a/src/open_inwoner/pdc/migrations/0035_alter_productfile_file.py +++ b/src/open_inwoner/pdc/migrations/0035_alter_productfile_file.py @@ -1,13 +1,11 @@ # Generated by Django 3.2.12 on 2022-04-11 11:40 import django.db.models.deletion -from django.db import migrations - import filer.fields.file +from django.db import migrations class Migration(migrations.Migration): - dependencies = [ ("filer", "0012_file_mime_type"), ("pdc", "0034_auto_20220411_1259"), diff --git a/src/open_inwoner/pdc/migrations/0036_alter_productfile_file.py b/src/open_inwoner/pdc/migrations/0036_alter_productfile_file.py index 72a05a720d..8d82658d39 100644 --- a/src/open_inwoner/pdc/migrations/0036_alter_productfile_file.py +++ b/src/open_inwoner/pdc/migrations/0036_alter_productfile_file.py @@ -1,13 +1,11 @@ # Generated by Django 3.2.12 on 2022-04-11 11:41 import django.db.models.deletion -from django.db import migrations - import filer.fields.file +from django.db import migrations class Migration(migrations.Migration): - dependencies = [ ("filer", "0012_file_mime_type"), ("pdc", "0035_alter_productfile_file"), diff --git a/src/open_inwoner/pdc/migrations/0037_category_highlighted.py b/src/open_inwoner/pdc/migrations/0037_category_highlighted.py index f8c6f302fc..728f72f374 100644 --- a/src/open_inwoner/pdc/migrations/0037_category_highlighted.py +++ b/src/open_inwoner/pdc/migrations/0037_category_highlighted.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0036_alter_productfile_file"), ] diff --git a/src/open_inwoner/pdc/migrations/0038_auto_20220601_1435.py b/src/open_inwoner/pdc/migrations/0038_auto_20220601_1435.py index 32d43536e7..2aa555e8da 100644 --- a/src/open_inwoner/pdc/migrations/0038_auto_20220601_1435.py +++ b/src/open_inwoner/pdc/migrations/0038_auto_20220601_1435.py @@ -1,14 +1,12 @@ # Generated by Django 3.2.13 on 2022-06-01 12:35 import django.db.models.deletion +import filer.fields.image from django.conf import settings from django.db import migrations, models -import filer.fields.image - class Migration(migrations.Migration): - dependencies = [ migrations.swappable_dependency(settings.FILER_IMAGE_MODEL), ("pdc", "0037_category_highlighted"), diff --git a/src/open_inwoner/pdc/migrations/0039_alter_category_highlighted.py b/src/open_inwoner/pdc/migrations/0039_alter_category_highlighted.py index ddfd5f8a9f..03cff24d7f 100644 --- a/src/open_inwoner/pdc/migrations/0039_alter_category_highlighted.py +++ b/src/open_inwoner/pdc/migrations/0039_alter_category_highlighted.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0038_auto_20220601_1435"), ] diff --git a/src/open_inwoner/pdc/migrations/0040_auto_20220616_1108.py b/src/open_inwoner/pdc/migrations/0040_auto_20220616_1108.py index f179a4af4b..6e3ea3fdbf 100644 --- a/src/open_inwoner/pdc/migrations/0040_auto_20220616_1108.py +++ b/src/open_inwoner/pdc/migrations/0040_auto_20220616_1108.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0039_alter_category_highlighted"), ] diff --git a/src/open_inwoner/pdc/migrations/0041_auto_20220724_1357.py b/src/open_inwoner/pdc/migrations/0041_auto_20220724_1357.py index 437ca87611..4d2af033a1 100644 --- a/src/open_inwoner/pdc/migrations/0041_auto_20220724_1357.py +++ b/src/open_inwoner/pdc/migrations/0041_auto_20220724_1357.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0040_auto_20220616_1108"), ] diff --git a/src/open_inwoner/pdc/migrations/0042_auto_20220929_1726.py b/src/open_inwoner/pdc/migrations/0042_auto_20220929_1726.py index 8d6a2f6b24..8ee6331ceb 100644 --- a/src/open_inwoner/pdc/migrations/0042_auto_20220929_1726.py +++ b/src/open_inwoner/pdc/migrations/0042_auto_20220929_1726.py @@ -1,11 +1,10 @@ # Generated by Django 3.2.15 on 2022-09-29 15:26 -from django.db import migrations, models import openformsclient.models +from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ("pdc", "0041_auto_20220724_1357"), ] diff --git a/src/open_inwoner/pdc/migrations/0043_question_product.py b/src/open_inwoner/pdc/migrations/0043_question_product.py index 69bc2d3cac..8387b092fb 100644 --- a/src/open_inwoner/pdc/migrations/0043_question_product.py +++ b/src/open_inwoner/pdc/migrations/0043_question_product.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0042_auto_20220929_1726"), ] diff --git a/src/open_inwoner/pdc/migrations/0044_question_category_or_product_null.py b/src/open_inwoner/pdc/migrations/0044_question_category_or_product_null.py index 370ded88d6..b96fe88730 100644 --- a/src/open_inwoner/pdc/migrations/0044_question_category_or_product_null.py +++ b/src/open_inwoner/pdc/migrations/0044_question_category_or_product_null.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0043_question_product"), ] diff --git a/src/open_inwoner/pdc/migrations/0045_auto_20230221_0954.py b/src/open_inwoner/pdc/migrations/0045_auto_20230221_0954.py index 43617a7b43..b375aaf878 100644 --- a/src/open_inwoner/pdc/migrations/0045_auto_20230221_0954.py +++ b/src/open_inwoner/pdc/migrations/0045_auto_20230221_0954.py @@ -1,11 +1,11 @@ # Generated by Django 3.2.15 on 2023-02-21 08:54 from django.db import migrations, models + import open_inwoner.utils.validators class Migration(migrations.Migration): - dependencies = [ ("pdc", "0044_question_category_or_product_null"), ] diff --git a/src/open_inwoner/pdc/migrations/0046_auto_20230221_0954.py b/src/open_inwoner/pdc/migrations/0046_auto_20230221_0954.py index 46410110b9..300afee6ec 100644 --- a/src/open_inwoner/pdc/migrations/0046_auto_20230221_0954.py +++ b/src/open_inwoner/pdc/migrations/0046_auto_20230221_0954.py @@ -13,7 +13,6 @@ def gen_uuid_product_location(apps, schema_editor): class Migration(migrations.Migration): - dependencies = [ ("pdc", "0045_auto_20230221_0954"), ] diff --git a/src/open_inwoner/pdc/migrations/0047_alter_productlocation_uuid.py b/src/open_inwoner/pdc/migrations/0047_alter_productlocation_uuid.py index cf8f964d94..8c716134dd 100644 --- a/src/open_inwoner/pdc/migrations/0047_alter_productlocation_uuid.py +++ b/src/open_inwoner/pdc/migrations/0047_alter_productlocation_uuid.py @@ -1,11 +1,11 @@ # Generated by Django 3.2.15 on 2023-02-21 08:55 -from django.db import migrations, models import uuid +from django.db import migrations, models + class Migration(migrations.Migration): - dependencies = [ ("pdc", "0046_auto_20230221_0954"), ] diff --git a/src/open_inwoner/pdc/migrations/0048_alter_product_summary.py b/src/open_inwoner/pdc/migrations/0048_alter_product_summary.py index 1934f120c8..277a8d889d 100644 --- a/src/open_inwoner/pdc/migrations/0048_alter_product_summary.py +++ b/src/open_inwoner/pdc/migrations/0048_alter_product_summary.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0047_alter_productlocation_uuid"), ] diff --git a/src/open_inwoner/pdc/migrations/0049_auto_20230222_0901.py b/src/open_inwoner/pdc/migrations/0049_auto_20230222_0901.py index a830f6c678..411bf88212 100644 --- a/src/open_inwoner/pdc/migrations/0049_auto_20230222_0901.py +++ b/src/open_inwoner/pdc/migrations/0049_auto_20230222_0901.py @@ -12,7 +12,6 @@ def truncate_product_summary(apps, schema_editor): class Migration(migrations.Migration): - dependencies = [ ("pdc", "0048_alter_product_summary"), ] diff --git a/src/open_inwoner/pdc/migrations/0050_alter_product_summary.py b/src/open_inwoner/pdc/migrations/0050_alter_product_summary.py index 98f0e2ccfe..efafdeb451 100644 --- a/src/open_inwoner/pdc/migrations/0050_alter_product_summary.py +++ b/src/open_inwoner/pdc/migrations/0050_alter_product_summary.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0049_auto_20230222_0901"), ] diff --git a/src/open_inwoner/pdc/migrations/0052_auto_20230221_1518.py b/src/open_inwoner/pdc/migrations/0052_auto_20230221_1518.py index 388ba967c5..781063f46f 100644 --- a/src/open_inwoner/pdc/migrations/0052_auto_20230221_1518.py +++ b/src/open_inwoner/pdc/migrations/0052_auto_20230221_1518.py @@ -14,7 +14,6 @@ def set_order_fields(apps, schema_editor): class Migration(migrations.Migration): - dependencies = [ ("pdc", "0051_auto_20230220_1702"), ] diff --git a/src/open_inwoner/pdc/migrations/0053_alter_product_summary.py b/src/open_inwoner/pdc/migrations/0053_alter_product_summary.py index 953db3ed22..93c90f8284 100644 --- a/src/open_inwoner/pdc/migrations/0053_alter_product_summary.py +++ b/src/open_inwoner/pdc/migrations/0053_alter_product_summary.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0052_auto_20230221_1518"), ] diff --git a/src/open_inwoner/pdc/migrations/0054_alter_organization_logo.py b/src/open_inwoner/pdc/migrations/0054_alter_organization_logo.py index 5c32360ec7..19372198de 100644 --- a/src/open_inwoner/pdc/migrations/0054_alter_organization_logo.py +++ b/src/open_inwoner/pdc/migrations/0054_alter_organization_logo.py @@ -1,13 +1,12 @@ # Generated by Django 3.2.15 on 2023-03-17 10:44 -from django.conf import settings -from django.db import migrations import django.db.models.deletion import filer.fields.image +from django.conf import settings +from django.db import migrations class Migration(migrations.Migration): - dependencies = [ migrations.swappable_dependency(settings.FILER_IMAGE_MODEL), ("pdc", "0053_alter_product_summary"), diff --git a/src/open_inwoner/pdc/migrations/0055_alter_product_content.py b/src/open_inwoner/pdc/migrations/0055_alter_product_content.py index db32a93935..e57bf0e2f2 100644 --- a/src/open_inwoner/pdc/migrations/0055_alter_product_content.py +++ b/src/open_inwoner/pdc/migrations/0055_alter_product_content.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0054_alter_organization_logo"), ] diff --git a/src/open_inwoner/pdc/migrations/0057_auto_20230623_1523.py b/src/open_inwoner/pdc/migrations/0057_auto_20230623_1523.py index c76424c61d..cde4db6158 100644 --- a/src/open_inwoner/pdc/migrations/0057_auto_20230623_1523.py +++ b/src/open_inwoner/pdc/migrations/0057_auto_20230623_1523.py @@ -6,7 +6,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0056_alter_category_options"), ] diff --git a/src/open_inwoner/pdc/migrations/0058_product_button_text.py b/src/open_inwoner/pdc/migrations/0058_product_button_text.py index 95aa48b452..6c4111983a 100644 --- a/src/open_inwoner/pdc/migrations/0058_product_button_text.py +++ b/src/open_inwoner/pdc/migrations/0058_product_button_text.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0057_auto_20230623_1523"), ] diff --git a/src/open_inwoner/pdc/migrations/0059_product_video.py b/src/open_inwoner/pdc/migrations/0059_product_video.py index ea523aa502..a32f21b2ce 100644 --- a/src/open_inwoner/pdc/migrations/0059_product_video.py +++ b/src/open_inwoner/pdc/migrations/0059_product_video.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - dependencies = [ ("media", "0001_initial"), ("pdc", "0058_product_button_text"), diff --git a/src/open_inwoner/pdc/migrations/0060_content_collapsable.py b/src/open_inwoner/pdc/migrations/0060_content_collapsable.py index 83a15c1c23..0e606ab7db 100644 --- a/src/open_inwoner/pdc/migrations/0060_content_collapsable.py +++ b/src/open_inwoner/pdc/migrations/0060_content_collapsable.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0059_product_video"), ] diff --git a/src/open_inwoner/pdc/migrations/0061_auto_20231106_1207.py b/src/open_inwoner/pdc/migrations/0061_auto_20231106_1207.py index dcc7765296..7577c4434c 100644 --- a/src/open_inwoner/pdc/migrations/0061_auto_20231106_1207.py +++ b/src/open_inwoner/pdc/migrations/0061_auto_20231106_1207.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0060_content_collapsable"), ] diff --git a/src/open_inwoner/pdc/migrations/0062_alter_category_zaaktypen.py b/src/open_inwoner/pdc/migrations/0062_alter_category_zaaktypen.py index 0acd6dae15..7c2a6b8fb4 100644 --- a/src/open_inwoner/pdc/migrations/0062_alter_category_zaaktypen.py +++ b/src/open_inwoner/pdc/migrations/0062_alter_category_zaaktypen.py @@ -1,11 +1,10 @@ # Generated by Django 3.2.20 on 2023-11-13 10:55 -from django.db import migrations, models import django_jsonform.models.fields +from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ("pdc", "0061_auto_20231106_1207"), ] diff --git a/src/open_inwoner/pdc/migrations/0063_remove_category_relevante_zaakperiode.py b/src/open_inwoner/pdc/migrations/0063_remove_category_relevante_zaakperiode.py index 1b1b1a94cd..48a91de479 100644 --- a/src/open_inwoner/pdc/migrations/0063_remove_category_relevante_zaakperiode.py +++ b/src/open_inwoner/pdc/migrations/0063_remove_category_relevante_zaakperiode.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0062_alter_category_zaaktypen"), ] diff --git a/src/open_inwoner/pdc/migrations/0064_remove_category_visible_for_authenticated.py b/src/open_inwoner/pdc/migrations/0064_remove_category_visible_for_authenticated.py index a795ea4efd..f319e229c5 100644 --- a/src/open_inwoner/pdc/migrations/0064_remove_category_visible_for_authenticated.py +++ b/src/open_inwoner/pdc/migrations/0064_remove_category_visible_for_authenticated.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0063_remove_category_relevante_zaakperiode"), ] diff --git a/src/open_inwoner/pdc/migrations/0065_auto_20240112_1046.py b/src/open_inwoner/pdc/migrations/0065_auto_20240112_1046.py index e1a691a7de..cba8bd9142 100644 --- a/src/open_inwoner/pdc/migrations/0065_auto_20240112_1046.py +++ b/src/open_inwoner/pdc/migrations/0065_auto_20240112_1046.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0064_remove_category_visible_for_authenticated"), ] diff --git a/src/open_inwoner/pdc/migrations/0066_category_access_groups.py b/src/open_inwoner/pdc/migrations/0066_category_access_groups.py index 7e7ddcd095..07c150581f 100644 --- a/src/open_inwoner/pdc/migrations/0066_category_access_groups.py +++ b/src/open_inwoner/pdc/migrations/0066_category_access_groups.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("auth", "0012_alter_user_first_name_max_length"), ("pdc", "0065_auto_20240112_1046"), diff --git a/src/open_inwoner/pdc/models/category.py b/src/open_inwoner/pdc/models/category.py index 9d0abdb3af..16328c6890 100644 --- a/src/open_inwoner/pdc/models/category.py +++ b/src/open_inwoner/pdc/models/category.py @@ -1,7 +1,6 @@ from django.db import models from django.urls import reverse from django.utils.translation import gettext_lazy as _ - from django_jsonform.models.fields import ArrayField from filer.fields.image import FilerImageField from treebeard.exceptions import InvalidMoveToDescendant diff --git a/src/open_inwoner/pdc/models/faq.py b/src/open_inwoner/pdc/models/faq.py index b0f3d4e26a..050bf9f4c3 100644 --- a/src/open_inwoner/pdc/models/faq.py +++ b/src/open_inwoner/pdc/models/faq.py @@ -2,7 +2,6 @@ from django.db import models from django.db.models import CheckConstraint, Q from django.utils.translation import gettext_lazy as _ - from ordered_model.models import OrderedModel from open_inwoner.pdc.managers import QuestionQueryset diff --git a/src/open_inwoner/pdc/models/mixins.py b/src/open_inwoner/pdc/models/mixins.py index ad8725925e..572b2915ce 100644 --- a/src/open_inwoner/pdc/models/mixins.py +++ b/src/open_inwoner/pdc/models/mixins.py @@ -5,7 +5,6 @@ from django.core.exceptions import ValidationError from django.db import connection, models from django.utils.translation import gettext_lazy as _ - from geopy.exc import GeopyError from localflavor.nl.models import NLZipCodeField diff --git a/src/open_inwoner/pdc/models/organization.py b/src/open_inwoner/pdc/models/organization.py index 5438accee3..c02552d149 100644 --- a/src/open_inwoner/pdc/models/organization.py +++ b/src/open_inwoner/pdc/models/organization.py @@ -1,6 +1,5 @@ from django.db import models from django.utils.translation import gettext_lazy as _ - from filer.fields.image import FilerImageField from open_inwoner.utils.validators import DutchPhoneNumberValidator diff --git a/src/open_inwoner/pdc/models/product.py b/src/open_inwoner/pdc/models/product.py index a7fe3f37f3..7950837d28 100644 --- a/src/open_inwoner/pdc/models/product.py +++ b/src/open_inwoner/pdc/models/product.py @@ -5,7 +5,6 @@ from django.db import models from django.urls import reverse from django.utils.translation import gettext_lazy as _ - from filer.fields.file import FilerFileField from filer.fields.image import FilerImageField from openformsclient.models import OpenFormsSlugField diff --git a/src/open_inwoner/pdc/models/tag.py b/src/open_inwoner/pdc/models/tag.py index 209de89c4b..6a09200141 100644 --- a/src/open_inwoner/pdc/models/tag.py +++ b/src/open_inwoner/pdc/models/tag.py @@ -1,6 +1,5 @@ from django.db import models from django.utils.translation import gettext_lazy as _ - from filer.fields.image import FilerImageField diff --git a/src/open_inwoner/pdc/resources/import_resource.py b/src/open_inwoner/pdc/resources/import_resource.py index cf43cbfeec..100f726ccb 100644 --- a/src/open_inwoner/pdc/resources/import_resource.py +++ b/src/open_inwoner/pdc/resources/import_resource.py @@ -1,6 +1,5 @@ from django.utils.text import slugify from django.utils.translation import gettext_lazy as _ - from import_export import fields, resources from import_export.exceptions import ImportExportError from import_export.instance_loaders import CachedInstanceLoader diff --git a/src/open_inwoner/pdc/resources/widgets.py b/src/open_inwoner/pdc/resources/widgets.py index 29bbd77b6d..d196b73249 100644 --- a/src/open_inwoner/pdc/resources/widgets.py +++ b/src/open_inwoner/pdc/resources/widgets.py @@ -1,6 +1,5 @@ from django.core.exceptions import ValidationError from django.utils.translation import gettext_lazy as _ - from import_export.widgets import ManyToManyWidget diff --git a/src/open_inwoner/pdc/tests/factories.py b/src/open_inwoner/pdc/tests/factories.py index 28bcf2d1a1..0149c6ec16 100644 --- a/src/open_inwoner/pdc/tests/factories.py +++ b/src/open_inwoner/pdc/tests/factories.py @@ -1,8 +1,7 @@ +import factory.fuzzy from django.contrib.gis.geos import Point from django.utils.text import slugify -import factory.fuzzy - from ..models import ( Category, Organization, diff --git a/src/open_inwoner/pdc/tests/test_category.py b/src/open_inwoner/pdc/tests/test_category.py index c0ec9c0219..001fa91e57 100644 --- a/src/open_inwoner/pdc/tests/test_category.py +++ b/src/open_inwoner/pdc/tests/test_category.py @@ -1,7 +1,6 @@ from django.conf import settings from django.test import override_settings from django.urls import reverse - from django_webtest import WebTest from open_inwoner.accounts.tests.factories import ( diff --git a/src/open_inwoner/pdc/tests/test_category_admin.py b/src/open_inwoner/pdc/tests/test_category_admin.py index 4c134ea736..c54a0a4ee3 100644 --- a/src/open_inwoner/pdc/tests/test_category_admin.py +++ b/src/open_inwoner/pdc/tests/test_category_admin.py @@ -4,7 +4,6 @@ from django.contrib.auth.models import Permission from django.urls import reverse from django.utils.translation import gettext as _ - from django_webtest import WebTest from maykin_2fa.test import disable_admin_mfa diff --git a/src/open_inwoner/pdc/tests/test_category_resources.py b/src/open_inwoner/pdc/tests/test_category_resources.py index f87d89759c..f28c86ca43 100644 --- a/src/open_inwoner/pdc/tests/test_category_resources.py +++ b/src/open_inwoner/pdc/tests/test_category_resources.py @@ -1,8 +1,7 @@ from collections import OrderedDict -from django.test import TestCase - import tablib +from django.test import TestCase from import_export.exceptions import ImportExportError from ..models import Category diff --git a/src/open_inwoner/pdc/tests/test_faq.py b/src/open_inwoner/pdc/tests/test_faq.py index f465652008..738cda890c 100644 --- a/src/open_inwoner/pdc/tests/test_faq.py +++ b/src/open_inwoner/pdc/tests/test_faq.py @@ -2,7 +2,6 @@ from django.db import IntegrityError from django.test import override_settings from django.urls import reverse - from django_webtest import WebTest from ..models import Question diff --git a/src/open_inwoner/pdc/tests/test_logging.py b/src/open_inwoner/pdc/tests/test_logging.py index 574bd7e234..9962712f81 100644 --- a/src/open_inwoner/pdc/tests/test_logging.py +++ b/src/open_inwoner/pdc/tests/test_logging.py @@ -1,9 +1,8 @@ import logging +import tablib from django.urls import reverse from django.utils.translation import gettext as _ - -import tablib from django_webtest import WebTest from freezegun import freeze_time from maykin_2fa.test import disable_admin_mfa diff --git a/src/open_inwoner/pdc/tests/test_organization_location.py b/src/open_inwoner/pdc/tests/test_organization_location.py index e362fe5553..d005d95e10 100644 --- a/src/open_inwoner/pdc/tests/test_organization_location.py +++ b/src/open_inwoner/pdc/tests/test_organization_location.py @@ -2,7 +2,6 @@ from django.urls import reverse from django.utils.translation import gettext_lazy as _ - from django_webtest import WebTest from maykin_2fa.test import disable_admin_mfa diff --git a/src/open_inwoner/pdc/tests/test_product.py b/src/open_inwoner/pdc/tests/test_product.py index 6919de0ac9..d51d2300d0 100644 --- a/src/open_inwoner/pdc/tests/test_product.py +++ b/src/open_inwoner/pdc/tests/test_product.py @@ -3,7 +3,6 @@ from django.test import override_settings, tag from django.urls import reverse - from django_webtest import WebTest from playwright.sync_api import expect @@ -284,7 +283,8 @@ def test_button_text_change(self): def test_sidemenu_button_is_not_rendered_when_cta_inside_product_content(self): product = ProductFactory( - content=r"Some content \[CTABUTTON\]", link="http://www.example.com" # noqa + content=r"Some content \[CTABUTTON\]", + link="http://www.example.com", # noqa ) response = self.app.get( diff --git a/src/open_inwoner/pdc/tests/test_product_admin.py b/src/open_inwoner/pdc/tests/test_product_admin.py index f10316981d..0975ebedb3 100644 --- a/src/open_inwoner/pdc/tests/test_product_admin.py +++ b/src/open_inwoner/pdc/tests/test_product_admin.py @@ -1,7 +1,6 @@ from django.contrib.auth.models import Permission from django.urls import reverse from django.utils.translation import gettext as _ - from django_webtest import WebTest from maykin_2fa.test import disable_admin_mfa diff --git a/src/open_inwoner/pdc/tests/test_product_finder.py b/src/open_inwoner/pdc/tests/test_product_finder.py index b79ccdd476..9296a27526 100644 --- a/src/open_inwoner/pdc/tests/test_product_finder.py +++ b/src/open_inwoner/pdc/tests/test_product_finder.py @@ -1,6 +1,5 @@ from django.test import override_settings from django.urls import reverse - from django_webtest import WebTest from ..models import ProductCondition diff --git a/src/open_inwoner/pdc/tests/test_product_location.py b/src/open_inwoner/pdc/tests/test_product_location.py index 5f1d55ae13..6d43e196f1 100644 --- a/src/open_inwoner/pdc/tests/test_product_location.py +++ b/src/open_inwoner/pdc/tests/test_product_location.py @@ -5,7 +5,6 @@ from django.test import TestCase, override_settings from django.urls import reverse from django.utils.translation import gettext_lazy as _ - from django_webtest import WebTest from maykin_2fa.test import disable_admin_mfa diff --git a/src/open_inwoner/pdc/tests/test_product_resources.py b/src/open_inwoner/pdc/tests/test_product_resources.py index 80eb5720f2..baebd29a87 100644 --- a/src/open_inwoner/pdc/tests/test_product_resources.py +++ b/src/open_inwoner/pdc/tests/test_product_resources.py @@ -1,9 +1,8 @@ from collections import OrderedDict +import tablib from django.core.exceptions import ValidationError from django.test import TestCase - -import tablib from freezegun import freeze_time from import_export.exceptions import ImportExportError diff --git a/src/open_inwoner/pdc/utils.py b/src/open_inwoner/pdc/utils.py index 7577e69fe0..74fba898ea 100644 --- a/src/open_inwoner/pdc/utils.py +++ b/src/open_inwoner/pdc/utils.py @@ -1,7 +1,6 @@ -from django.utils.text import slugify - import markdown from bs4 import BeautifulSoup +from django.utils.text import slugify PRODUCT_PATH_NAME = "products" diff --git a/src/open_inwoner/pdc/views.py b/src/open_inwoner/pdc/views.py index 4bd1f561be..bcf9bfcacd 100644 --- a/src/open_inwoner/pdc/views.py +++ b/src/open_inwoner/pdc/views.py @@ -5,7 +5,6 @@ from django.utils.functional import cached_property from django.utils.translation import gettext_lazy as _ from django.views.generic import DetailView, FormView, ListView, TemplateView - from view_breadcrumbs import BaseBreadcrumbMixin, ListBreadcrumbMixin from open_inwoner.configurations.models import SiteConfiguration diff --git a/src/open_inwoner/plans/migrations/0001_initial.py b/src/open_inwoner/plans/migrations/0001_initial.py index 72480fd24a..78cf0fc460 100644 --- a/src/open_inwoner/plans/migrations/0001_initial.py +++ b/src/open_inwoner/plans/migrations/0001_initial.py @@ -8,7 +8,6 @@ class Migration(migrations.Migration): - initial = True dependencies = [ diff --git a/src/open_inwoner/plans/migrations/0002_auto_20220214_1440.py b/src/open_inwoner/plans/migrations/0002_auto_20220214_1440.py index e5cde508c9..592d0c7449 100644 --- a/src/open_inwoner/plans/migrations/0002_auto_20220214_1440.py +++ b/src/open_inwoner/plans/migrations/0002_auto_20220214_1440.py @@ -6,7 +6,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0027_auto_20220214_1440"), migrations.swappable_dependency(settings.AUTH_USER_MODEL), diff --git a/src/open_inwoner/plans/migrations/0003_auto_20220218_1359.py b/src/open_inwoner/plans/migrations/0003_auto_20220218_1359.py index 409c18aa74..f0be816b36 100644 --- a/src/open_inwoner/plans/migrations/0003_auto_20220218_1359.py +++ b/src/open_inwoner/plans/migrations/0003_auto_20220218_1359.py @@ -8,7 +8,6 @@ class Migration(migrations.Migration): - dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ("accounts", "0029_auto_20220218_1359"), diff --git a/src/open_inwoner/plans/migrations/0003_auto_20220221_1309.py b/src/open_inwoner/plans/migrations/0003_auto_20220221_1309.py index 692a965894..1fece3e8fb 100644 --- a/src/open_inwoner/plans/migrations/0003_auto_20220221_1309.py +++ b/src/open_inwoner/plans/migrations/0003_auto_20220221_1309.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0028_auto_20220214_1538"), ("plans", "0002_auto_20220214_1440"), diff --git a/src/open_inwoner/plans/migrations/0004_auto_20220221_1734.py b/src/open_inwoner/plans/migrations/0004_auto_20220221_1734.py index e5d1edf4cf..8984d3fd7e 100644 --- a/src/open_inwoner/plans/migrations/0004_auto_20220221_1734.py +++ b/src/open_inwoner/plans/migrations/0004_auto_20220221_1734.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - dependencies = [ ("plans", "0003_auto_20220221_1309"), ] diff --git a/src/open_inwoner/plans/migrations/0005_merge_0003_auto_20220218_1359_0004_auto_20220221_1734.py b/src/open_inwoner/plans/migrations/0005_merge_0003_auto_20220218_1359_0004_auto_20220221_1734.py index 90fa1ffff9..a3ac8d4ae4 100644 --- a/src/open_inwoner/plans/migrations/0005_merge_0003_auto_20220218_1359_0004_auto_20220221_1734.py +++ b/src/open_inwoner/plans/migrations/0005_merge_0003_auto_20220218_1359_0004_auto_20220221_1734.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("plans", "0003_auto_20220218_1359"), ("plans", "0004_auto_20220221_1734"), diff --git a/src/open_inwoner/plans/migrations/0006_auto_20220302_1028.py b/src/open_inwoner/plans/migrations/0006_auto_20220302_1028.py index ba46d3c3e7..aa0e3f1fc1 100644 --- a/src/open_inwoner/plans/migrations/0006_auto_20220302_1028.py +++ b/src/open_inwoner/plans/migrations/0006_auto_20220302_1028.py @@ -1,13 +1,11 @@ # Generated by Django 3.2.12 on 2022-03-02 09:28 import django.db.models.deletion -from django.db import migrations, models - import filer.fields.file +from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ("filer", "0012_file_mime_type"), ("accounts", "0029_auto_20220218_1359"), diff --git a/src/open_inwoner/plans/migrations/0007_auto_20220304_1619.py b/src/open_inwoner/plans/migrations/0007_auto_20220304_1619.py index 7077dd8315..62ede3ac45 100644 --- a/src/open_inwoner/plans/migrations/0007_auto_20220304_1619.py +++ b/src/open_inwoner/plans/migrations/0007_auto_20220304_1619.py @@ -1,13 +1,11 @@ # Generated by Django 3.2.12 on 2022-03-04 15:19 import django.db.models.deletion -from django.db import migrations, models - import filer.fields.file +from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ("filer", "0012_file_mime_type"), ("plans", "0006_auto_20220302_1028"), diff --git a/src/open_inwoner/plans/migrations/0008_alter_plan_options.py b/src/open_inwoner/plans/migrations/0008_alter_plan_options.py index e8db2ee37a..ae7e1c2830 100644 --- a/src/open_inwoner/plans/migrations/0008_alter_plan_options.py +++ b/src/open_inwoner/plans/migrations/0008_alter_plan_options.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("plans", "0007_auto_20220304_1619"), ] diff --git a/src/open_inwoner/plans/migrations/0009_plan_plan_contacts.py b/src/open_inwoner/plans/migrations/0009_plan_plan_contacts.py index d961b688da..417946adb1 100644 --- a/src/open_inwoner/plans/migrations/0009_plan_plan_contacts.py +++ b/src/open_inwoner/plans/migrations/0009_plan_plan_contacts.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0048_auto_20221205_0921"), ("plans", "0008_alter_plan_options"), diff --git a/src/open_inwoner/plans/migrations/0010_auto_20221205_0921.py b/src/open_inwoner/plans/migrations/0010_auto_20221205_0921.py index 846352eaef..0cb9bace57 100644 --- a/src/open_inwoner/plans/migrations/0010_auto_20221205_0921.py +++ b/src/open_inwoner/plans/migrations/0010_auto_20221205_0921.py @@ -11,7 +11,6 @@ def populate_plan_contacts(apps, schema_editor): class Migration(migrations.Migration): - dependencies = [ ("plans", "0009_plan_plan_contacts"), ] diff --git a/src/open_inwoner/plans/migrations/0011_remove_plan_contacts.py b/src/open_inwoner/plans/migrations/0011_remove_plan_contacts.py index 4c01aa64b8..bb2351ad53 100644 --- a/src/open_inwoner/plans/migrations/0011_remove_plan_contacts.py +++ b/src/open_inwoner/plans/migrations/0011_remove_plan_contacts.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("plans", "0010_auto_20221205_0921"), ] diff --git a/src/open_inwoner/plans/migrations/0012_remove_actiontemplate_goal.py b/src/open_inwoner/plans/migrations/0012_remove_actiontemplate_goal.py index e1112967e5..658e925c24 100644 --- a/src/open_inwoner/plans/migrations/0012_remove_actiontemplate_goal.py +++ b/src/open_inwoner/plans/migrations/0012_remove_actiontemplate_goal.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("plans", "0011_remove_plan_contacts"), ] diff --git a/src/open_inwoner/plans/migrations/0013_auto_20230223_1115.py b/src/open_inwoner/plans/migrations/0013_auto_20230223_1115.py index b14a9a0440..26058bc651 100644 --- a/src/open_inwoner/plans/migrations/0013_auto_20230223_1115.py +++ b/src/open_inwoner/plans/migrations/0013_auto_20230223_1115.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0055_user_image"), ("plans", "0012_remove_actiontemplate_goal"), diff --git a/src/open_inwoner/plans/migrations/0014_auto_20230306_1017.py b/src/open_inwoner/plans/migrations/0014_auto_20230306_1017.py index cf2a98785f..9378aaf9f1 100644 --- a/src/open_inwoner/plans/migrations/0014_auto_20230306_1017.py +++ b/src/open_inwoner/plans/migrations/0014_auto_20230306_1017.py @@ -6,7 +6,6 @@ class Migration(migrations.Migration): - dependencies = [ ("accounts", "0055_user_image"), ("plans", "0013_auto_20230223_1115"), diff --git a/src/open_inwoner/plans/migrations/0015_plancontact_notify_new.py b/src/open_inwoner/plans/migrations/0015_plancontact_notify_new.py index 7785dd23a3..36fb64f534 100644 --- a/src/open_inwoner/plans/migrations/0015_plancontact_notify_new.py +++ b/src/open_inwoner/plans/migrations/0015_plancontact_notify_new.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("plans", "0014_auto_20230306_1017"), ] diff --git a/src/open_inwoner/plans/migrations/0016_alter_plancontact_notify_new.py b/src/open_inwoner/plans/migrations/0016_alter_plancontact_notify_new.py index 71faed0d75..406bd1ce67 100644 --- a/src/open_inwoner/plans/migrations/0016_alter_plancontact_notify_new.py +++ b/src/open_inwoner/plans/migrations/0016_alter_plancontact_notify_new.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("plans", "0015_plancontact_notify_new"), ] diff --git a/src/open_inwoner/plans/models.py b/src/open_inwoner/plans/models.py index aa7fcc570b..9e078c3068 100644 --- a/src/open_inwoner/plans/models.py +++ b/src/open_inwoner/plans/models.py @@ -6,7 +6,6 @@ from django.template.loader import render_to_string from django.urls import reverse from django.utils.translation import gettext_lazy as _ - from filer.fields.file import FilerFileField from open_inwoner.accounts.choices import StatusChoices, TypeChoices diff --git a/src/open_inwoner/plans/tests/factories.py b/src/open_inwoner/plans/tests/factories.py index 7cff91ae76..a27fe8ce17 100644 --- a/src/open_inwoner/plans/tests/factories.py +++ b/src/open_inwoner/plans/tests/factories.py @@ -1,6 +1,5 @@ -from django.core.files.uploadedfile import SimpleUploadedFile - import factory +from django.core.files.uploadedfile import SimpleUploadedFile from open_inwoner.accounts.tests.factories import UserFactory diff --git a/src/open_inwoner/plans/tests/test_logging.py b/src/open_inwoner/plans/tests/test_logging.py index 7cec5e983a..ca413ded7b 100644 --- a/src/open_inwoner/plans/tests/test_logging.py +++ b/src/open_inwoner/plans/tests/test_logging.py @@ -2,7 +2,6 @@ from django.test import override_settings from django.urls import reverse from django.utils.translation import gettext_lazy as _ - from django_webtest import WebTest from freezegun import freeze_time from privates.test import temp_private_root diff --git a/src/open_inwoner/plans/tests/test_views.py b/src/open_inwoner/plans/tests/test_views.py index e285e9e359..f3b3869e07 100644 --- a/src/open_inwoner/plans/tests/test_views.py +++ b/src/open_inwoner/plans/tests/test_views.py @@ -6,7 +6,6 @@ from django.test import override_settings, tag from django.urls import reverse from django.utils.translation import gettext as _ - from django_webtest import WebTest from freezegun import freeze_time from webtest import Upload diff --git a/src/open_inwoner/plans/views.py b/src/open_inwoner/plans/views.py index 9dd5d8b811..a83e8d1e4d 100644 --- a/src/open_inwoner/plans/views.py +++ b/src/open_inwoner/plans/views.py @@ -1,5 +1,6 @@ from datetime import date +from cms.apphook_pool import apphook_pool from django.contrib.auth.mixins import LoginRequiredMixin from django.core.exceptions import ObjectDoesNotExist from django.db.models import Q @@ -9,8 +10,6 @@ from django.utils.functional import cached_property from django.utils.translation import gettext as _ from django.views.generic import CreateView, DetailView, ListView, UpdateView - -from cms.apphook_pool import apphook_pool from view_breadcrumbs import BaseBreadcrumbMixin from open_inwoner.accounts.choices import ContactTypeChoices @@ -435,7 +434,7 @@ def get_object(self): return Plan.objects.connected(self.request.user).get( uuid=self.kwargs.get("uuid") ) - except ObjectDoesNotExist as e: + except ObjectDoesNotExist: raise Http404 def form_valid(self, form): @@ -486,7 +485,7 @@ def get_plan(self): return Plan.objects.connected(self.request.user).get( uuid=self.kwargs.get("plan_uuid") ) - except ObjectDoesNotExist as e: + except ObjectDoesNotExist: raise Http404 def form_valid(self, form): @@ -520,7 +519,7 @@ def get_plan(self): return Plan.objects.connected(self.request.user).get( uuid=self.kwargs.get("plan_uuid") ) - except ObjectDoesNotExist as e: + except ObjectDoesNotExist: raise Http404 def get_template_tag_args(self, context): @@ -535,7 +534,7 @@ def get_plan(self): return Plan.objects.connected(self.request.user).get( uuid=self.kwargs.get("plan_uuid") ) - except ObjectDoesNotExist as e: + except ObjectDoesNotExist: raise Http404 def get_success_url(self) -> str: @@ -578,7 +577,7 @@ def get_plan(self): return Plan.objects.connected(self.request.user).get( uuid=self.kwargs.get("plan_uuid") ) - except ObjectDoesNotExist as e: + except ObjectDoesNotExist: raise Http404 diff --git a/src/open_inwoner/qmatic/admin.py b/src/open_inwoner/qmatic/admin.py index c5b9a27da9..951d56b147 100644 --- a/src/open_inwoner/qmatic/admin.py +++ b/src/open_inwoner/qmatic/admin.py @@ -1,5 +1,4 @@ from django.contrib import admin - from solo.admin import SingletonModelAdmin from .models import QmaticConfig diff --git a/src/open_inwoner/qmatic/migrations/0001_initial.py b/src/open_inwoner/qmatic/migrations/0001_initial.py index e1bb80bb01..afc3d0ea06 100644 --- a/src/open_inwoner/qmatic/migrations/0001_initial.py +++ b/src/open_inwoner/qmatic/migrations/0001_initial.py @@ -1,11 +1,10 @@ # Generated by Django 4.2.10 on 2024-03-19 10:13 -from django.db import migrations, models import django.db.models.deletion +from django.db import migrations, models class Migration(migrations.Migration): - initial = True dependencies = [ diff --git a/src/open_inwoner/qmatic/migrations/0002_qmaticconfig_booking_base_url.py b/src/open_inwoner/qmatic/migrations/0002_qmaticconfig_booking_base_url.py index d39629424a..7c390dfe1a 100644 --- a/src/open_inwoner/qmatic/migrations/0002_qmaticconfig_booking_base_url.py +++ b/src/open_inwoner/qmatic/migrations/0002_qmaticconfig_booking_base_url.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("qmatic", "0001_initial"), ] diff --git a/src/open_inwoner/qmatic/migrations/0003_alter_qmaticconfig_service.py b/src/open_inwoner/qmatic/migrations/0003_alter_qmaticconfig_service.py index d555f0986f..ae3310e249 100644 --- a/src/open_inwoner/qmatic/migrations/0003_alter_qmaticconfig_service.py +++ b/src/open_inwoner/qmatic/migrations/0003_alter_qmaticconfig_service.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - dependencies = [ ("zgw_consumers", "0019_alter_service_uuid"), ("qmatic", "0002_qmaticconfig_booking_base_url"), diff --git a/src/open_inwoner/qmatic/migrations/0004_alter_qmaticconfig_service.py b/src/open_inwoner/qmatic/migrations/0004_alter_qmaticconfig_service.py index ddfd3b964e..b3f108588e 100644 --- a/src/open_inwoner/qmatic/migrations/0004_alter_qmaticconfig_service.py +++ b/src/open_inwoner/qmatic/migrations/0004_alter_qmaticconfig_service.py @@ -1,11 +1,10 @@ # Generated by Django 4.2.11 on 2024-06-06 09:25 -from django.db import migrations, models import django.db.models.deletion +from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ("zgw_consumers", "0019_alter_service_uuid"), ("qmatic", "0003_alter_qmaticconfig_service"), diff --git a/src/open_inwoner/qmatic/models.py b/src/open_inwoner/qmatic/models.py index eabcc45caf..ab6ae8c687 100644 --- a/src/open_inwoner/qmatic/models.py +++ b/src/open_inwoner/qmatic/models.py @@ -1,6 +1,5 @@ from django.db import models from django.utils.translation import gettext_lazy as _ - from solo.models import SingletonModel from zgw_consumers.constants import APITypes diff --git a/src/open_inwoner/qmatic/tests/data.py b/src/open_inwoner/qmatic/tests/data.py index 9d508abb7a..feb91ef101 100644 --- a/src/open_inwoner/qmatic/tests/data.py +++ b/src/open_inwoner/qmatic/tests/data.py @@ -1,5 +1,4 @@ from django.urls import reverse - from zgw_consumers.constants import APITypes from zgw_consumers.test.factories import ServiceFactory diff --git a/src/open_inwoner/questionnaire/admin.py b/src/open_inwoner/questionnaire/admin.py index dc4a63fa67..0f800e9325 100644 --- a/src/open_inwoner/questionnaire/admin.py +++ b/src/open_inwoner/questionnaire/admin.py @@ -2,7 +2,6 @@ from django.contrib import admin from django.forms import BaseModelFormSet from django.utils.translation import gettext as _ - from treebeard.admin import TreeAdmin from treebeard.forms import movenodeform_factory @@ -104,14 +103,14 @@ class QuestionnaireStepAdmin(TreeAdmin): def display_question_answer(self, obj): redirect = "" if obj.redirect_to: - redirect = " - doorsturen -> {} - {}".format( - obj.redirect_to.question, obj.redirect_to.id + redirect = ( + f" - doorsturen -> {obj.redirect_to.question} - {obj.redirect_to.id}" ) - postfix = " ({} - {}{})".format(obj.id, obj.code, redirect) + postfix = f" ({obj.id} - {obj.code}{redirect})" if not obj.parent_answer: return obj.question + postfix - return "{} -> {}".format(obj.parent_answer, obj.question) + postfix + return f"{obj.parent_answer} -> {obj.question}" + postfix display_question_answer.allow_tags = True diff --git a/src/open_inwoner/questionnaire/migrations/0001_initial.py b/src/open_inwoner/questionnaire/migrations/0001_initial.py index 0af5715bd8..9bbd7f7a63 100644 --- a/src/open_inwoner/questionnaire/migrations/0001_initial.py +++ b/src/open_inwoner/questionnaire/migrations/0001_initial.py @@ -1,13 +1,11 @@ # Generated by Django 3.2.12 on 2022-02-22 15:30 import django.db.models.deletion -from django.db import migrations, models - import filer.fields.file +from django.db import migrations, models class Migration(migrations.Migration): - initial = True dependencies = [ diff --git a/src/open_inwoner/questionnaire/migrations/0002_alter_questionnairestep_slug.py b/src/open_inwoner/questionnaire/migrations/0002_alter_questionnairestep_slug.py index 2cde864cd6..9fb52c4a7c 100644 --- a/src/open_inwoner/questionnaire/migrations/0002_alter_questionnairestep_slug.py +++ b/src/open_inwoner/questionnaire/migrations/0002_alter_questionnairestep_slug.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("questionnaire", "0001_initial"), ] diff --git a/src/open_inwoner/questionnaire/migrations/0003_questionnairestep_question_subject.py b/src/open_inwoner/questionnaire/migrations/0003_questionnairestep_question_subject.py index 9e32a25ded..15427acf8c 100644 --- a/src/open_inwoner/questionnaire/migrations/0003_questionnairestep_question_subject.py +++ b/src/open_inwoner/questionnaire/migrations/0003_questionnairestep_question_subject.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("questionnaire", "0002_alter_questionnairestep_slug"), ] diff --git a/src/open_inwoner/questionnaire/migrations/0004_alter_questionnairestepfile_file.py b/src/open_inwoner/questionnaire/migrations/0004_alter_questionnairestepfile_file.py index fb3a4bb07a..1ee57c74c4 100644 --- a/src/open_inwoner/questionnaire/migrations/0004_alter_questionnairestepfile_file.py +++ b/src/open_inwoner/questionnaire/migrations/0004_alter_questionnairestepfile_file.py @@ -1,13 +1,11 @@ # Generated by Django 3.2.12 on 2022-03-01 10:08 import django.db.models.deletion -from django.db import migrations - import filer.fields.file +from django.db import migrations class Migration(migrations.Migration): - dependencies = [ ("filer", "0012_file_mime_type"), ("questionnaire", "0003_questionnairestep_question_subject"), diff --git a/src/open_inwoner/questionnaire/migrations/0005_questionnairestep_is_default.py b/src/open_inwoner/questionnaire/migrations/0005_questionnairestep_is_default.py index c1e2420ad5..1fd2cfd746 100644 --- a/src/open_inwoner/questionnaire/migrations/0005_questionnairestep_is_default.py +++ b/src/open_inwoner/questionnaire/migrations/0005_questionnairestep_is_default.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("questionnaire", "0004_alter_questionnairestepfile_file"), ] diff --git a/src/open_inwoner/questionnaire/migrations/0006_auto_20220328_1042.py b/src/open_inwoner/questionnaire/migrations/0006_auto_20220328_1042.py index 2c6aa41b5b..d7329e54fb 100644 --- a/src/open_inwoner/questionnaire/migrations/0006_auto_20220328_1042.py +++ b/src/open_inwoner/questionnaire/migrations/0006_auto_20220328_1042.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("questionnaire", "0005_questionnairestep_is_default"), ] diff --git a/src/open_inwoner/questionnaire/migrations/0006_auto_20220328_1555.py b/src/open_inwoner/questionnaire/migrations/0006_auto_20220328_1555.py index 1ab50b9936..3a5dd65bf3 100644 --- a/src/open_inwoner/questionnaire/migrations/0006_auto_20220328_1555.py +++ b/src/open_inwoner/questionnaire/migrations/0006_auto_20220328_1555.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("questionnaire", "0005_questionnairestep_is_default"), ] diff --git a/src/open_inwoner/questionnaire/migrations/0006_remove_questionnairestep_is_default.py b/src/open_inwoner/questionnaire/migrations/0006_remove_questionnairestep_is_default.py index 750d622bc4..bdfe13ac6f 100644 --- a/src/open_inwoner/questionnaire/migrations/0006_remove_questionnairestep_is_default.py +++ b/src/open_inwoner/questionnaire/migrations/0006_remove_questionnairestep_is_default.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("questionnaire", "0005_questionnairestep_is_default"), ] diff --git a/src/open_inwoner/questionnaire/migrations/0007_auto_20220328_1122.py b/src/open_inwoner/questionnaire/migrations/0007_auto_20220328_1122.py index a2c20a8fbd..20f0791b62 100644 --- a/src/open_inwoner/questionnaire/migrations/0007_auto_20220328_1122.py +++ b/src/open_inwoner/questionnaire/migrations/0007_auto_20220328_1122.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("questionnaire", "0006_remove_questionnairestep_is_default"), ] diff --git a/src/open_inwoner/questionnaire/migrations/0007_merge_0006_auto_20220328_1042_0006_auto_20220328_1555.py b/src/open_inwoner/questionnaire/migrations/0007_merge_0006_auto_20220328_1042_0006_auto_20220328_1555.py index 0363c3c1b8..a6ffd08dec 100644 --- a/src/open_inwoner/questionnaire/migrations/0007_merge_0006_auto_20220328_1042_0006_auto_20220328_1555.py +++ b/src/open_inwoner/questionnaire/migrations/0007_merge_0006_auto_20220328_1042_0006_auto_20220328_1555.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("questionnaire", "0006_auto_20220328_1042"), ("questionnaire", "0006_auto_20220328_1555"), diff --git a/src/open_inwoner/questionnaire/migrations/0008_alter_questionnairestep_options.py b/src/open_inwoner/questionnaire/migrations/0008_alter_questionnairestep_options.py index 97fd68fbc1..92308b761c 100644 --- a/src/open_inwoner/questionnaire/migrations/0008_alter_questionnairestep_options.py +++ b/src/open_inwoner/questionnaire/migrations/0008_alter_questionnairestep_options.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("questionnaire", "0007_auto_20220328_1122"), ] diff --git a/src/open_inwoner/questionnaire/migrations/0009_merge_20220329_0935.py b/src/open_inwoner/questionnaire/migrations/0009_merge_20220329_0935.py index 37f0a40004..b503dc79c0 100644 --- a/src/open_inwoner/questionnaire/migrations/0009_merge_20220329_0935.py +++ b/src/open_inwoner/questionnaire/migrations/0009_merge_20220329_0935.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("questionnaire", "0006_auto_20220328_1042"), ("questionnaire", "0008_alter_questionnairestep_options"), diff --git a/src/open_inwoner/questionnaire/migrations/0010_merge_20220329_1651.py b/src/open_inwoner/questionnaire/migrations/0010_merge_20220329_1651.py index a95f14698c..1ac6b465b2 100644 --- a/src/open_inwoner/questionnaire/migrations/0010_merge_20220329_1651.py +++ b/src/open_inwoner/questionnaire/migrations/0010_merge_20220329_1651.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("questionnaire", "0007_merge_0006_auto_20220328_1042_0006_auto_20220328_1555"), ("questionnaire", "0009_merge_20220329_0935"), diff --git a/src/open_inwoner/questionnaire/migrations/0011_alter_questionnairestep_options.py b/src/open_inwoner/questionnaire/migrations/0011_alter_questionnairestep_options.py index 10c919cb95..07af84f471 100644 --- a/src/open_inwoner/questionnaire/migrations/0011_alter_questionnairestep_options.py +++ b/src/open_inwoner/questionnaire/migrations/0011_alter_questionnairestep_options.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("questionnaire", "0010_merge_20220329_1651"), ] diff --git a/src/open_inwoner/questionnaire/migrations/0012_questionnairestep_code.py b/src/open_inwoner/questionnaire/migrations/0012_questionnairestep_code.py index 56586f6f3f..0b4dc57c53 100644 --- a/src/open_inwoner/questionnaire/migrations/0012_questionnairestep_code.py +++ b/src/open_inwoner/questionnaire/migrations/0012_questionnairestep_code.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("questionnaire", "0011_alter_questionnairestep_options"), ] diff --git a/src/open_inwoner/questionnaire/migrations/0014_alter_questionnairestep_code.py b/src/open_inwoner/questionnaire/migrations/0014_alter_questionnairestep_code.py index 5309cec0cd..babc0dcf52 100644 --- a/src/open_inwoner/questionnaire/migrations/0014_alter_questionnairestep_code.py +++ b/src/open_inwoner/questionnaire/migrations/0014_alter_questionnairestep_code.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("questionnaire", "0013_auto_20220503_1418"), ] diff --git a/src/open_inwoner/questionnaire/migrations/0015_alter_questionnairestep_help_text.py b/src/open_inwoner/questionnaire/migrations/0015_alter_questionnairestep_help_text.py index 1772d17f51..fc99ba4e9e 100644 --- a/src/open_inwoner/questionnaire/migrations/0015_alter_questionnairestep_help_text.py +++ b/src/open_inwoner/questionnaire/migrations/0015_alter_questionnairestep_help_text.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("questionnaire", "0014_alter_questionnairestep_code"), ] diff --git a/src/open_inwoner/questionnaire/migrations/0016_auto_20220613_1518.py b/src/open_inwoner/questionnaire/migrations/0016_auto_20220613_1518.py index 5c2cd0256b..98dc299dd9 100644 --- a/src/open_inwoner/questionnaire/migrations/0016_auto_20220613_1518.py +++ b/src/open_inwoner/questionnaire/migrations/0016_auto_20220613_1518.py @@ -1,11 +1,10 @@ # Generated by Django 3.2.13 on 2022-06-13 13:18 -from django.db import migrations, models import django.db.models.deletion +from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ("pdc", "0039_alter_category_highlighted"), ("questionnaire", "0015_alter_questionnairestep_help_text"), diff --git a/src/open_inwoner/questionnaire/migrations/0017_auto_20220617_0922.py b/src/open_inwoner/questionnaire/migrations/0017_auto_20220617_0922.py index 18e99bc407..2a283bec09 100644 --- a/src/open_inwoner/questionnaire/migrations/0017_auto_20220617_0922.py +++ b/src/open_inwoner/questionnaire/migrations/0017_auto_20220617_0922.py @@ -1,11 +1,10 @@ # Generated by Django 3.2.13 on 2022-06-17 07:22 -from django.db import migrations, models import django.db.models.deletion +from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ("pdc", "0039_alter_category_highlighted"), ("questionnaire", "0016_auto_20220613_1518"), diff --git a/src/open_inwoner/questionnaire/migrations/0018_questionnairestep_published.py b/src/open_inwoner/questionnaire/migrations/0018_questionnairestep_published.py index 3bc3de602a..740046c44c 100644 --- a/src/open_inwoner/questionnaire/migrations/0018_questionnairestep_published.py +++ b/src/open_inwoner/questionnaire/migrations/0018_questionnairestep_published.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("questionnaire", "0017_auto_20220617_0922"), ] diff --git a/src/open_inwoner/questionnaire/migrations/0019_auto_20221028_1144.py b/src/open_inwoner/questionnaire/migrations/0019_auto_20221028_1144.py index ce0bbdf417..82592bcf26 100644 --- a/src/open_inwoner/questionnaire/migrations/0019_auto_20221028_1144.py +++ b/src/open_inwoner/questionnaire/migrations/0019_auto_20221028_1144.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - dependencies = [ ("questionnaire", "0018_questionnairestep_published"), ] diff --git a/src/open_inwoner/questionnaire/migrations/0020_alter_questionnairestep_redirect_to.py b/src/open_inwoner/questionnaire/migrations/0020_alter_questionnairestep_redirect_to.py index 6245766bc4..2e87fe17fb 100644 --- a/src/open_inwoner/questionnaire/migrations/0020_alter_questionnairestep_redirect_to.py +++ b/src/open_inwoner/questionnaire/migrations/0020_alter_questionnairestep_redirect_to.py @@ -1,11 +1,10 @@ # Generated by Django 3.2.15 on 2022-11-29 11:11 -from django.db import migrations, models import django.db.models.deletion +from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ ("questionnaire", "0019_auto_20221028_1144"), ] diff --git a/src/open_inwoner/questionnaire/migrations/0021_alter_questionnairestep_category.py b/src/open_inwoner/questionnaire/migrations/0021_alter_questionnairestep_category.py index ef68ddc219..8de874432d 100644 --- a/src/open_inwoner/questionnaire/migrations/0021_alter_questionnairestep_category.py +++ b/src/open_inwoner/questionnaire/migrations/0021_alter_questionnairestep_category.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - dependencies = [ ("pdc", "0055_alter_product_content"), ("questionnaire", "0020_alter_questionnairestep_redirect_to"), diff --git a/src/open_inwoner/questionnaire/models.py b/src/open_inwoner/questionnaire/models.py index fe86e34909..a61006f114 100644 --- a/src/open_inwoner/questionnaire/models.py +++ b/src/open_inwoner/questionnaire/models.py @@ -2,7 +2,6 @@ from django.db.models import QuerySet from django.urls import reverse from django.utils.translation import gettext as _ - from filer.fields.file import FilerFileField from treebeard.mp_tree import MP_Node @@ -110,7 +109,7 @@ class Meta: ordering = ("path",) def __str__(self) -> str: - return "({} - {}) {}".format(self.id, self.code, self.question) + return f"({self.id} - {self.code}) {self.question}" def get_absolute_url(self) -> str: if self.is_root(): diff --git a/src/open_inwoner/questionnaire/tests/factories.py b/src/open_inwoner/questionnaire/tests/factories.py index 27e00ce1c5..bba74c110d 100644 --- a/src/open_inwoner/questionnaire/tests/factories.py +++ b/src/open_inwoner/questionnaire/tests/factories.py @@ -1,6 +1,5 @@ -from django.utils.text import slugify - import factory +from django.utils.text import slugify from ..models import QuestionnaireStep, QuestionnaireStepFile diff --git a/src/open_inwoner/questionnaire/tests/test_admin.py b/src/open_inwoner/questionnaire/tests/test_admin.py index ed6c161cfd..82c5d4345e 100644 --- a/src/open_inwoner/questionnaire/tests/test_admin.py +++ b/src/open_inwoner/questionnaire/tests/test_admin.py @@ -1,6 +1,5 @@ from django.urls import reverse from django.utils.translation import gettext as _ - from django_webtest import WebTest from maykin_2fa.test import disable_admin_mfa diff --git a/src/open_inwoner/questionnaire/tests/test_export.py b/src/open_inwoner/questionnaire/tests/test_export.py index 6e4ccca13f..4b53cea104 100644 --- a/src/open_inwoner/questionnaire/tests/test_export.py +++ b/src/open_inwoner/questionnaire/tests/test_export.py @@ -2,7 +2,6 @@ from django.test import Client, TestCase, override_settings from django.urls import reverse from django.utils.translation import gettext_lazy as _ - from privates.test import temp_private_root from open_inwoner.accounts.models import Document diff --git a/src/open_inwoner/questionnaire/tests/test_forms.py b/src/open_inwoner/questionnaire/tests/test_forms.py index 53cfd890d5..edf8b555c5 100644 --- a/src/open_inwoner/questionnaire/tests/test_forms.py +++ b/src/open_inwoner/questionnaire/tests/test_forms.py @@ -10,7 +10,7 @@ def test_label_from_instance(self): root.add_child(parent_answer="bar") field = QuestionnaireStepChoiceField(queryset=root.get_children()) - for (index, choice) in enumerate(field.choices): + for index, choice in enumerate(field.choices): if index == 0: continue self.assertEqual("bar", choice[1]) diff --git a/src/open_inwoner/questionnaire/tests/test_views.py b/src/open_inwoner/questionnaire/tests/test_views.py index 7a821a7b43..fc8dd85b1c 100644 --- a/src/open_inwoner/questionnaire/tests/test_views.py +++ b/src/open_inwoner/questionnaire/tests/test_views.py @@ -4,7 +4,6 @@ from django.test import RequestFactory, TestCase, override_settings from django.urls import reverse from django.views.generic import FormView - from django_webtest import WebTest from open_inwoner.utils.test import SessionMiddleware diff --git a/src/open_inwoner/questionnaire/views.py b/src/open_inwoner/questionnaire/views.py index cdaec76107..612d138bdf 100644 --- a/src/open_inwoner/questionnaire/views.py +++ b/src/open_inwoner/questionnaire/views.py @@ -7,7 +7,6 @@ from django.utils.functional import cached_property from django.utils.translation import gettext_lazy as _ from django.views.generic import FormView, ListView, RedirectView, TemplateView - from view_breadcrumbs import BaseBreadcrumbMixin from open_inwoner.accounts.models import Document diff --git a/src/open_inwoner/search/admin.py b/src/open_inwoner/search/admin.py index f826ccf896..fb9e80792e 100644 --- a/src/open_inwoner/search/admin.py +++ b/src/open_inwoner/search/admin.py @@ -2,7 +2,6 @@ from django.contrib import admin, messages from django.utils.html import format_html from django.utils.translation import gettext_lazy as _ - from import_export.admin import ImportExportMixin from import_export.formats import base_formats diff --git a/src/open_inwoner/search/documents.py b/src/open_inwoner/search/documents.py index 47010fe9d8..27c860577d 100644 --- a/src/open_inwoner/search/documents.py +++ b/src/open_inwoner/search/documents.py @@ -1,5 +1,4 @@ from django.conf import settings - from django_elasticsearch_dsl import Document, fields from django_elasticsearch_dsl.registries import registry diff --git a/src/open_inwoner/search/migrations/0001_initial.py b/src/open_inwoner/search/migrations/0001_initial.py index 01840552d2..211b848aef 100644 --- a/src/open_inwoner/search/migrations/0001_initial.py +++ b/src/open_inwoner/search/migrations/0001_initial.py @@ -1,12 +1,10 @@ # Generated by Django 3.2.7 on 2021-12-02 08:53 -from django.db import migrations, models - import django_jsonform.models.fields +from django.db import migrations, models class Migration(migrations.Migration): - initial = True dependencies = [] diff --git a/src/open_inwoner/search/migrations/0002_feedback.py b/src/open_inwoner/search/migrations/0002_feedback.py index 897ffdb77a..69da489ed2 100644 --- a/src/open_inwoner/search/migrations/0002_feedback.py +++ b/src/open_inwoner/search/migrations/0002_feedback.py @@ -6,7 +6,6 @@ class Migration(migrations.Migration): - dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ("search", "0001_initial"), diff --git a/src/open_inwoner/search/migrations/0003_auto_20220218_1359.py b/src/open_inwoner/search/migrations/0003_auto_20220218_1359.py index 9d2d008035..e29441b100 100644 --- a/src/open_inwoner/search/migrations/0003_auto_20220218_1359.py +++ b/src/open_inwoner/search/migrations/0003_auto_20220218_1359.py @@ -1,14 +1,12 @@ # Generated by Django 3.2.12 on 2022-02-18 12:59 import django.db.models.deletion +import django_jsonform.models.fields from django.conf import settings from django.db import migrations, models -import django_jsonform.models.fields - class Migration(migrations.Migration): - dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ("search", "0002_feedback"), diff --git a/src/open_inwoner/search/migrations/0004_fieldboost.py b/src/open_inwoner/search/migrations/0004_fieldboost.py index ee7988a970..3c444a7130 100644 --- a/src/open_inwoner/search/migrations/0004_fieldboost.py +++ b/src/open_inwoner/search/migrations/0004_fieldboost.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - dependencies = [ ("search", "0003_auto_20220218_1359"), ] diff --git a/src/open_inwoner/search/migrations/0005_initial_boost.py b/src/open_inwoner/search/migrations/0005_initial_boost.py index 1691ee3026..f20c68777b 100644 --- a/src/open_inwoner/search/migrations/0005_initial_boost.py +++ b/src/open_inwoner/search/migrations/0005_initial_boost.py @@ -11,7 +11,6 @@ def initiate_boost(apps, _): class Migration(migrations.Migration): - dependencies = [("search", "0004_fieldboost")] operations = [migrations.RunPython(initiate_boost, migrations.RunPython.noop)] diff --git a/src/open_inwoner/search/models.py b/src/open_inwoner/search/models.py index 918a2cd07b..729fa6e9b2 100644 --- a/src/open_inwoner/search/models.py +++ b/src/open_inwoner/search/models.py @@ -2,7 +2,6 @@ from django.db import models from django.db.models.deletion import CASCADE from django.utils.translation import gettext_lazy as _ - from django_jsonform.models.fields import ArrayField from .query import FieldBoostQueryset diff --git a/src/open_inwoner/search/results.py b/src/open_inwoner/search/results.py index a6750c4502..26b249a5b4 100644 --- a/src/open_inwoner/search/results.py +++ b/src/open_inwoner/search/results.py @@ -1,10 +1,8 @@ from collections import OrderedDict from dataclasses import dataclass from operator import attrgetter -from typing import Type from django.db import models - from elasticsearch_dsl import FacetedResponse from elasticsearch_dsl.response import Response @@ -29,7 +27,7 @@ def label(self) -> str: class Facet: name: str buckets: list[FacetBucket] - model: Type[models.Model] + model: type[models.Model] def __init__(self, name: str, buckets: list, model: models.Model): self.name = name diff --git a/src/open_inwoner/search/searches.py b/src/open_inwoner/search/searches.py index 891439185e..de0c1cbf6b 100644 --- a/src/open_inwoner/search/searches.py +++ b/src/open_inwoner/search/searches.py @@ -1,5 +1,4 @@ from django.conf import settings - from elasticsearch_dsl import FacetedSearch, NestedFacet, TermsFacet, query from .constants import FacetChoices diff --git a/src/open_inwoner/search/tests/test_feedback.py b/src/open_inwoner/search/tests/test_feedback.py index 506fdeada2..d44897a3f6 100644 --- a/src/open_inwoner/search/tests/test_feedback.py +++ b/src/open_inwoner/search/tests/test_feedback.py @@ -4,7 +4,6 @@ from django.test import override_settings, tag from django.urls import reverse from django.utils.translation import gettext_lazy as _ - from django_webtest import WebTest from furl import furl diff --git a/src/open_inwoner/search/tests/test_logging.py b/src/open_inwoner/search/tests/test_logging.py index 50af1202e1..df2419fd4f 100644 --- a/src/open_inwoner/search/tests/test_logging.py +++ b/src/open_inwoner/search/tests/test_logging.py @@ -1,7 +1,6 @@ from django.test import tag from django.urls import reverse from django.utils.translation import gettext as _ - from django_webtest import WebTest from freezegun import freeze_time from timeline_logger.models import TimelineLog diff --git a/src/open_inwoner/search/tests/test_page.py b/src/open_inwoner/search/tests/test_page.py index e2ce4fcb97..140c10d77a 100644 --- a/src/open_inwoner/search/tests/test_page.py +++ b/src/open_inwoner/search/tests/test_page.py @@ -1,6 +1,5 @@ from django.test import override_settings, tag from django.urls import reverse_lazy - from django_webtest import WebTest from playwright.sync_api import expect diff --git a/src/open_inwoner/search/tests/test_synonym_resources.py b/src/open_inwoner/search/tests/test_synonym_resources.py index 268af28435..cecb47f542 100644 --- a/src/open_inwoner/search/tests/test_synonym_resources.py +++ b/src/open_inwoner/search/tests/test_synonym_resources.py @@ -1,10 +1,9 @@ from collections import OrderedDict +import tablib from django.core.exceptions import ValidationError from django.test import TestCase -import tablib - from ..models import Synonym from ..resources import SynonymResource from .factories import SynonymFactory diff --git a/src/open_inwoner/search/tests/test_views.py b/src/open_inwoner/search/tests/test_views.py index fe9f3e00dd..e0e3b88f38 100644 --- a/src/open_inwoner/search/tests/test_views.py +++ b/src/open_inwoner/search/tests/test_views.py @@ -1,9 +1,8 @@ from urllib.parse import urlencode +import requests_mock from django.test import TransactionTestCase, override_settings, tag from django.urls import reverse - -import requests_mock from furl import furl from zgw_consumers.api_models.constants import VertrouwelijkheidsAanduidingen diff --git a/src/open_inwoner/search/tests/utils.py b/src/open_inwoner/search/tests/utils.py index 31af1ea762..ca00b18797 100644 --- a/src/open_inwoner/search/tests/utils.py +++ b/src/open_inwoner/search/tests/utils.py @@ -1,5 +1,4 @@ from django.core.management import call_command - from django_elasticsearch_dsl.registries import registry from django_elasticsearch_dsl.test.testcases import ESTestCase diff --git a/src/open_inwoner/search/views.py b/src/open_inwoner/search/views.py index af7cf5c03b..e8b47decb5 100644 --- a/src/open_inwoner/search/views.py +++ b/src/open_inwoner/search/views.py @@ -7,7 +7,6 @@ from django.urls import reverse, reverse_lazy from django.utils.translation import gettext as _ from django.views.generic import FormView - from furl import furl from open_inwoner.configurations.models import SiteConfiguration diff --git a/src/open_inwoner/setup.py b/src/open_inwoner/setup.py index f08aa57438..9385e11023 100644 --- a/src/open_inwoner/setup.py +++ b/src/open_inwoner/setup.py @@ -9,11 +9,11 @@ do NOT import anything Django related here, as this file needs to be loaded before Django is initialized. """ + import logging import os from django.conf import settings - from dotenv import load_dotenv from requests import Session diff --git a/src/open_inwoner/soap/migrations/0001_initial.py b/src/open_inwoner/soap/migrations/0001_initial.py index 96e80dcee7..bd54c8d2d8 100644 --- a/src/open_inwoner/soap/migrations/0001_initial.py +++ b/src/open_inwoner/soap/migrations/0001_initial.py @@ -5,7 +5,6 @@ class Migration(migrations.Migration): - initial = True dependencies = [ diff --git a/src/open_inwoner/soap/migrations/0002_alter_soapservice_url.py b/src/open_inwoner/soap/migrations/0002_alter_soapservice_url.py index 7e751b1a66..90559aaa23 100644 --- a/src/open_inwoner/soap/migrations/0002_alter_soapservice_url.py +++ b/src/open_inwoner/soap/migrations/0002_alter_soapservice_url.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("soap", "0001_initial"), ] diff --git a/src/open_inwoner/soap/models.py b/src/open_inwoner/soap/models.py index d717910ef5..6f272315e3 100644 --- a/src/open_inwoner/soap/models.py +++ b/src/open_inwoner/soap/models.py @@ -1,6 +1,5 @@ from django.db import models from django.utils.translation import gettext_lazy as _ - from simple_certmanager.models import Certificate diff --git a/src/open_inwoner/ssd/admin.py b/src/open_inwoner/ssd/admin.py index 68afea57cc..83161d24f5 100644 --- a/src/open_inwoner/ssd/admin.py +++ b/src/open_inwoner/ssd/admin.py @@ -1,7 +1,6 @@ from django import forms from django.contrib import admin from django.utils.translation import gettext_lazy as _ - from solo.admin import SingletonModelAdmin from open_inwoner.ckeditor5.widgets import CKEditorWidget diff --git a/src/open_inwoner/ssd/client.py b/src/open_inwoner/ssd/client.py index f7f20cf9de..1e9ee879c7 100644 --- a/src/open_inwoner/ssd/client.py +++ b/src/open_inwoner/ssd/client.py @@ -4,11 +4,10 @@ from pathlib import Path from uuid import uuid4 +import requests from django.template import loader from django.template.defaultfilters import date as django_date from django.utils import timezone - -import requests from requests import Response from ..utils.export import render_pdf @@ -138,7 +137,6 @@ def format_file_name(self, report_date: str) -> str: def get_reports( self, bsn: str, report_date: str, request_base_url: str ) -> bytes | None: - response = self.templated_request(bsn=bsn, dienstjaar=report_date) if not response or response.status_code != 200: @@ -194,7 +192,6 @@ def format_file_name(self, report_date: str) -> str: def get_reports( self, bsn: str, report_date: str, request_base_url: str ) -> bytes | None: - response = self.templated_request(bsn=bsn, period=report_date) if not response or response.status_code != 200: diff --git a/src/open_inwoner/ssd/forms.py b/src/open_inwoner/ssd/forms.py index a59773736f..6197cd78d7 100644 --- a/src/open_inwoner/ssd/forms.py +++ b/src/open_inwoner/ssd/forms.py @@ -1,10 +1,9 @@ from datetime import date, datetime +from dateutil.relativedelta import relativedelta from django import forms from django.template.defaultfilters import date as django_date -from dateutil.relativedelta import relativedelta - from .models import SSDConfig diff --git a/src/open_inwoner/ssd/migrations/0001_initial.py b/src/open_inwoner/ssd/migrations/0001_initial.py index 516884ef43..723847ba0d 100644 --- a/src/open_inwoner/ssd/migrations/0001_initial.py +++ b/src/open_inwoner/ssd/migrations/0001_initial.py @@ -8,7 +8,6 @@ class Migration(migrations.Migration): - initial = True dependencies = [ diff --git a/src/open_inwoner/ssd/migrations/0002_auto_20230728_1531.py b/src/open_inwoner/ssd/migrations/0002_auto_20230728_1531.py index f6ae62f853..d1ce08c8c1 100644 --- a/src/open_inwoner/ssd/migrations/0002_auto_20230728_1531.py +++ b/src/open_inwoner/ssd/migrations/0002_auto_20230728_1531.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("ssd", "0001_initial"), ] diff --git a/src/open_inwoner/ssd/migrations/0003_auto_20230802_1635.py b/src/open_inwoner/ssd/migrations/0003_auto_20230802_1635.py index a83b5a7a79..007f09683b 100644 --- a/src/open_inwoner/ssd/migrations/0003_auto_20230802_1635.py +++ b/src/open_inwoner/ssd/migrations/0003_auto_20230802_1635.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("ssd", "0002_auto_20230728_1531"), ] diff --git a/src/open_inwoner/ssd/migrations/0004_auto_20230808_1043.py b/src/open_inwoner/ssd/migrations/0004_auto_20230808_1043.py index 093f52352a..38737d3fdf 100644 --- a/src/open_inwoner/ssd/migrations/0004_auto_20230808_1043.py +++ b/src/open_inwoner/ssd/migrations/0004_auto_20230808_1043.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("ssd", "0003_auto_20230802_1635"), ] diff --git a/src/open_inwoner/ssd/migrations/0005_fix_translations_typo.py b/src/open_inwoner/ssd/migrations/0005_fix_translations_typo.py index 7254975d79..6664514445 100644 --- a/src/open_inwoner/ssd/migrations/0005_fix_translations_typo.py +++ b/src/open_inwoner/ssd/migrations/0005_fix_translations_typo.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("ssd", "0004_auto_20230808_1043"), ] diff --git a/src/open_inwoner/ssd/migrations/0006_rename_jaaropgave_comments_ssdconfig_jaaropgave_pdf_comments_and_more.py b/src/open_inwoner/ssd/migrations/0006_rename_jaaropgave_comments_ssdconfig_jaaropgave_pdf_comments_and_more.py index 884879797b..9f5587efc0 100644 --- a/src/open_inwoner/ssd/migrations/0006_rename_jaaropgave_comments_ssdconfig_jaaropgave_pdf_comments_and_more.py +++ b/src/open_inwoner/ssd/migrations/0006_rename_jaaropgave_comments_ssdconfig_jaaropgave_pdf_comments_and_more.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("ssd", "0005_fix_translations_typo"), ] diff --git a/src/open_inwoner/ssd/models.py b/src/open_inwoner/ssd/models.py index 4f9b4b6797..993b827ee0 100644 --- a/src/open_inwoner/ssd/models.py +++ b/src/open_inwoner/ssd/models.py @@ -1,6 +1,5 @@ from django.db import models from django.utils.translation import gettext_lazy as _ - from solo.models import SingletonModel from ..configurations.models import SiteConfiguration diff --git a/src/open_inwoner/ssd/service/uitkering/uitkerings_specificatie_client.py b/src/open_inwoner/ssd/service/uitkering/uitkerings_specificatie_client.py index 30651b01ee..fd40e30e9d 100644 --- a/src/open_inwoner/ssd/service/uitkering/uitkerings_specificatie_client.py +++ b/src/open_inwoner/ssd/service/uitkering/uitkerings_specificatie_client.py @@ -90,7 +90,9 @@ class Header: @dataclass class Body: - uitkerings_specificatie_info_response: UitkeringsSpecificatieInfoResponse | None = field( + uitkerings_specificatie_info_response: ( + UitkeringsSpecificatieInfoResponse | None + ) = field( default=None, metadata={ "name": "UitkeringsSpecificatieInfoResponse", diff --git a/src/open_inwoner/ssd/templatetags/ssd_tags.py b/src/open_inwoner/ssd/templatetags/ssd_tags.py index 64e85d3a65..0b8445989c 100644 --- a/src/open_inwoner/ssd/templatetags/ssd_tags.py +++ b/src/open_inwoner/ssd/templatetags/ssd_tags.py @@ -43,7 +43,7 @@ def format_currency(value: str) -> str: return "0,00" try: - return "{:.2f}".format(float(value) / 100).replace(".", ",") + return f"{float(value) / 100:.2f}".replace(".", ",") except ValueError: return "" diff --git a/src/open_inwoner/ssd/tests/test_client.py b/src/open_inwoner/ssd/tests/test_client.py index 1e949c359f..c35fbf10b4 100644 --- a/src/open_inwoner/ssd/tests/test_client.py +++ b/src/open_inwoner/ssd/tests/test_client.py @@ -2,9 +2,8 @@ from pathlib import Path from unittest.mock import patch -from django.test import TestCase - import requests_mock +from django.test import TestCase from lxml import etree from requests.exceptions import ConnectionError diff --git a/src/open_inwoner/ssd/tests/test_views.py b/src/open_inwoner/ssd/tests/test_views.py index 256c42c09e..91a004bf10 100644 --- a/src/open_inwoner/ssd/tests/test_views.py +++ b/src/open_inwoner/ssd/tests/test_views.py @@ -14,7 +14,6 @@ from django.test import TestCase, override_settings from django.urls import reverse from django.utils.translation import gettext as _ - from freezegun import freeze_time from pyquery import PyQuery @@ -135,7 +134,6 @@ def setUp(self): self.user.save() def test_jaaropgave_get(self): - # request with anonymous user url = reverse("ssd:yearly_benefits_index") response = self.client.get(url) diff --git a/src/open_inwoner/ssd/tests/utils.py b/src/open_inwoner/ssd/tests/utils.py index d0a8ff7101..e3988fe768 100644 --- a/src/open_inwoner/ssd/tests/utils.py +++ b/src/open_inwoner/ssd/tests/utils.py @@ -1,5 +1,4 @@ from django.template.loader import render_to_string - from lxml import etree from xsdata.formats.dataclass.context import XmlContext from xsdata.formats.dataclass.parsers import XmlParser diff --git a/src/open_inwoner/ssd/views.py b/src/open_inwoner/ssd/views.py index dda4abed3e..965ccf8402 100644 --- a/src/open_inwoner/ssd/views.py +++ b/src/open_inwoner/ssd/views.py @@ -8,7 +8,6 @@ from django.utils.functional import cached_property from django.utils.translation import gettext as _ from django.views.generic.edit import FormView - from furl import furl from view_breadcrumbs import BaseBreadcrumbMixin diff --git a/src/open_inwoner/urls.py b/src/open_inwoner/urls.py index fb6f179271..868568d4a5 100644 --- a/src/open_inwoner/urls.py +++ b/src/open_inwoner/urls.py @@ -6,7 +6,6 @@ from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.urls import include, path, re_path from django.views.generic import RedirectView, TemplateView - from maykin_2fa import monkeypatch_admin from maykin_2fa.urls import urlpatterns, webauthn_urlpatterns from mozilla_django_oidc_db.views import AdminLoginFailure diff --git a/src/open_inwoner/userfeed/hooks/external_task.py b/src/open_inwoner/userfeed/hooks/external_task.py index e3a660987a..dcda17b625 100644 --- a/src/open_inwoner/userfeed/hooks/external_task.py +++ b/src/open_inwoner/userfeed/hooks/external_task.py @@ -1,7 +1,6 @@ import logging from django.utils.translation import gettext_lazy as _ - from requests import RequestException from open_inwoner.accounts.choices import LoginTypeChoices diff --git a/src/open_inwoner/userfeed/migrations/0001_initial.py b/src/open_inwoner/userfeed/migrations/0001_initial.py index 15d058d765..ee3ccbf3fa 100644 --- a/src/open_inwoner/userfeed/migrations/0001_initial.py +++ b/src/open_inwoner/userfeed/migrations/0001_initial.py @@ -8,7 +8,6 @@ class Migration(migrations.Migration): - initial = True dependencies = [ diff --git a/src/open_inwoner/userfeed/migrations/0002_alter_feeditemdata_type.py b/src/open_inwoner/userfeed/migrations/0002_alter_feeditemdata_type.py index fd2f8eaf89..c805ecf1aa 100644 --- a/src/open_inwoner/userfeed/migrations/0002_alter_feeditemdata_type.py +++ b/src/open_inwoner/userfeed/migrations/0002_alter_feeditemdata_type.py @@ -4,7 +4,6 @@ class Migration(migrations.Migration): - dependencies = [ ("userfeed", "0001_initial"), ] diff --git a/src/open_inwoner/userfeed/tests/hooks/test_case_document.py b/src/open_inwoner/userfeed/tests/hooks/test_case_document.py index 04aac8346d..0acd897d52 100644 --- a/src/open_inwoner/userfeed/tests/hooks/test_case_document.py +++ b/src/open_inwoner/userfeed/tests/hooks/test_case_document.py @@ -3,7 +3,6 @@ from django.test import TestCase, override_settings from django.urls import reverse from django.utils.translation import gettext as _ - from zgw_consumers.api_models.base import factory from open_inwoner.openzaak.api_models import ( diff --git a/src/open_inwoner/userfeed/tests/hooks/test_case_status.py b/src/open_inwoner/userfeed/tests/hooks/test_case_status.py index fd568897d0..d4c80a1210 100644 --- a/src/open_inwoner/userfeed/tests/hooks/test_case_status.py +++ b/src/open_inwoner/userfeed/tests/hooks/test_case_status.py @@ -3,8 +3,8 @@ from django.test import TestCase, override_settings from django.urls import reverse from django.utils.html import escape, strip_tags -from django.utils.translation import gettext as _, ngettext - +from django.utils.translation import gettext as _ +from django.utils.translation import ngettext from zgw_consumers.api_models.base import factory from open_inwoner.openzaak.api_models import Status, StatusType, Zaak, ZaakType diff --git a/src/open_inwoner/userfeed/tests/test_commands.py b/src/open_inwoner/userfeed/tests/test_commands.py index ef6cdf57a1..812b373b2e 100644 --- a/src/open_inwoner/userfeed/tests/test_commands.py +++ b/src/open_inwoner/userfeed/tests/test_commands.py @@ -4,7 +4,6 @@ from django.core.management import call_command from django.test import TestCase from django.utils.timezone import make_aware - from freezegun import freeze_time from open_inwoner.accounts.tests.factories import UserFactory diff --git a/src/open_inwoner/userfeed/tests/test_external_tasks.py b/src/open_inwoner/userfeed/tests/test_external_tasks.py index a2b21df1e7..34ab4ac8bd 100644 --- a/src/open_inwoner/userfeed/tests/test_external_tasks.py +++ b/src/open_inwoner/userfeed/tests/test_external_tasks.py @@ -1,9 +1,8 @@ from unittest.mock import call, patch +import requests_mock from django.test import TestCase from django.utils.translation import gettext as _ - -import requests_mock from requests import RequestException from open_inwoner.accounts.tests.factories import DigidUserFactory diff --git a/src/open_inwoner/utils/admin.py b/src/open_inwoner/utils/admin.py index 92b5fb9d6b..2809321495 100644 --- a/src/open_inwoner/utils/admin.py +++ b/src/open_inwoner/utils/admin.py @@ -8,7 +8,6 @@ from django.urls import NoReverseMatch, path, reverse from django.utils.html import escape, format_html from django.utils.translation import gettext as _ - from django_celery_beat.admin import PeriodicTaskAdmin as _PeriodicTaskAdmin from django_celery_beat.models import PeriodicTask from import_export.admin import ExportMixin @@ -121,9 +120,7 @@ def object_link(self, obj): ct = obj.content_type try: url = reverse( - ("admin:{app_label}_{model}_change").format( - app_label=ct.app_label, model=ct.model - ), + (f"admin:{ct.app_label}_{ct.model}_change"), args=[obj.object_id], ) link = format_html( diff --git a/src/open_inwoner/utils/ckeditor.py b/src/open_inwoner/utils/ckeditor.py index 752376724b..97022e356a 100644 --- a/src/open_inwoner/utils/ckeditor.py +++ b/src/open_inwoner/utils/ckeditor.py @@ -1,8 +1,7 @@ -from django.utils.text import slugify -from django.utils.translation import gettext as _ - import markdown from bs4 import BeautifulSoup +from django.utils.text import slugify +from django.utils.translation import gettext as _ CLASS_ADDERS = [ ("h1", "utrecht-heading-1"), diff --git a/src/open_inwoner/utils/decorators.py b/src/open_inwoner/utils/decorators.py index 593787e913..249cbedfde 100644 --- a/src/open_inwoner/utils/decorators.py +++ b/src/open_inwoner/utils/decorators.py @@ -80,14 +80,16 @@ def decorator(func: Callable[..., RT]) -> Callable[..., RT]: if argspec.defaults: positional_count = len(argspec.args) - len(argspec.defaults) - defaults = dict(zip(argspec.args[positional_count:], argspec.defaults)) + defaults = dict( + zip(argspec.args[positional_count:], argspec.defaults, strict=False) + ) else: defaults = {} @wraps(func) def wrapped(*args, **kwargs) -> RT: key_kwargs = defaults.copy() - named_args = dict(zip(argspec.args, args), **kwargs) + named_args = dict(zip(argspec.args, args, strict=False), **kwargs) key_kwargs.update(**named_args) if argspec.varkw: diff --git a/src/open_inwoner/utils/export.py b/src/open_inwoner/utils/export.py index 6d96c289fd..dd7520a699 100644 --- a/src/open_inwoner/utils/export.py +++ b/src/open_inwoner/utils/export.py @@ -1,6 +1,5 @@ from django.contrib.staticfiles import finders from django.template.loader import render_to_string - from weasyprint import CSS, HTML diff --git a/src/open_inwoner/utils/forms.py b/src/open_inwoner/utils/forms.py index ddb58266ef..99c5a8174d 100644 --- a/src/open_inwoner/utils/forms.py +++ b/src/open_inwoner/utils/forms.py @@ -23,7 +23,6 @@ def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) for field_name, field in self.fields.items(): - field_error_messages = custom_error_messages.get(field_name, {}) error_messages = {} diff --git a/src/open_inwoner/utils/geocode.py b/src/open_inwoner/utils/geocode.py index 698b417ad3..c1f06da923 100644 --- a/src/open_inwoner/utils/geocode.py +++ b/src/open_inwoner/utils/geocode.py @@ -3,7 +3,6 @@ from django.conf import settings from django.contrib.gis.geos import GEOSGeometry, Point from django.utils.module_loading import import_string - from furl import furl from geopy.geocoders.base import DEFAULT_SENTINEL, Geocoder from geopy.location import Location @@ -28,7 +27,7 @@ def __init__( scheme="https", user_agent=None, ssl_context=DEFAULT_SENTINEL, - adapter_factory=None + adapter_factory=None, ): super().__init__( scheme=scheme, @@ -40,7 +39,7 @@ def __init__( ) self.domain = domain.strip("/") - self.api = "{}://{}{}".format(self.scheme, self.domain, self.geocode_path) + self.api = f"{self.scheme}://{self.domain}{self.geocode_path}" def geocode( self, diff --git a/src/open_inwoner/utils/logentry.py b/src/open_inwoner/utils/logentry.py index e5fb7c7507..5de1f85f5e 100644 --- a/src/open_inwoner/utils/logentry.py +++ b/src/open_inwoner/utils/logentry.py @@ -6,7 +6,6 @@ from django.utils.encoding import force_str from django.utils.text import get_text_list from django.utils.translation import gettext_lazy as _ - from timeline_logger.models import TimelineLog LOG_ACTIONS = { @@ -68,11 +67,7 @@ def addition(request, object, message=""): """ Log that an object has been successfully added. """ - logger.info( - ("Added: {object}, {message}. \n{request}").format( - object=object, message=message, request=request - ) - ) + logger.info(f"Added: {object}, {message}. \n{request}") TimelineLog.log_from_request( request=request, content_object=object, @@ -87,11 +82,7 @@ def change(request, object, message): """ Log that an object has been successfully changed. """ - logger.info( - ("Changed: {object}, {message}. \n{request}").format( - object=object, message=message, request=request - ) - ) + logger.info(f"Changed: {object}, {message}. \n{request}") TimelineLog.log_from_request( request=request, content_object=object, @@ -106,11 +97,7 @@ def deletion(request, object, message=""): """ Log that an object was deleted. """ - logger.info( - ("Deleted: {object}, {message}. \n{request}").format( - object=object, message=message, request=request - ) - ) + logger.info(f"Deleted: {object}, {message}. \n{request}") TimelineLog.log_from_request( request=request, content_object=object, @@ -126,11 +113,7 @@ def user_action(request, object, message): Log a generic action done by a user, useful for when add/change/delete aren't appropriate. """ - logger.info( - ("User action: {object}, {message}. \n{request}").format( - object=object, message=message, request=request - ) - ) + logger.info(f"User action: {object}, {message}. \n{request}") TimelineLog.log_from_request( request=request, content_object=object, diff --git a/src/open_inwoner/utils/middleware.py b/src/open_inwoner/utils/middleware.py index 3e4d42ccad..17fb784963 100644 --- a/src/open_inwoner/utils/middleware.py +++ b/src/open_inwoner/utils/middleware.py @@ -4,7 +4,6 @@ from django.shortcuts import redirect, resolve_url from django.urls import reverse from django.urls.exceptions import NoReverseMatch - from furl import furl diff --git a/src/open_inwoner/utils/migration_operations.py b/src/open_inwoner/utils/migration_operations.py index fca8f9ea9e..4f4f039e68 100644 --- a/src/open_inwoner/utils/migration_operations.py +++ b/src/open_inwoner/utils/migration_operations.py @@ -45,7 +45,6 @@ def database_forwards(self, app_label, schema_editor, from_state, to_state) -> N if router.allow_migrate( schema_editor.connection.alias, app_label, **self.hints ): - base_sql = _get_reset_sql() with schema_editor.connection.cursor() as cursor: diff --git a/src/open_inwoner/utils/mixins.py b/src/open_inwoner/utils/mixins.py index cb47908a57..a0c8f6e1cc 100644 --- a/src/open_inwoner/utils/mixins.py +++ b/src/open_inwoner/utils/mixins.py @@ -41,11 +41,7 @@ def create_throttle_key(self): :rtype string Use as key to save the last access """ - return "throttling_{id}_{throttle_name}_{window}".format( - id=self.get_throttle_identifier(), - throttle_name=self.throttle_name, - window=self.get_throttle_window(), - ) + return f"throttling_{self.get_throttle_identifier()}_{self.throttle_name}_{self.get_throttle_window()}" def get_throttle_window(self): """ diff --git a/src/open_inwoner/utils/schema.py b/src/open_inwoner/utils/schema.py index 9ccca0a6ff..15c40c23fb 100644 --- a/src/open_inwoner/utils/schema.py +++ b/src/open_inwoner/utils/schema.py @@ -1,12 +1,10 @@ -from typing import Type - from drf_spectacular.plumbing import force_instance from drf_spectacular.utils import OpenApiParameter from rest_framework import serializers def input_serializer_to_parameters( - serializer_class: Type[serializers.Serializer], + serializer_class: type[serializers.Serializer], ) -> list[OpenApiParameter]: serializer = force_instance(serializer_class) parameters = [] diff --git a/src/open_inwoner/utils/signals.py b/src/open_inwoner/utils/signals.py index 28ccf647e9..e426a2a564 100644 --- a/src/open_inwoner/utils/signals.py +++ b/src/open_inwoner/utils/signals.py @@ -3,7 +3,6 @@ from django.contrib.admin import models from django.db.models.signals import post_save from django.dispatch import receiver - from timeline_logger.models import TimelineLog from .logentry import LOG_ACTIONS diff --git a/src/open_inwoner/utils/templatetags/utils.py b/src/open_inwoner/utils/templatetags/utils.py index 220eefedd5..db448d047b 100644 --- a/src/open_inwoner/utils/templatetags/utils.py +++ b/src/open_inwoner/utils/templatetags/utils.py @@ -1,10 +1,9 @@ +import markdown as md from django import template from django.conf import settings from django.http import HttpRequest from django.template.defaultfilters import stringfilter from django.utils.html import format_html - -import markdown as md from humanfriendly import format_size register = template.Library() @@ -59,7 +58,7 @@ def placekitten(width=800, height=600): {%placekitten %} {%placekitten 200 200 %} """ - return format_html(''.format(placekitten_src(width, height))) + return format_html(f'') @register.simple_tag @@ -72,7 +71,7 @@ def placekitten_src(width=800, height=600): {% placekitten_src 200 200 as mobile_src %} {% include 'components/image/image.html' with mobile_src=mobile_src src=src alt='placekitten' only %} """ - return "//placekitten.com/{}/{}".format(width, height) + return f"//placekitten.com/{width}/{height}" @register.simple_tag diff --git a/src/open_inwoner/utils/tests/helpers.py b/src/open_inwoner/utils/tests/helpers.py index d54524c580..63e742d5cd 100644 --- a/src/open_inwoner/utils/tests/helpers.py +++ b/src/open_inwoner/utils/tests/helpers.py @@ -7,7 +7,6 @@ from django.shortcuts import resolve_url from django.urls import reverse from django.utils.encoding import force_str - from django_otp import DEVICE_ID_SESSION_KEY from furl import furl from PIL import Image @@ -42,7 +41,6 @@ def assertTimelineLog( content_object_repr=None, action_flag=None, ) -> TimelineLog: - kwargs = { f"extra_data__message__{lookup}": force_str(message), } diff --git a/src/open_inwoner/utils/tests/playwright.py b/src/open_inwoner/utils/tests/playwright.py index 5289fe3503..ebebba547f 100644 --- a/src/open_inwoner/utils/tests/playwright.py +++ b/src/open_inwoner/utils/tests/playwright.py @@ -4,7 +4,6 @@ from django.contrib.staticfiles.testing import StaticLiveServerTestCase from django.core.files.base import ContentFile from django.urls import reverse - from furl import furl from playwright.sync_api import Browser, Playwright, sync_playwright diff --git a/src/open_inwoner/utils/tests/test_api_utils.py b/src/open_inwoner/utils/tests/test_api_utils.py index cb39110e31..24293e74e8 100644 --- a/src/open_inwoner/utils/tests/test_api_utils.py +++ b/src/open_inwoner/utils/tests/test_api_utils.py @@ -1,7 +1,6 @@ from ipaddress import IPv4Address, IPv6Address from django.test import TestCase - from pydantic import BaseModel, HttpUrl from ..api import JSONEncoderMixin diff --git a/src/open_inwoner/utils/tests/test_glom.py b/src/open_inwoner/utils/tests/test_glom.py index 013b43f439..b497588d22 100644 --- a/src/open_inwoner/utils/tests/test_glom.py +++ b/src/open_inwoner/utils/tests/test_glom.py @@ -9,6 +9,6 @@ def test_glom_multiple(self): "aa": {"bb": 1}, "cc": {"dd": 2}, } - self.assertEquals(glom_multiple(obj, ("aa.bb", "cc.dd")), 1) - self.assertEquals(glom_multiple(obj, ("aa.xyz", "cc.dd")), 2) - self.assertEquals(glom_multiple(obj, ("aa.xyz", "cc.xyz"), default=999), 999) + self.assertEqual(glom_multiple(obj, ("aa.bb", "cc.dd")), 1) + self.assertEqual(glom_multiple(obj, ("aa.xyz", "cc.dd")), 2) + self.assertEqual(glom_multiple(obj, ("aa.xyz", "cc.xyz"), default=999), 999) diff --git a/src/open_inwoner/utils/tests/test_helpers.py b/src/open_inwoner/utils/tests/test_helpers.py index 8f4012caf3..aa07689e36 100644 --- a/src/open_inwoner/utils/tests/test_helpers.py +++ b/src/open_inwoner/utils/tests/test_helpers.py @@ -1,7 +1,6 @@ import logging from django.test import TestCase - from timeline_logger.models import TimelineLog from open_inwoner.utils.tests.helpers import AssertTimelineLogMixin, Lookups diff --git a/src/open_inwoner/utils/tests/test_limited_file_upload_field.py b/src/open_inwoner/utils/tests/test_limited_file_upload_field.py index 53e21d9569..f9612ba2fa 100644 --- a/src/open_inwoner/utils/tests/test_limited_file_upload_field.py +++ b/src/open_inwoner/utils/tests/test_limited_file_upload_field.py @@ -15,7 +15,6 @@ class TestForm(Form): class LimitedUploadFileFieldTests(TestCase): def test_title_starting_lowercase(self): - with self.assertRaises(ValueError): form_class_factory(allowed_mime_types=["i-am-not-a/valid-mime-type"]) diff --git a/src/open_inwoner/utils/tests/test_timeline_logger.py b/src/open_inwoner/utils/tests/test_timeline_logger.py index 5dc5b3e52f..1d38e6da10 100644 --- a/src/open_inwoner/utils/tests/test_timeline_logger.py +++ b/src/open_inwoner/utils/tests/test_timeline_logger.py @@ -2,7 +2,6 @@ from django.test import override_settings from django.urls import reverse from django.utils.translation import gettext_lazy as _ - from django_webtest import WebTest from freezegun import freeze_time from maykin_2fa.test import disable_admin_mfa diff --git a/src/open_inwoner/utils/tests/test_utils.py b/src/open_inwoner/utils/tests/test_utils.py index 36d565e8e4..6ece0acd2e 100644 --- a/src/open_inwoner/utils/tests/test_utils.py +++ b/src/open_inwoner/utils/tests/test_utils.py @@ -1,11 +1,11 @@ from datetime import timedelta from unittest import mock +import freezegun from django.core.cache import caches from django.core.cache.backends.dummy import DummyCache -from django.test import TestCase as DjangoTestCase, override_settings - -import freezegun +from django.test import TestCase as DjangoTestCase +from django.test import override_settings from open_inwoner.utils.decorators import cache @@ -22,7 +22,6 @@ def setUp(self): def test_method_key_accepts_permutations_of_attr_and_kwarg_keys(self): class TestClass: - foo = "bar" bar = "baz" diff --git a/src/open_inwoner/utils/text.py b/src/open_inwoner/utils/text.py index 046a56394c..021df0e26c 100644 --- a/src/open_inwoner/utils/text.py +++ b/src/open_inwoner/utils/text.py @@ -11,7 +11,7 @@ def middle_truncate(value: str, length: int, dots="...") -> str: def html_tag_wrap_format(format_str: str, tag: str, **kwargs) -> str: assert kwargs, "expected replacment kwargs" - html_tag = "<{}>{{}}{}>".format(tag, tag) + html_tag = f"<{tag}>{{}}{tag}>" replace = { name: format_html(html_tag, force_str(value)) for name, value in kwargs.items() } diff --git a/src/open_inwoner/utils/url.py b/src/open_inwoner/utils/url.py index 6d5f5cff25..f7851c97e1 100644 --- a/src/open_inwoner/utils/url.py +++ b/src/open_inwoner/utils/url.py @@ -5,7 +5,6 @@ from django.contrib.sites.models import Site from django.utils.encoding import iri_to_uri from django.utils.http import url_has_allowed_host_and_scheme - from furl.furl import furl diff --git a/src/open_inwoner/utils/validators.py b/src/open_inwoner/utils/validators.py index 4b236df11d..69f32bb724 100644 --- a/src/open_inwoner/utils/validators.py +++ b/src/open_inwoner/utils/validators.py @@ -1,13 +1,12 @@ from typing import TYPE_CHECKING, Protocol +import phonenumbers from django.core.exceptions import ValidationError from django.core.files.images import get_image_dimensions from django.core.validators import RegexValidator from django.utils.deconstruct import deconstructible from django.utils.encoding import force_str from django.utils.translation import gettext_lazy as _ - -import phonenumbers from filer.models import Image if TYPE_CHECKING: @@ -15,8 +14,7 @@ class ParsePhoneNumber(Protocol): - def __call__(self, value: str) -> "PhoneNumber": - ... # pragma: nocover + def __call__(self, value: str) -> "PhoneNumber": ... # pragma: nocover @deconstructible @@ -130,7 +128,7 @@ def __call__(self, value): Validates that the input matches the regular expression. """ if not self.regex.search(force_str(value)): - message = "{}: {}".format(self.message, force_str(value)) + message = f"{self.message}: {force_str(value)}" raise ValidationError(message, code=self.code) diff --git a/src/open_inwoner/utils/views.py b/src/open_inwoner/utils/views.py index 582cd0f4ca..c05feb6287 100644 --- a/src/open_inwoner/utils/views.py +++ b/src/open_inwoner/utils/views.py @@ -3,7 +3,6 @@ from django.template import TemplateDoesNotExist, loader from django.views.decorators.csrf import requires_csrf_token from django.views.defaults import ERROR_500_TEMPLATE_NAME - from view_breadcrumbs import DetailBreadcrumbMixin from .logentry import addition, change, deletion, system_action, user_action diff --git a/src/open_inwoner/wsgi.py b/src/open_inwoner/wsgi.py index 3b583ce601..df83faad52 100644 --- a/src/open_inwoner/wsgi.py +++ b/src/open_inwoner/wsgi.py @@ -6,6 +6,7 @@ For more information on this file, see https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/ """ + from django.core.wsgi import get_wsgi_application from open_inwoner.setup import setup_env diff --git a/src/openklant2/_resources/base.py b/src/openklant2/_resources/base.py index 37a12079bd..8a1da7bcb9 100644 --- a/src/openklant2/_resources/base.py +++ b/src/openklant2/_resources/base.py @@ -1,14 +1,8 @@ import json import logging +from collections.abc import Callable, Generator, Mapping, MutableMapping from typing import ( Any, - Callable, - Dict, - Generator, - List, - Mapping, - MutableMapping, - Optional, ParamSpec, TypeGuard, TypeVar, @@ -42,8 +36,8 @@ JSONPrimitive = Union[str, int, None, float] -JSONValue = Union[JSONPrimitive, "JSONObject", List["JSONValue"]] -JSONObject = Dict[str, JSONValue] +JSONValue = Union[JSONPrimitive, "JSONObject", list["JSONValue"]] +JSONObject = dict[str, JSONValue] P = ParamSpec("P") T = TypeVar("T") @@ -119,7 +113,7 @@ def _process_params(params: Mapping | None) -> None | Mapping: def _paginator( self, paginated_data: PaginatedResponseBody[T], - max_requests: Optional[int] = None, + max_requests: int | None = None, ) -> Generator[T, Any, None]: def row_iterator( _data: PaginatedResponseBody[T], num_requests=0 @@ -151,7 +145,6 @@ def _get( headers: Mapping | None = None, params: Mapping | None = None, ) -> requests.Response: - return self.http_client.request( "get", path, headers=headers, params=self._process_params(params) ) diff --git a/src/openklant2/_resources/partij.py b/src/openklant2/_resources/partij.py index 4016635211..776c9ca9e8 100644 --- a/src/openklant2/_resources/partij.py +++ b/src/openklant2/_resources/partij.py @@ -1,5 +1,5 @@ import uuid -from typing import Optional, cast +from typing import cast from ape_pie import APIClient @@ -26,7 +26,7 @@ def list( return cast(PaginatedResponseBody[Partij], self.process_response(response)) def retrieve( - self, /, uuid: str | uuid.UUID, *, params: Optional[PartijRetrieveParams] = None + self, /, uuid: str | uuid.UUID, *, params: PartijRetrieveParams | None = None ) -> Partij: response = self._get(f"{self.base_path}/{str(uuid)}", params=params) return cast(Partij, self.process_response(response)) diff --git a/src/openklant2/factories/helpers.py b/src/openklant2/factories/helpers.py index e27541d505..69c8cc6862 100644 --- a/src/openklant2/factories/helpers.py +++ b/src/openklant2/factories/helpers.py @@ -11,7 +11,7 @@ def decorator(cls: type[factory.Factory]): def validate(obj, *args, **kwargs): validator.validate_python(obj) - setattr(cls, "post_generation_validator", validate) + cls.post_generation_validator = validate return cls diff --git a/src/openklant2/tests/test_betrokkene.py b/src/openklant2/tests/test_betrokkene.py index f43a5e524f..c29a2b33ce 100644 --- a/src/openklant2/tests/test_betrokkene.py +++ b/src/openklant2/tests/test_betrokkene.py @@ -85,7 +85,7 @@ def factory(*args, **kwargs): *args, **kwargs, hadKlantcontact={"uuid": klantcontact["uuid"]}, - wasPartij={"uuid": partij["uuid"]} + wasPartij={"uuid": partij["uuid"]}, ) return client.betrokkene.create(data=data) diff --git a/src/openklant2/tests/test_interne_taak.py b/src/openklant2/tests/test_interne_taak.py index 179dec86d6..69320393a2 100644 --- a/src/openklant2/tests/test_interne_taak.py +++ b/src/openklant2/tests/test_interne_taak.py @@ -31,7 +31,7 @@ def factory(*args, **kwargs): *args, **kwargs, aanleidinggevendKlantcontact={"uuid": een_klant_contact["uuid"]}, - toegewezenAanActor={"uuid": een_actor["uuid"]} + toegewezenAanActor={"uuid": een_actor["uuid"]}, ) return client.interne_taak.create(data=data) diff --git a/src/openklant2/types/resources/klant_contact.py b/src/openklant2/types/resources/klant_contact.py index 98e10435ad..09fb8fe410 100644 --- a/src/openklant2/types/resources/klant_contact.py +++ b/src/openklant2/types/resources/klant_contact.py @@ -1,4 +1,4 @@ -from typing import Literal, NotRequired, Optional, Required +from typing import Literal, NotRequired, Required from pydantic import TypeAdapter from typing_extensions import TypedDict @@ -79,7 +79,7 @@ class KlantContact(TypedDict): nummer: str kanaal: str onderwerp: str - inhoud: Optional[str] + inhoud: str | None indicatieContactGelukt: Required[bool | None] taal: LanguageCode