From 3ea3ad2f630d608723b2fae5b0c898aa308f116e Mon Sep 17 00:00:00 2001 From: Sidney Richards Date: Mon, 6 Jan 2025 19:10:17 +0100 Subject: [PATCH 01/11] [WIP] pre-commit and ruff --- .github/workflows/pre-commit.yml | 29 +++ .pre-commit-config.yaml | 10 + bin/check_celery_worker_liveness.py | 2 +- bootstrap.py | 166 ++++++++++------- ruff.toml | 88 +++++++++ .../0001_delete_old_celery_tasks.py | 1 - src/eherkenning/backends.py | 3 +- src/eherkenning/mock/backends.py | 5 +- src/eherkenning/mock/idp/views/eherkenning.py | 1 - src/eherkenning/mock/views/eherkenning.py | 3 +- src/eherkenning/tests/test_mock_views.py | 1 - src/eherkenning/validators.py | 3 +- src/notifications/admin.py | 1 - src/notifications/api/serializers.py | 1 - src/notifications/migrations/0001_initial.py | 1 - src/notifications/models.py | 3 +- src/notifications/tests/test_migrations.py | 2 + src/notifications/tests/test_webhook.py | 3 +- src/open_inwoner/accounts/admin.py | 5 +- src/open_inwoner/accounts/apps.py | 5 - src/open_inwoner/accounts/backends.py | 5 +- src/open_inwoner/accounts/digid_urls.py | 1 - src/open_inwoner/accounts/eherkenning_urls.py | 1 - src/open_inwoner/accounts/forms.py | 1 - src/open_inwoner/accounts/gateways.py | 7 +- src/open_inwoner/accounts/managers.py | 5 +- .../accounts/migrations/0001_initial.py | 4 +- .../migrations/0002_auto_20211004_1708.py | 4 +- .../migrations/0003_auto_20211007_1244.py | 1 - .../migrations/0003_auto_20211008_1100.py | 4 +- .../migrations/0004_auto_20211008_1311.py | 4 +- .../migrations/0005_auto_20211013_1129.py | 1 - ...o_20211007_1244_0004_auto_20211008_1311.py | 1 - .../migrations/0006_auto_20211013_1415.py | 1 - .../accounts/migrations/0007_contact_uuid.py | 1 - ...o_20211013_1129_0006_auto_20211013_1415.py | 1 - .../migrations/0008_auto_20211101_1129.py | 4 +- .../migrations/0008_merge_20211020_1415.py | 1 - .../migrations/0009_auto_20211101_1137.py | 1 - .../migrations/0010_auto_20211101_1137.py | 1 - .../migrations/0011_merge_20211104_1428.py | 1 - .../migrations/0012_user_deactivated_on.py | 1 - .../0013_alter_user_deactivated_on.py | 1 - .../migrations/0014_user_is_prepopulated.py | 1 - .../migrations/0015_auto_20211214_1136.py | 1 - .../accounts/migrations/0015_message.py | 3 +- .../migrations/0016_auto_20211214_1652.py | 1 - .../migrations/0017_action_end_date.py | 1 - ...ge_0015_message_0016_auto_20211214_1652.py | 1 - .../migrations/0018_merge_20211222_1030.py | 1 - .../migrations/0019_auto_20211227_1218.py | 3 +- .../accounts/migrations/0020_invite.py | 3 +- .../migrations/0021_alter_contact_type.py | 1 - .../migrations/0021_auto_20220202_0949.py | 4 +- .../migrations/0022_auto_20220202_0949.py | 1 - .../migrations/0023_auto_20220202_0951.py | 1 - ...er_contact_type_0023_auto_20220202_0951.py | 1 - .../migrations/0025_migrate_message_seen.py | 1 - .../accounts/migrations/0026_message_sent.py | 1 - .../migrations/0027_auto_20220214_1440.py | 4 +- .../migrations/0028_auto_20220214_1538.py | 4 +- .../migrations/0029_auto_20220218_1359.py | 1 - .../accounts/migrations/0030_message_file.py | 4 +- .../accounts/migrations/0031_message_uuid.py | 1 - .../migrations/0032_gen_message_uuid.py | 1 - .../migrations/0033_alter_message_uuid.py | 1 - .../migrations/0034_alter_message_content.py | 1 - .../0035_alter_contact_phonenumber.py | 1 - .../migrations/0036_alter_user_login_type.py | 1 - .../migrations/0037_user_contact_type.py | 1 - .../migrations/0038_auto_20220504_1352.py | 1 - .../migrations/0039_remove_contact_type.py | 1 - .../migrations/0040_auto_20220518_1456.py | 3 +- .../migrations/0041_migrate_invite_email.py | 1 - .../0042_alter_invite_invitee_email.py | 1 - .../migrations/0043_change_digid_email.py | 3 +- .../accounts/migrations/0044_user_oidc_id.py | 1 - .../migrations/0045_alter_user_login_type.py | 1 - .../migrations/0046_alter_user_oidc_id.py | 1 - .../migrations/0047_action_is_deleted.py | 1 - .../migrations/0048_alter_action_status.py | 1 - .../migrations/0048_auto_20221205_0921.py | 2 +- .../migrations/0049_auto_20221205_0921.py | 1 - .../migrations/0050_auto_20221205_0924.py | 4 +- .../migrations/0051_merge_20221207_0918.py | 1 - .../migrations/0052_auto_20221213_0758.py | 2 +- .../migrations/0053_user_display_name.py | 2 +- .../migrations/0054_remove_action_goal.py | 1 - .../accounts/migrations/0055_user_image.py | 2 +- .../migrations/0056_auto_20230307_0852.py | 4 +- ...elected_themes_user_selected_categories.py | 1 - .../0058_alter_user_selected_categories.py | 1 - .../migrations/0059_auto_20230412_1637.py | 1 - .../accounts/migrations/0060_user_infix.py | 1 - .../migrations/0061_auto_20230612_1428.py | 2 +- .../0062_alter_user_deactivated_on.py | 1 - .../migrations/0063_alter_user_phonenumber.py | 1 - .../migrations/0064_alter_user_email.py | 1 - .../0065_user_unique_email_when_not_digid.py | 1 - .../0066_remove_user_selected_categories.py | 1 - .../migrations/0067_auto_20231121_1131.py | 2 +- ..._relax_email_constraint_for_eherkenning.py | 1 - .../migrations/0069_alter_user_postcode.py | 4 +- .../migrations/0070_auto_20231205_1657.py | 4 +- .../migrations/0071_delete_appointment.py | 1 - .../migrations/0071_remove_user_birthday.py | 1 - .../migrations/0072_merge_20240129_1610.py | 1 - .../0073_alter_user_user_contacts.py | 1 - .../0073_user_selected_categories.py | 1 - .../migrations/0074_merge_20240228_1544.py | 1 - .../migrations/0075_user_verified_email.py | 1 - .../0076_user_case_notification_channel.py | 1 - ...op_digid_eh_oidc_generics_legacy_tables.py | 1 - .../0079_digid_eherkenning_configs.py | 1 - src/open_inwoner/accounts/models.py | 17 +- .../accounts/notifications/actions/notify.py | 1 - .../accounts/notifications/messages/notify.py | 1 - .../accounts/notifications/plans/notify.py | 2 - .../accounts/notifications/tasks.py | 3 +- .../accounts/notifications/typing.py | 3 +- src/open_inwoner/accounts/tests/factories.py | 3 +- .../accounts/tests/test_action_views.py | 1 - src/open_inwoner/accounts/tests/test_admin.py | 1 - src/open_inwoner/accounts/tests/test_auth.py | 33 ++-- .../accounts/tests/test_auth_2fa_sms.py | 1 - .../accounts/tests/test_backends.py | 1 - .../accounts/tests/test_commands.py | 1 - .../accounts/tests/test_contact_views.py | 1 - .../accounts/tests/test_file_upload.py | 2 - .../tests/test_inbox_download_view.py | 1 - .../accounts/tests/test_inbox_page.py | 1 - .../accounts/tests/test_inbox_start_page.py | 1 - .../accounts/tests/test_invite.py | 1 - .../accounts/tests/test_logging.py | 1 - .../accounts/tests/test_message.py | 1 - .../tests/test_notify_expiring_actions.py | 2 +- .../accounts/tests/test_oidc_views.py | 5 +- .../tests/test_password_reset_view.py | 1 - .../accounts/tests/test_profile_views.py | 3 +- .../accounts/tests/test_user_manager.py | 2 +- src/open_inwoner/accounts/views/actions.py | 7 +- src/open_inwoner/accounts/views/auth.py | 11 +- src/open_inwoner/accounts/views/auth_oidc.py | 5 +- .../accounts/views/contactmoments.py | 4 +- src/open_inwoner/accounts/views/contacts.py | 1 - src/open_inwoner/accounts/views/csrf.py | 2 + src/open_inwoner/accounts/views/document.py | 1 - src/open_inwoner/accounts/views/inbox.py | 1 - src/open_inwoner/accounts/views/invite.py | 1 - src/open_inwoner/accounts/views/login.py | 12 +- src/open_inwoner/accounts/views/profile.py | 3 +- .../accounts/views/registration.py | 1 - src/open_inwoner/api/search/serializers.py | 1 - .../api/search/tests/test_autocomplete_api.py | 2 +- .../api/tests/test_serializers.py | 1 - src/open_inwoner/api/tests/test_views.py | 1 - src/open_inwoner/api/urls.py | 1 - src/open_inwoner/celery.py | 3 +- .../ckeditor5/tests/test_upload_api.py | 1 - src/open_inwoner/cms/banner/cms_plugins.py | 3 +- .../cms/banner/migrations/0001_initial.py | 5 +- .../migrations/0002_banner_image_height.py | 1 - .../migrations/0003_auto_20230511_1125.py | 4 +- ...lter_bannerimage_cmsplugin_ptr_and_more.py | 1 - src/open_inwoner/cms/banner/models.py | 3 +- src/open_inwoner/cms/benefits/cms_apps.py | 3 +- src/open_inwoner/cms/cases/cms_apps.py | 3 +- src/open_inwoner/cms/cases/forms.py | 6 +- .../cms/cases/tests/test_contactform.py | 13 +- src/open_inwoner/cms/cases/tests/test_htmx.py | 25 +-- src/open_inwoner/cms/cases/views/cases.py | 3 +- src/open_inwoner/cms/cases/views/services.py | 10 +- src/open_inwoner/cms/cases/views/status.py | 40 ++-- src/open_inwoner/cms/collaborate/cms_apps.py | 3 +- .../cms/collaborate/cms_plugins.py | 3 +- .../test/test_plugin_active_plans.py | 1 - src/open_inwoner/cms/context_processors.py | 3 +- src/open_inwoner/cms/extensions/admin.py | 3 +- src/open_inwoner/cms/extensions/cms_menus.py | 6 +- .../cms/extensions/cms_toolbars.py | 3 +- .../cms/extensions/migrations/0001_initial.py | 3 +- .../0002_commonextension_menu_indicator.py | 1 - .../0003_commonextension_menu_icon.py | 1 - .../0005_alter_commonextension_menu_icon.py | 1 - ...ommonextension_requires_auth_bsn_or_kvk.py | 1 - ...ommonextension_requires_auth_bsn_or_kvk.py | 1 - src/open_inwoner/cms/extensions/models.py | 5 +- src/open_inwoner/cms/footer/cms_plugins.py | 3 +- src/open_inwoner/cms/inbox/cms_apps.py | 3 +- .../cms/plugins/cms_plugins/appointments.py | 3 +- .../cms/plugins/cms_plugins/userfeed.py | 3 +- .../cms/plugins/cms_plugins/videoplayer.py | 3 +- .../cms/plugins/migrations/0001_initial.py | 3 +- .../cms/plugins/migrations/0002_userfeed.py | 1 - .../plugins/migrations/0003_userfeed_title.py | 1 - ...4_alter_userfeed_cmsplugin_ptr_and_more.py | 1 - .../migrations/0005_userappointments.py | 3 +- .../cms/plugins/models/appointments.py | 3 +- .../cms/plugins/models/userfeed.py | 3 +- .../cms/plugins/models/videoplayer.py | 3 +- .../cms/plugins/tests/test_appointments.py | 3 +- .../cms/plugins/tests/test_userfeed.py | 1 - src/open_inwoner/cms/products/cms_apps.py | 3 +- src/open_inwoner/cms/products/cms_plugins.py | 5 +- .../products/tests/test_plugin_categories.py | 5 +- .../tests/test_plugin_product_finder.py | 1 - .../tests/test_plugin_product_location.py | 1 - .../tests/test_plugin_questionnaire.py | 1 - src/open_inwoner/cms/profile/admin.py | 3 +- src/open_inwoner/cms/profile/cms_appconfig.py | 3 +- src/open_inwoner/cms/profile/cms_apps.py | 3 +- src/open_inwoner/cms/profile/cms_toolbars.py | 5 +- .../migrations/0003_profileconfig_ssd.py | 1 - .../profile/migrations/0004_profile_texts.py | 1 - ...emove_profileconfig_selected_categories.py | 1 - .../0006_alter_profileconfig_ssd.py | 1 - .../0007_profileconfig_selected_categories.py | 1 - .../0008_profileconfig_newsletters.py | 1 - .../0009_profileconfig_appointments.py | 1 - src/open_inwoner/cms/tests/cms_tools.py | 9 +- src/open_inwoner/cms/tests/test_cms_tools.py | 1 - src/open_inwoner/cms/tests/test_middleware.py | 1 - src/open_inwoner/cms/utils/middleware.py | 3 +- src/open_inwoner/cms/utils/page_display.py | 4 +- .../components/templatetags/action_tags.py | 6 +- .../components/templatetags/file_tags.py | 1 - .../components/templatetags/link_tags.py | 1 - .../templatetags/querystring_tags.py | 1 - .../components/templatetags/string_tags.py | 4 +- src/open_inwoner/components/tests/abstract.py | 5 +- .../components/tests/test_header.py | 1 - .../components/tests/test_messages.py | 1 - src/open_inwoner/conf/base.py | 5 +- src/open_inwoner/conf/dev.py | 6 +- src/open_inwoner/conf/production.py | 1 + src/open_inwoner/conf/staging.py | 1 + src/open_inwoner/conf/test.py | 1 + src/open_inwoner/conf/utils.py | 4 +- src/open_inwoner/configurations/admin.py | 10 +- .../configurations/bootstrap/auth.py | 11 +- .../configurations/bootstrap/cms.py | 5 +- .../configurations/bootstrap/openklant.py | 2 - .../configurations/bootstrap/siteconfig.py | 4 +- .../configurations/bootstrap/zgw.py | 1 - src/open_inwoner/configurations/emails.py | 1 - .../configurations/migrations/0001_initial.py | 6 +- .../migrations/0002_auto_20211215_1410.py | 1 - ...0002_siteconfiguration_hero_image_login.py | 5 +- .../migrations/0003_auto_20211210_1254.py | 1 - ...o_20211215_1410_0003_auto_20211210_1254.py | 1 - .../migrations/0005_auto_20220110_1042.py | 3 +- .../migrations/0006_auto_20220117_1626.py | 1 - .../migrations/0007_auto_20220202_1307.py | 1 - .../migrations/0007_auto_20220202_1835.py | 1 - ...o_20220202_1307_0007_auto_20220202_1835.py | 1 - .../migrations/0009_auto_20220215_1428.py | 1 - .../migrations/0009_auto_20220218_1359.py | 6 +- .../0009_siteconfiguration_show_cases.py | 1 - ...o_20220215_1428_0009_auto_20220218_1359.py | 1 - .../migrations/0010_merge_20220228_1623.py | 1 - .../migrations/0011_merge_20220302_1245.py | 1 - .../migrations/0012_merge_20220302_1815.py | 1 - .../migrations/0012_merge_20220303_1128.py | 1 - .../migrations/0013_merge_20220309_1710.py | 1 - .../migrations/0013_merge_20220311_1841.py | 1 - .../migrations/0014_merge_20220314_1716.py | 1 - ...5_siteconfiguration_show_product_finder.py | 1 - ...016_alter_siteconfigurationpage_options.py | 1 - .../migrations/0017_auto_20220330_1436.py | 1 - .../migrations/0018_auto_20220629_1504.py | 5 +- .../migrations/0019_auto_20220704_1002.py | 5 +- .../0020_siteconfiguration_login_show.py | 1 - .../0021_siteconfiguration_more_titles.py | 1 - .../0022_siteconfiguration_more_text.py | 1 - ...econfiguration_home_questionnaire_intro.py | 1 - ...econfiguration_home_questionnaire_intro.py | 1 - ...onfiguration_select_questionnaire_intro.py | 1 - ...onfiguration_select_questionnaire_intro.py | 1 - .../0027_siteconfiguration_show_plans.py | 1 - .../0028_siteconfiguration_show_actions.py | 1 - .../migrations/0029_auto_20221221_1636.py | 1 - .../migrations/0030_auto_20230120_1331.py | 5 +- .../0031_siteconfiguration_siteimprove_id.py | 1 - .../0032_siteconfiguration_favicon.py | 4 +- .../0033_alter_siteconfiguration_favicon.py | 4 +- ...nfiguration_footer_visiting_phonenumber.py | 1 - .../0034_siteconfiguration_plans_banner.py | 5 +- ...nfiguration_footer_visiting_phonenumber.py | 2 +- .../migrations/0036_merge_20230303_1004.py | 1 - .../migrations/0037_auto_20230403_1301.py | 1 - .../migrations/0038_auto_20230404_1745.py | 1 - ...lter_siteconfiguration_hero_image_login.py | 5 +- .../migrations/0040_auto_20230503_1417.py | 1 - .../0044_siteconfiguration_openid_display.py | 2 +- .../0046_siteconfiguration_cookie_consent.py | 1 - ...on_hide_categories_from_anonymous_users.py | 1 - .../migrations/0048_auto_20230816_1255.py | 1 - .../migrations/0049_auto_20230821_1523.py | 1 - .../0049_siteconfiguration_extra_css.py | 1 - .../0050_siteconfig_warning_banner.py | 4 +- .../migrations/0051_merge_20230907_1800.py | 1 - ...052_siteconfiguration_registration_text.py | 1 - .../0052_siteconfiguration_search_filters.py | 1 - .../migrations/0053_merge_20230928_1457.py | 1 - .../0054_siteconfiguration_display_social.py | 1 - ...5_siteconfiguration_eherkenning_enabled.py | 1 - ...r_siteconfiguration_eherkenning_enabled.py | 1 - ...0057_siteconfiguration_theme_stylesheet.py | 1 - .../migrations/0058_customfontset.py | 1 - ...teconfiguration_recipients_email_digest.py | 3 +- ...059_alter_siteconfigurationpage_options.py | 1 - .../migrations/0059_merge_20240129_1645.py | 1 - .../0059_siteconfiguration_email_logo.py | 4 +- .../migrations/0060_auto_20240208_1426.py | 1 - .../migrations/0061_merge_20240214_1308.py | 1 - .../migrations/0062_merge_20240214_1644.py | 1 - .../migrations/0062_merge_20240215_1501.py | 1 - .../migrations/0063_merge_20240216_1622.py | 1 - .../migrations/0064_auto_20240304_1200.py | 1 - ...nfiguration_email_verification_required.py | 1 - ...iguration_kcm_survey_link_text_and_more.py | 1 - .../migrations/0066_merge_20240405_1100.py | 1 - ...r_siteconfiguration_warning_banner_text.py | 4 +- ..._change_siteconfiguration_notifications.py | 1 - ...onfiguration_contactmoment_contact_form.py | 1 - .../migrations/0069_merge_20240724_0945.py | 1 - ...figuration_enable_notification_channels.py | 1 - .../0071_correct_siteconfiguration.py | 1 - ..._notifications_actions_enabled_and_more.py | 1 - ...iguration_notifications_actions_enabled.py | 1 - ...siteconfiguration_accent_color_and_more.py | 4 +- src/open_inwoner/configurations/models.py | 7 +- .../bootstrap/_test_setup_auth_config.py | 5 +- .../tests/bootstrap/_test_setup_cms.py | 3 +- .../bootstrap/_test_setup_configuration.py | 1 - .../bootstrap/_test_setup_site_config.py | 175 ++++++++++-------- .../bootstrap/test_setup_openklant_config.py | 1 - .../tests/bootstrap/test_setup_zgw_config.py | 1 - .../configurations/tests/test_admin.py | 1 - .../configurations/tests/test_analytics.py | 1 - .../configurations/tests/test_colors.py | 1 - .../configurations/tests/test_emails.py | 1 - .../configurations/tests/test_extra_css.py | 1 - .../configurations/tests/test_help_modal.py | 1 - .../configurations/tests/test_kcm_survey.py | 2 - .../configurations/tests/test_oidc.py | 1 - .../configurations/tests/test_redirect_to.py | 1 - .../configurations/tests/test_show_actions.py | 3 +- .../configurations/tests/test_social.py | 1 - .../configurations/tests/test_upload.py | 1 - src/open_inwoner/configurations/validators.py | 1 - .../custom_csp/migrations/0001_initial.py | 1 - src/open_inwoner/custom_csp/tests/test_csp.py | 1 - .../tests/test_extended_session.py | 1 - .../extended_sessions/tests/test_views.py | 1 - src/open_inwoner/haalcentraal/admin.py | 1 - .../haalcentraal/migrations/0001_initial.py | 1 - .../migrations/0002_auto_20230206_1511.py | 1 - ...lcentraalconfig_api_verwerking_and_more.py | 1 - ...0004_haalcentraalconfig_api_afnemer_oin.py | 1 - src/open_inwoner/haalcentraal/models.py | 1 - .../haalcentraal/tests/test_client.py | 3 +- .../haalcentraal/tests/test_logging.py | 3 +- .../haalcentraal/tests/test_signal.py | 3 +- src/open_inwoner/kvk/admin.py | 1 - .../kvk/migrations/0001_initial.py | 1 - .../0002_alter_kvkconfig_api_root.py | 1 - .../kvk/migrations/0003_api_root.py | 1 - .../0004_alter_kvkconfig_api_root.py | 2 +- src/open_inwoner/kvk/models.py | 1 - src/open_inwoner/kvk/tests/test_api.py | 3 +- src/open_inwoner/kvk/tests/test_signals.py | 3 +- src/open_inwoner/kvk/tests/test_views.py | 2 - src/open_inwoner/kvk/views.py | 1 - src/open_inwoner/laposta/admin.py | 1 - src/open_inwoner/laposta/client.py | 3 +- src/open_inwoner/laposta/forms.py | 1 - .../laposta/migrations/0001_initial.py | 1 - .../laposta/migrations/0002_subscription.py | 3 +- ...3_lapostaconfig_limit_list_selection_to.py | 1 - .../migrations/0004_delete_subscription.py | 1 - ...r_lapostaconfig_limit_list_selection_to.py | 1 - src/open_inwoner/laposta/models.py | 1 - src/open_inwoner/laposta/tests/test_forms.py | 3 +- src/open_inwoner/mail/admin.py | 6 +- .../mail/tests/test_verification.py | 1 - src/open_inwoner/mail/verification.py | 1 - .../media/migrations/0001_initial.py | 1 - .../migrations/0002_alter_video_link_id.py | 1 - src/open_inwoner/media/tests/test_admin.py | 3 +- src/open_inwoner/openklant/admin.py | 1 - src/open_inwoner/openklant/api_models.py | 18 +- src/open_inwoner/openklant/clients.py | 1 - src/open_inwoner/openklant/cms_plugins.py | 7 +- .../openklant/migrations/0001_initial.py | 1 - .../migrations/0002_auto_20230519_1210.py | 3 +- .../migrations/0003_auto_20230526_1013.py | 1 - .../0007_contactformsubject_subject_code.py | 1 - ...g_use_rsin_for_innnnpid_query_parameter.py | 1 - .../0009_klantcontactmomentanswer.py | 3 +- .../0010_openklantconfig_register_channel.py | 1 - ...g_use_rsin_for_innnnpid_query_parameter.py | 1 - ...openklantconfig_send_email_confirmation.py | 1 - ...antconfig_exclude_contactmoment_kanalen.py | 4 +- .../migrations/0014_contactformconfig.py | 3 +- .../migrations/0015_openklant2config.py | 1 - src/open_inwoner/openklant/models.py | 1 - src/open_inwoner/openklant/services.py | 33 ++-- src/open_inwoner/openklant/tests/helpers.py | 1 - .../openklant/tests/test_contactform.py | 3 +- .../tests/test_esuite_vragen_service.py | 3 +- .../openklant/tests/test_fetch.py | 3 +- .../openklant/tests/test_helpers.py | 3 +- .../tests/test_openklant2_service.py | 7 +- .../openklant/tests/test_signal.py | 3 +- .../openklant/tests/test_views.py | 3 +- .../openklant/views/contactform.py | 1 - src/open_inwoner/openzaak/admin.py | 16 +- src/open_inwoner/openzaak/api_models.py | 81 ++++---- src/open_inwoner/openzaak/clients.py | 8 +- src/open_inwoner/openzaak/exceptions.py | 2 +- src/open_inwoner/openzaak/import_export.py | 5 +- .../openzaak/migrations/0001_initial.py | 1 - .../migrations/0002_auto_20220128_1323.py | 1 - .../0003_openzaakconfig_document_service.py | 1 - ...zaakconfig_document_max_confidentiality.py | 1 - ...openzaakconfig_zaak_max_confidentiality.py | 1 - .../migrations/0006_auto_20230123_1619.py | 3 +- ..._openzaakconfig_allowed_file_extensions.py | 4 +- .../migrations/0008_auto_20230126_1034.py | 1 - .../migrations/0009_auto_20230131_1253.py | 4 +- ...nfig_reformat_esuite_zaak_identificatie.py | 1 - .../migrations/0011_auto_20230207_1030.py | 5 +- ...ypeconfig_document_notification_enabled.py | 1 - .../migrations/0013_auto_20230209_1053.py | 1 - .../migrations/0014_auto_20230209_1055.py | 1 - .../0015_openzaakconfig_form_service.py | 1 - ..._zaaktypeconfig_document_upload_enabled.py | 1 - .../migrations/0017_auto_20230331_1418.py | 3 +- .../0018_zaaktypeconfig_description.py | 1 - ...021_add_is_sent_to_notification_records.py | 1 - .../migrations/0021_statustranslation.py | 1 - .../migrations/0022_mark_as_is_sent.py | 1 - ..._statustranslation_0022_mark_as_is_sent.py | 1 - ...024_zaaktypeconfig_contact_subject_code.py | 1 - .../migrations/0025_auto_20231016_0957.py | 3 +- .../0025_openzaakconfig_title_text.py | 1 - .../migrations/0026_merge_20231024_0949.py | 1 - ...stypeconfig_document_upload_description.py | 1 - .../migrations/0027_auto_20231101_1641.py | 1 - .../0027_zaaktype_resultaattype_config.py | 3 +- .../migrations/0028_merge_20231101_1705.py | 1 - .../0028_zaaktype_statustype_button.py | 1 - .../migrations/0029_auto_20231113_1459.py | 1 - .../migrations/0029_merge_20231107_1355.py | 1 - ...29_zaaktypestatustypeconfig_description.py | 1 - .../migrations/0030_merge_20231113_1518.py | 1 - .../migrations/0031_merge_20231114_1400.py | 1 - ...estatustypeconfig_show_document_uploads.py | 1 - ..._enable_categories_filtering_with_zaken.py | 1 - .../migrations/0034_zaaktypeconfig_urls.py | 3 +- .../0035_populate_zaaktypeconfig_urls.py | 1 - ...36_zaaktypeconfig_relevante_zaakperiode.py | 1 - ...onfig_fetch_eherkenning_zaken_with_rsin.py | 1 - .../migrations/0037_result_description.py | 1 - .../migrations/0038_auto_20231129_1212.py | 1 - .../migrations/0038_merge_20231130_1232.py | 1 - .../migrations/0039_merge_20231130_1523.py | 1 - .../migrations/0040_merge_20231130_1552.py | 1 - .../0041_configuration_cases_button.py | 1 - ...2_case_notification_mail_template_split.py | 1 - ...aaktypestatustypeconfig_action_required.py | 1 - ...aakconfig_action_required_deadline_days.py | 1 - ...jectnotification_collision_key_and_more.py | 1 - ...onfig_fetch_eherkenning_zaken_with_rsin.py | 1 - .../0047_delete_statustranslation.py | 1 - ...aaktyperesultaattypeconfig_omschrijving.py | 1 - .../0049_add_multiple_zgw_backends_config.py | 3 +- ...igrate_zgw_root_fields_to_multi_backend.py | 3 +- .../migrations/0051_drop_root_zgw_fields.py | 3 +- .../0052_add_catalogusconfig_service.py | 1 - ...53_zaaktypeconfig_catalogus_is_required.py | 3 +- ...54_zgw_api_group_requires_most_services.py | 1 - ...055_openzaakconfig_zaken_filter_enabled.py | 1 - ...akconfig_use_zaak_omschrijving_as_title.py | 1 - ...nzaakconfig_order_statusses_by_date_set.py | 1 - ...que_identificatie_in_catalogus_and_more.py | 1 - ...penzaakconfig_show_cases_without_status.py | 1 - src/open_inwoner/openzaak/models.py | 2 - src/open_inwoner/openzaak/notifications.py | 1 - src/open_inwoner/openzaak/tests/factories.py | 3 +- src/open_inwoner/openzaak/tests/test_admin.py | 5 +- .../openzaak/tests/test_api_models.py | 1 - .../openzaak/tests/test_case_detail.py | 13 +- .../openzaak/tests/test_case_request.py | 3 +- src/open_inwoner/openzaak/tests/test_cases.py | 3 +- .../openzaak/tests/test_cases_cache.py | 3 +- .../openzaak/tests/test_clients.py | 3 +- .../openzaak/tests/test_documents.py | 3 +- .../openzaak/tests/test_import_export.py | 1 + .../openzaak/tests/test_migrations.py | 2 - .../openzaak/tests/test_models.py | 1 - .../openzaak/tests/test_notification_utils.py | 2 - .../tests/test_notification_webhook.py | 1 - .../test_notification_zaak_infoobject.py | 9 +- .../tests/test_notification_zaak_status.py | 3 +- src/open_inwoner/openzaak/tests/test_utils.py | 1 - .../openzaak/tests/test_zgw_imports.py | 5 +- .../tests/test_zgw_imports_command.py | 3 +- .../tests/test_zgw_imports_iotypes.py | 5 +- src/open_inwoner/openzaak/types.py | 3 +- src/open_inwoner/openzaak/zgw_imports.py | 1 - src/open_inwoner/pdc/admin/category.py | 1 - src/open_inwoner/pdc/admin/faq.py | 1 - src/open_inwoner/pdc/admin/product.py | 1 - src/open_inwoner/pdc/managers.py | 9 +- .../pdc/migrations/0001_initial.py | 5 +- .../pdc/migrations/0002_auto_20211013_1214.py | 1 - .../pdc/migrations/0003_auto_20211020_1234.py | 4 +- .../0004_productlink_productlocation.py | 4 +- .../pdc/migrations/0005_auto_20211025_1803.py | 6 +- .../pdc/migrations/0006_auto_20211027_1719.py | 4 +- .../pdc/migrations/0007_auto_20211027_1720.py | 1 - .../pdc/migrations/0008_alter_product_slug.py | 4 +- .../pdc/migrations/0009_auto_20211027_1732.py | 1 - .../pdc/migrations/0010_alter_product_slug.py | 1 - .../pdc/migrations/0010_auto_20211119_1158.py | 1 - .../pdc/migrations/0010_auto_20211119_1346.py | 1 - .../pdc/migrations/0011_auto_20211119_1025.py | 1 - .../pdc/migrations/0011_migrate_slugs.py | 1 - .../pdc/migrations/0011_productfile.py | 4 +- .../migrations/0012_alter_productfile_file.py | 4 +- .../pdc/migrations/0012_auto_20211119_1645.py | 1 - ...o_20211119_1025_0012_auto_20211119_1645.py | 1 - .../migrations/0013_merge_20211122_1701.py | 1 - .../migrations/0014_merge_20211123_1220.py | 1 - .../0015_alter_productlocation_name.py | 1 - .../pdc/migrations/0015_auto_20211124_1546.py | 1 - .../pdc/migrations/0015_auto_20211206_1033.py | 1 - .../migrations/0016_merge_20211206_1627.py | 1 - .../migrations/0017_merge_20211209_1213.py | 1 - .../migrations/0018_alter_product_keywords.py | 1 - .../0019_product_uniforme_productnaam.py | 1 - .../pdc/migrations/0020_auto_20220202_1835.py | 4 +- .../migrations/0020_productcontact_role.py | 1 - .../migrations/0021_merge_20220202_1847.py | 1 - .../pdc/migrations/0022_question.py | 1 - .../pdc/migrations/0023_auto_20220218_1359.py | 6 +- .../pdc/migrations/0023_productcondition.py | 1 - ...uto_20220218_1359_0023_productcondition.py | 1 - .../pdc/migrations/0025_auto_20220223_1153.py | 1 - .../pdc/migrations/0026_auto_20220312_1054.py | 1 - .../pdc/migrations/0027_auto_20220312_1056.py | 1 - .../pdc/migrations/0028_auto_20220312_1107.py | 1 - .../pdc/migrations/0029_auto_20220325_1308.py | 1 - .../migrations/0029_productcondition_order.py | 1 - .../0030_alter_question_category.py | 1 - .../pdc/migrations/0030_auto_20220322_1520.py | 1 - ...o_20220325_1308_0030_auto_20220322_1520.py | 1 - .../0032_alter_productcondition_options.py | 1 - .../migrations/0033_merge_20220329_1630.py | 1 - .../pdc/migrations/0034_auto_20220411_1259.py | 1 - .../migrations/0035_alter_productfile_file.py | 4 +- .../migrations/0036_alter_productfile_file.py | 4 +- .../migrations/0037_category_highlighted.py | 1 - .../pdc/migrations/0038_auto_20220601_1435.py | 4 +- .../0039_alter_category_highlighted.py | 1 - .../pdc/migrations/0040_auto_20220616_1108.py | 1 - .../pdc/migrations/0041_auto_20220724_1357.py | 1 - .../pdc/migrations/0042_auto_20220929_1726.py | 3 +- .../pdc/migrations/0043_question_product.py | 1 - .../0044_question_category_or_product_null.py | 1 - .../pdc/migrations/0045_auto_20230221_0954.py | 2 +- .../pdc/migrations/0046_auto_20230221_0954.py | 1 - .../0047_alter_productlocation_uuid.py | 4 +- .../migrations/0048_alter_product_summary.py | 1 - .../pdc/migrations/0049_auto_20230222_0901.py | 1 - .../migrations/0050_alter_product_summary.py | 1 - .../pdc/migrations/0052_auto_20230221_1518.py | 1 - .../migrations/0053_alter_product_summary.py | 1 - .../0054_alter_organization_logo.py | 5 +- .../migrations/0055_alter_product_content.py | 1 - .../pdc/migrations/0057_auto_20230623_1523.py | 1 - .../migrations/0058_product_button_text.py | 1 - .../pdc/migrations/0059_product_video.py | 1 - .../migrations/0060_content_collapsable.py | 1 - .../pdc/migrations/0061_auto_20231106_1207.py | 1 - .../0062_alter_category_zaaktypen.py | 3 +- ...3_remove_category_relevante_zaakperiode.py | 1 - ...move_category_visible_for_authenticated.py | 1 - .../pdc/migrations/0065_auto_20240112_1046.py | 1 - .../migrations/0066_category_access_groups.py | 1 - src/open_inwoner/pdc/models/category.py | 1 - src/open_inwoner/pdc/models/faq.py | 1 - src/open_inwoner/pdc/models/mixins.py | 1 - src/open_inwoner/pdc/models/organization.py | 1 - src/open_inwoner/pdc/models/product.py | 1 - src/open_inwoner/pdc/models/tag.py | 1 - .../pdc/resources/import_resource.py | 1 - src/open_inwoner/pdc/resources/widgets.py | 1 - src/open_inwoner/pdc/tests/factories.py | 3 +- src/open_inwoner/pdc/tests/test_category.py | 1 - .../pdc/tests/test_category_admin.py | 1 - .../pdc/tests/test_category_resources.py | 3 +- src/open_inwoner/pdc/tests/test_faq.py | 1 - src/open_inwoner/pdc/tests/test_logging.py | 3 +- .../pdc/tests/test_organization_location.py | 1 - src/open_inwoner/pdc/tests/test_product.py | 4 +- .../pdc/tests/test_product_admin.py | 1 - .../pdc/tests/test_product_finder.py | 1 - .../pdc/tests/test_product_location.py | 1 - .../pdc/tests/test_product_resources.py | 3 +- src/open_inwoner/pdc/utils.py | 3 +- src/open_inwoner/pdc/views.py | 1 - .../plans/migrations/0001_initial.py | 1 - .../migrations/0002_auto_20220214_1440.py | 1 - .../migrations/0003_auto_20220218_1359.py | 1 - .../migrations/0003_auto_20220221_1309.py | 1 - .../migrations/0004_auto_20220221_1734.py | 1 - ...o_20220218_1359_0004_auto_20220221_1734.py | 1 - .../migrations/0006_auto_20220302_1028.py | 4 +- .../migrations/0007_auto_20220304_1619.py | 4 +- .../migrations/0008_alter_plan_options.py | 1 - .../migrations/0009_plan_plan_contacts.py | 1 - .../migrations/0010_auto_20221205_0921.py | 1 - .../migrations/0011_remove_plan_contacts.py | 1 - .../0012_remove_actiontemplate_goal.py | 1 - .../migrations/0013_auto_20230223_1115.py | 1 - .../migrations/0014_auto_20230306_1017.py | 1 - .../migrations/0015_plancontact_notify_new.py | 1 - .../0016_alter_plancontact_notify_new.py | 1 - src/open_inwoner/plans/models.py | 1 - src/open_inwoner/plans/tests/factories.py | 3 +- src/open_inwoner/plans/tests/test_logging.py | 1 - src/open_inwoner/plans/tests/test_views.py | 1 - src/open_inwoner/plans/views.py | 13 +- src/open_inwoner/qmatic/admin.py | 1 - .../qmatic/migrations/0001_initial.py | 3 +- .../0002_qmaticconfig_booking_base_url.py | 1 - .../0003_alter_qmaticconfig_service.py | 1 - .../0004_alter_qmaticconfig_service.py | 3 +- src/open_inwoner/qmatic/models.py | 1 - src/open_inwoner/qmatic/tests/data.py | 1 - src/open_inwoner/questionnaire/admin.py | 9 +- .../questionnaire/migrations/0001_initial.py | 4 +- .../0002_alter_questionnairestep_slug.py | 1 - ...0003_questionnairestep_question_subject.py | 1 - .../0004_alter_questionnairestepfile_file.py | 4 +- .../0005_questionnairestep_is_default.py | 1 - .../migrations/0006_auto_20220328_1042.py | 1 - .../migrations/0006_auto_20220328_1555.py | 1 - ...006_remove_questionnairestep_is_default.py | 1 - .../migrations/0007_auto_20220328_1122.py | 1 - ...o_20220328_1042_0006_auto_20220328_1555.py | 1 - .../0008_alter_questionnairestep_options.py | 1 - .../migrations/0009_merge_20220329_0935.py | 1 - .../migrations/0010_merge_20220329_1651.py | 1 - .../0011_alter_questionnairestep_options.py | 1 - .../migrations/0012_questionnairestep_code.py | 1 - .../0014_alter_questionnairestep_code.py | 1 - .../0015_alter_questionnairestep_help_text.py | 1 - .../migrations/0016_auto_20220613_1518.py | 3 +- .../migrations/0017_auto_20220617_0922.py | 3 +- .../0018_questionnairestep_published.py | 1 - .../migrations/0019_auto_20221028_1144.py | 1 - ...020_alter_questionnairestep_redirect_to.py | 3 +- .../0021_alter_questionnairestep_category.py | 1 - src/open_inwoner/questionnaire/models.py | 3 +- .../questionnaire/tests/factories.py | 3 +- .../questionnaire/tests/test_admin.py | 1 - .../questionnaire/tests/test_export.py | 1 - .../questionnaire/tests/test_forms.py | 2 +- .../questionnaire/tests/test_views.py | 1 - src/open_inwoner/questionnaire/views.py | 1 - src/open_inwoner/search/admin.py | 1 - src/open_inwoner/search/documents.py | 1 - .../search/migrations/0001_initial.py | 4 +- .../search/migrations/0002_feedback.py | 1 - .../migrations/0003_auto_20220218_1359.py | 4 +- .../search/migrations/0004_fieldboost.py | 1 - .../search/migrations/0005_initial_boost.py | 1 - src/open_inwoner/search/models.py | 1 - src/open_inwoner/search/results.py | 4 +- src/open_inwoner/search/searches.py | 1 - .../search/tests/test_feedback.py | 1 - src/open_inwoner/search/tests/test_logging.py | 1 - src/open_inwoner/search/tests/test_page.py | 1 - .../search/tests/test_synonym_resources.py | 3 +- src/open_inwoner/search/tests/test_views.py | 3 +- src/open_inwoner/search/tests/utils.py | 1 - src/open_inwoner/search/views.py | 1 - src/open_inwoner/setup.py | 2 +- .../soap/migrations/0001_initial.py | 1 - .../migrations/0002_alter_soapservice_url.py | 1 - src/open_inwoner/soap/models.py | 1 - src/open_inwoner/ssd/admin.py | 1 - src/open_inwoner/ssd/client.py | 5 +- src/open_inwoner/ssd/forms.py | 3 +- .../ssd/migrations/0001_initial.py | 1 - .../ssd/migrations/0002_auto_20230728_1531.py | 1 - .../ssd/migrations/0003_auto_20230802_1635.py | 1 - .../ssd/migrations/0004_auto_20230808_1043.py | 1 - .../migrations/0005_fix_translations_typo.py | 1 - ...config_jaaropgave_pdf_comments_and_more.py | 1 - src/open_inwoner/ssd/models.py | 1 - .../uitkerings_specificatie_client.py | 4 +- src/open_inwoner/ssd/templatetags/ssd_tags.py | 2 +- src/open_inwoner/ssd/tests/test_client.py | 3 +- src/open_inwoner/ssd/tests/test_views.py | 2 - src/open_inwoner/ssd/tests/utils.py | 1 - src/open_inwoner/ssd/views.py | 1 - src/open_inwoner/urls.py | 1 - .../userfeed/hooks/external_task.py | 1 - .../userfeed/migrations/0001_initial.py | 1 - .../0002_alter_feeditemdata_type.py | 1 - .../tests/hooks/test_case_document.py | 1 - .../userfeed/tests/hooks/test_case_status.py | 4 +- .../userfeed/tests/test_commands.py | 1 - .../userfeed/tests/test_external_tasks.py | 3 +- src/open_inwoner/utils/admin.py | 5 +- src/open_inwoner/utils/ckeditor.py | 5 +- src/open_inwoner/utils/decorators.py | 6 +- src/open_inwoner/utils/export.py | 1 - src/open_inwoner/utils/forms.py | 1 - src/open_inwoner/utils/geocode.py | 5 +- src/open_inwoner/utils/logentry.py | 25 +-- src/open_inwoner/utils/middleware.py | 1 - .../utils/migration_operations.py | 1 - src/open_inwoner/utils/mixins.py | 6 +- src/open_inwoner/utils/schema.py | 4 +- src/open_inwoner/utils/signals.py | 1 - src/open_inwoner/utils/templatetags/utils.py | 7 +- src/open_inwoner/utils/tests/helpers.py | 2 - src/open_inwoner/utils/tests/playwright.py | 1 - .../utils/tests/test_api_utils.py | 1 - src/open_inwoner/utils/tests/test_glom.py | 6 +- src/open_inwoner/utils/tests/test_helpers.py | 1 - .../tests/test_limited_file_upload_field.py | 1 - .../utils/tests/test_timeline_logger.py | 1 - src/open_inwoner/utils/tests/test_utils.py | 7 +- src/open_inwoner/utils/text.py | 2 +- src/open_inwoner/utils/url.py | 1 - src/open_inwoner/utils/validators.py | 8 +- src/open_inwoner/utils/views.py | 1 - src/open_inwoner/wsgi.py | 1 + src/openklant2/_resources/base.py | 15 +- src/openklant2/_resources/partij.py | 4 +- src/openklant2/factories/helpers.py | 2 +- src/openklant2/tests/test_betrokkene.py | 2 +- src/openklant2/tests/test_interne_taak.py | 2 +- .../types/resources/klant_contact.py | 4 +- 751 files changed, 834 insertions(+), 1434 deletions(-) create mode 100644 .github/workflows/pre-commit.yml create mode 100644 .pre-commit-config.yaml create mode 100644 ruff.toml 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 70edc94070..6814ca714c 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 freezegun import freeze_time from pyquery import PyQuery as PQ 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 9cacc7d884..c175469c5c 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 737926bb6a..f812adc39b 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 freezegun import freeze_time from pyquery import PyQuery as PQ 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 da1c9d954c..3f2d417060 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 3be800f6b7..2a11efa0a3 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 fe386e88f3..847d6d142a 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, tag - -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 756f0f10f7..2dd7ab6bb6 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}>{{}}" 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 From d93cb5867f5604de96821b2208e5515aa53727b2 Mon Sep 17 00:00:00 2001 From: Sidney Richards Date: Mon, 6 Jan 2025 22:42:15 +0100 Subject: [PATCH 02/11] fixup! [WIP] pre-commit and ruff --- .github/ISSUE_TEMPLATE/feature_request.md | 2 +- .github/workflows/pre-commit.yml | 10 +- .gitignore | 1 - .pre-commit-config.yaml | 27 +- .python-version | 2 +- AUTHORS | 4 +- CHANGELOG.rst | 1 - CODE_OF_CONDUCT.md | 2 +- CONTRIBUTING.md | 2 +- LICENSE.md | 20 +- SECURITY.rst | 40 +- bin/generate_cms_fixture.sh | 2 - docker-nginx-default.conf | 2 +- docker/openklant/fixtures/db.json | 2 +- docs/architecture/accounts.dot | 470 ++++++------ docs/architecture/configurations.dot | 544 +++++++------- docs/architecture/haalcentraal.dot | 28 +- docs/architecture/kvk.dot | 34 +- docs/architecture/openklant.dot | 136 ++-- docs/architecture/openzaak.dot | 494 ++++++------- docs/architecture/pdc.dot | 688 +++++++++--------- docs/architecture/plans.dot | 152 ++-- docs/beheerhandleiding/07_zoeken.rst | 1 - docs/beheerhandleiding/09_datakoppelingen.rst | 22 +- docs/configuration/admin_oidc.rst | 42 +- docs/configuration/cms_cases.rst | 6 +- docs/configuration/cms_collaborate.rst | 6 +- docs/configuration/cms_inbox.rst | 6 +- docs/configuration/cms_products.rst | 6 +- docs/configuration/cms_profile.rst | 6 +- docs/configuration/cms_ssd.rst | 6 +- docs/configuration/digid_oidc.rst | 34 +- docs/configuration/digid_saml.rst | 44 +- docs/configuration/eherkenning_oidc.rst | 34 +- docs/configuration/eherkenning_saml.rst | 68 +- docs/configuration/kic.rst | 28 +- docs/configuration/siteconfig.rst | 154 ++-- docs/configuration/zgw.rst | 42 +- docs/openssl.conf | 1 - docs/testing.rst | 2 - performance-tests/README.md | 2 +- requirements/test.txt | 1 - ruff.toml | 37 +- src/eherkenning/static/eherkenning/error.svg | 2 +- src/eherkenning/static/eherkenning/extra.css | 2 +- .../registration_closed.html | 2 +- .../customers/identify;email=foo@bar.org.json | 2 +- .../api/v1/customers/12345/appointments.json | 2 +- .../templates/components/File/File.html | 1 - .../Header/AccessibilityHeader.html | 1 - .../Header/AccessibilitySkipLink.html | 2 +- .../templates/components/Header/Header.html | 2 +- .../Questionnaire/Questionnaire.html | 2 +- .../conf/fixtures/mail-editor.json | 2 +- src/open_inwoner/conf/local_example.py | 2 +- src/open_inwoner/conf/locale/README | 4 +- .../conf/parts/expiring_action.html | 1 - .../files/zgw_api_step_zero_groups.yaml | 2 +- .../tests/files/personen_1.3.yaml | 2 +- .../pdc/static/pdc/category_file_example.csv | 2 +- .../fixtures/questionnaire_sampledata.json | 1 - .../fixtures/questionnaire_sampledata_2.json | 2 +- .../static/img/admin/calendar-alt-regular.svg | 2 +- .../static/img/admin/clock-regular.svg | 2 +- .../static/img/admin/edit-regular.svg | 2 +- .../static/img/admin/plus-square-regular.svg | 2 +- .../static/img/admin/trash-alt-regular.svg | 2 +- .../admin/catalogusconfig_change_list.html | 1 - .../admin/import_zgw_export_form.html | 2 +- .../templates/admin/widgets/map.html | 2 +- .../admin/zaaktypeconfig_change_list.html | 1 - .../templates/analytics/matomo.html | 2 - .../templates/cms/menu/primary.html | 1 - .../django/forms/widgets/select.html | 2 +- src/open_inwoner/templates/master.html | 4 +- .../utils/widgets/message_file_input.html | 1 - src/openklant2/docker-compose.yaml | 2 +- src/openklant2/tests/test_partij.py | 1 - 78 files changed, 1638 insertions(+), 1638 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 11bb84ef97..a6b8364ef0 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -19,4 +19,4 @@ A description of the idea or need, possibly supplemented with a specific solutio The added value for business operations or services ### Additional context -Any other context or screenshots about the feature request \ No newline at end of file +Any other context or screenshots about the feature request diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 05f5b62464..1c182c1eeb 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -9,21 +9,21 @@ jobs: - 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 + pre-commit run --files ${{ steps.changed-files.outputs.files }} diff --git a/.gitignore b/.gitignore index ab7f97843b..28efa9321b 100644 --- a/.gitignore +++ b/.gitignore @@ -49,4 +49,3 @@ src/open_inwoner/static/webfonts/fa-solid-900.woff2 src/open_inwoner/static/webfonts/fa-v4compatibility.ttf src/open_inwoner/static/webfonts/fa-v4compatibility.woff2 src/open_inwoner/static/fonts/material-icons/ - diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 09c27c4e61..154fdc1908 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,10 +1,19 @@ 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 + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v5.0.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: mixed-line-ending + - id: check-merge-conflict + - id: check-toml + - id: debug-statements + - 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 diff --git a/.python-version b/.python-version index 902b2c90c8..2c0733315e 100644 --- a/.python-version +++ b/.python-version @@ -1 +1 @@ -3.11 \ No newline at end of file +3.11 diff --git a/AUTHORS b/AUTHORS index 962b5dd59a..1701491fca 100644 --- a/AUTHORS +++ b/AUTHORS @@ -4,7 +4,7 @@ Maykin Media team was happy to participate in such a socially significant projec Here is an inevitably incomplete list of MUCH-APPRECIATED CONTRIBUTORS -- people who laid the groundwork, have submitted patches, reported bugs, added -translations, helped answer questions, and generally made the components that +translations, helped answer questions, and generally made the components that much better: Alex de Landgraaf @@ -21,4 +21,4 @@ A big THANK YOU goes to: ideas: the municipalities of Deventer, Enschede, Groningen, Leeuwarden, Zaanstad and Zwolle. - All people behind Common Ground for their enthusiasm and vision. \ No newline at end of file + All people behind Common Ground for their enthusiasm and vision. diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 39f8d49636..abbcfefa20 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,4 +4,3 @@ Change history See the Github releases: https://github.com/maykinmedia/open-inwoner/releases - diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 472c57acb5..bfe589b0ea 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -70,4 +70,4 @@ members of the project's leadership. This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html -[homepage]: https://www.contributor-covenant.org \ No newline at end of file +[homepage]: https://www.contributor-covenant.org diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e215f40def..81d8d7218c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -72,4 +72,4 @@ to a release branch. [issues]: https://github.com/maykinmedia/open-inwoner/issues [new_issue]: https://github.com/maykinmedia/open-inwoner/issues/new/choose [Standard_for_Public_Code]: https://standard.publiccode.net -[repository]: https://github.com/maykinmedia/open-inwoner \ No newline at end of file +[repository]: https://github.com/maykinmedia/open-inwoner diff --git a/LICENSE.md b/LICENSE.md index b8f267af7d..02896c6226 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -215,15 +215,15 @@ Deze openbare licentie van de Europese Unie („EUPL”) is van toepassing op he of op een andere wijze zijn bereidheid te kennen heeft gegeven krachtens de EUPL in licentie te geven. 1.Definities -In deze licentie wordt verstaan onder: -— „de licentie”:de onderhavige licentie; -— „het oorspronkelijke werk”:het werk dat of de software die door de licentiegever krachtens deze licentie wordt verspreid of medegedeeld, en dat/die beschikbaar is als broncode en, in voorkomend geval, ook als uitvoerbare code; -— „bewerkingen”:de werken of software die de licentiehouder kan creëren op grond van het oorspronkelijke werk of wijzigingen ervan. In deze licentie wordt niet gedefinieerd welke mate van wijziging of afhankelijkheid van het oorspronkelijke werk vereist is om een werk als een bewerking te kunnen aanmerken; dat wordt bepaald conform het auteursrecht dat van toepassing is in de in artikel 15 bedoelde staat; -— „het werk”:het oorspronkelijke werk of de bewerkingen ervan; -— „de broncode”:de voor mensen leesbare vorm van het werk, die het gemakkelijkste door mensen kan worden bestudeerd en gewijzigd; -— „de uitvoerbare code”:elke code die over het algemeen is gecompileerd en is bedoeld om door een computer als een programma te worden uitgevoerd; -— „de licentiegever”:de natuurlijke of rechtspersoon die het werk krachtens de licentie verspreidt of mededeelt; -— „bewerker(s)”:elke natuurlijke of rechtspersoon die het werk krachtens de licentie wijzigt of op een andere wijze bijdraagt tot de totstandkoming van een bewerking; +In deze licentie wordt verstaan onder: +— „de licentie”:de onderhavige licentie; +— „het oorspronkelijke werk”:het werk dat of de software die door de licentiegever krachtens deze licentie wordt verspreid of medegedeeld, en dat/die beschikbaar is als broncode en, in voorkomend geval, ook als uitvoerbare code; +— „bewerkingen”:de werken of software die de licentiehouder kan creëren op grond van het oorspronkelijke werk of wijzigingen ervan. In deze licentie wordt niet gedefinieerd welke mate van wijziging of afhankelijkheid van het oorspronkelijke werk vereist is om een werk als een bewerking te kunnen aanmerken; dat wordt bepaald conform het auteursrecht dat van toepassing is in de in artikel 15 bedoelde staat; +— „het werk”:het oorspronkelijke werk of de bewerkingen ervan; +— „de broncode”:de voor mensen leesbare vorm van het werk, die het gemakkelijkste door mensen kan worden bestudeerd en gewijzigd; +— „de uitvoerbare code”:elke code die over het algemeen is gecompileerd en is bedoeld om door een computer als een programma te worden uitgevoerd; +— „de licentiegever”:de natuurlijke of rechtspersoon die het werk krachtens de licentie verspreidt of mededeelt; +— „bewerker(s)”:elke natuurlijke of rechtspersoon die het werk krachtens de licentie wijzigt of op een andere wijze bijdraagt tot de totstandkoming van een bewerking; — „de licentiehouder” of „u”:elke natuurlijke of rechtspersoon die het werk onder de voorwaarden van de licentie gebruikt; — „verspreiding” of „mededeling”:het verkopen, geven, uitlenen, verhuren, verspreiden, mededelen, doorgeven, of op een andere wijze online of offline beschikbaar stellen van kopieën van het werk of het verlenen van toegang tot de essentiële functies ervan ten behoeve van andere natuurlijke of rechtspersonen. 2.Draagwijdte van de uit hoofde van de licentie verleende rechten @@ -263,7 +263,7 @@ De oorspronkelijke licentiegever garandeert dat hij houder is van het hierbij ve Het werk is een werk in ontwikkeling, dat voortdurend door vele bewerkers wordt verbeterd. Het is een onvoltooid werk, dat bijgevolg nog tekortkomingen of programmeerfouten („bugs”) kan vertonen, die onlosmakelijk verbonden zijn met dit soort ontwikkeling. Om die reden wordt het werk op grond van de licentie verstrekt „zoals het is” en zonder enige garantie met betrekking tot het werk te geven, met inbegrip van, maar niet beperkt tot garanties met betrekking tot de verhandelbaarheid, de geschiktheid voor een specifiek doel, de afwezigheid van tekortkomingen of fouten, de nauwkeurigheid, de eerbiediging van andere intellectuele-eigendomsrechten dan het in artikel 6 van deze licentie bedoelde auteursrecht. Deze uitsluiting van garantie is een essentieel onderdeel van de licentie en een voorwaarde voor de verlening van rechten op het werk. 8.Uitsluiting van aansprakelijkheid -Behoudens in het geval van een opzettelijke fout of directe schade aan natuurlijke personen, is de licentiegever in geen enkel geval aansprakelijk voor ongeacht welke directe of indirecte, materiële of immateriële schade die voortvloeit uit de licentie of het gebruik van het werk, met inbegrip van, maar niet beperkt tot schade als gevolg van het verlies van goodwill, verloren werkuren, een computerdefect of computerfout, het verlies van gegevens, of enige andere commerciële schade, zelfs indien de licentiegever werd gewezen op de mogelijkheid van dergelijke schade. De licentiegever is echter aansprakelijk op grond van de wetgeving inzake productaansprakelijkheid, voor zover deze wetgeving op het werk van toepassing is. +Behoudens in het geval van een opzettelijke fout of directe schade aan natuurlijke personen, is de licentiegever in geen enkel geval aansprakelijk voor ongeacht welke directe of indirecte, materiële of immateriële schade die voortvloeit uit de licentie of het gebruik van het werk, met inbegrip van, maar niet beperkt tot schade als gevolg van het verlies van goodwill, verloren werkuren, een computerdefect of computerfout, het verlies van gegevens, of enige andere commerciële schade, zelfs indien de licentiegever werd gewezen op de mogelijkheid van dergelijke schade. De licentiegever is echter aansprakelijk op grond van de wetgeving inzake productaansprakelijkheid, voor zover deze wetgeving op het werk van toepassing is. 9.Aanvullende overeenkomsten Bij de verspreiding van het werk kunt u ervoor kiezen een aanvullende overeenkomst te sluiten, waarin de verplichtingen of diensten overeenkomstig deze licentie worden omschreven. Indien deze verplichtingen worden aanvaard, kunt u echter alleen in eigen naam en onder eigen verantwoordelijkheid handelen, en dus niet in naam van de oorspronkelijke licentiegever of een bewerker, en kunt u voorts alleen handelen indien u ermee instemt alle bewerkers schadeloos te stellen, te verdedigen of te vrijwaren met betrekking tot de aansprakelijkheid van of vorderingen tegen deze bewerkers op grond van het feit dat u een garantie of aanvullende aansprakelijkheid hebt aanvaard. diff --git a/SECURITY.rst b/SECURITY.rst index ff9d1feea9..1666abfe71 100644 --- a/SECURITY.rst +++ b/SECURITY.rst @@ -3,61 +3,61 @@ Security policy =============== -The development team is strongly committed to responsible reporting and -disclosure of security-related issues. As such, we’ve adopted and follow a set -of policies which conform to that ideal and are geared toward allowing us to +The development team is strongly committed to responsible reporting and +disclosure of security-related issues. As such, we’ve adopted and follow a set +of policies which conform to that ideal and are geared toward allowing us to deliver timely security updates to the official distribution of Open Inwoner. Reporting security issues ------------------------- -**Short version: please report security issues by emailing +**Short version: please report security issues by emailing security@maykinmedia.nl.** -If you discover security issues in Open Inwoner or related projects under the -same organization, we request you to disclose these in a *responsible* way by +If you discover security issues in Open Inwoner or related projects under the +same organization, we request you to disclose these in a *responsible* way by mailing to security@maykinmedia.nl. -It is extremely useful if you have a reproducible test case and/or clear steps +It is extremely useful if you have a reproducible test case and/or clear steps on how to reproduce the vulnerability. -Please do not report security issues on the public Github issue tracker, as -this makes it visible which exploits exist before a fix is available, +Please do not report security issues on the public Github issue tracker, as +this makes it visible which exploits exist before a fix is available, potentially comprising a lot of unprotected instances. -Once you’ve submitted an issue via email, you should receive an acknowledgment -from a member of the security team as soon as possible, and depending on the +Once you’ve submitted an issue via email, you should receive an acknowledgment +from a member of the security team as soon as possible, and depending on the action to be taken, you may receive further followup emails. Timeline of the process ----------------------- -Open Inwoner community support is provided by `Maykin Media`_. The community +Open Inwoner community support is provided by `Maykin Media`_. The community support team is responsible for the handling of security issues. -1. The recipients of the report first validate if there is indeed a (possible) +1. The recipients of the report first validate if there is indeed a (possible) issue. 2. After validation, we confirm that we received the report and if it is indeed a valid issue. -3. We have a private Github repository accessible only to the community support - team. In this repository, an issue is created for the vulnerability where +3. We have a private Github repository accessible only to the community support + team. In this repository, an issue is created for the vulnerability where the impact and possible solutions are discussed. -4. The next step is to create a (draft) Github security advisory, which is only - visible to the repository administrators and community support team. +4. The next step is to create a (draft) Github security advisory, which is only + visible to the repository administrators and community support team. Severity and impact will be established here. 5. If appropriate, we request a `CVE identifier`_ from Github. 6. A patch is implemented, reviewed and tested in a private fork. -7. When the fix is tested and release coordination is done, the fix is merged - into the primary repository. The security advisory and release are +7. When the fix is tested and release coordination is done, the fix is merged + into the primary repository. The security advisory and release are published. All managed instances should be updated. -8. The release and security vulnerability are communicated to the community. +8. The release and security vulnerability are communicated to the community. This includes an announcement on `commonground.nl`_. diff --git a/bin/generate_cms_fixture.sh b/bin/generate_cms_fixture.sh index 8f7d6f0440..3f3675f6d9 100755 --- a/bin/generate_cms_fixture.sh +++ b/bin/generate_cms_fixture.sh @@ -11,5 +11,3 @@ # Note: you will likely need to restart uwsgi/supervisor/docker afterwards for apphooks to be registered properly src/manage.py dumpdata --indent=4 --natural-primary cms.treenode cms.placeholder cms.page cms.title cms.cmsplugin extensions.commonextension > src/open_inwoner/conf/fixtures/cms-page.json - - diff --git a/docker-nginx-default.conf b/docker-nginx-default.conf index 187d4fb77c..15ca9b57ef 100644 --- a/docker-nginx-default.conf +++ b/docker-nginx-default.conf @@ -11,4 +11,4 @@ server { client_max_body_size 100M; proxy_pass http://web:8000; } -} \ No newline at end of file +} diff --git a/docker/openklant/fixtures/db.json b/docker/openklant/fixtures/db.json index 08ac035a9a..c3ed9b67da 100644 --- a/docker/openklant/fixtures/db.json +++ b/docker/openklant/fixtures/db.json @@ -215,4 +215,4 @@ "object_type": "zaak" } } -] \ No newline at end of file +] diff --git a/docs/architecture/accounts.dot b/docs/architecture/accounts.dot index ccfec95ec1..d3f007acd9 100644 --- a/docs/architecture/accounts.dot +++ b/docs/architecture/accounts.dot @@ -28,15 +28,15 @@ digraph model_graph { PermissionsMixin - - + + is_superuser BooleanField - - + + >] @@ -46,23 +46,23 @@ digraph model_graph { AbstractBaseUser - - + + last_login DateTimeField - - - + + + password CharField - - + + >] @@ -72,271 +72,271 @@ digraph model_graph { User
<AbstractBaseUser,PermissionsMixin>
- - + + id AutoField - - - + + + bsn NLBSNField - - - + + + cases_notifications BooleanField - - - + + + city CharField - - - + + + company_name CharField - - - + + + contact_type CharField - - - + + + cropping ImageRatioField - - - + + + date_joined DateTimeField - - - + + + deactivated_on DateField - - - + + + display_name CharField - - - + + + email EmailField - - - + + + first_name CharField - - - + + + housenumber CharField - - - + + + image ImageCropField - - - + + + infix CharField - - - + + + is_active BooleanField - - - + + + is_prepopulated BooleanField - - - + + + is_staff BooleanField - - - + + + is_superuser BooleanField - - - + + + kvk CharField - - - + + + last_login DateTimeField - - - + + + last_name CharField - - - + + + login_type CharField - - - + + + messages_notifications BooleanField - - - + + + oidc_id CharField - - - + + + password CharField - - - + + + phonenumber CharField - - - + + + plans_notifications BooleanField - - - + + + postcode NLZipCodeField - - - + + + rsin CharField - - - + + + street CharField - - - + + + uuid UUIDField - - - + + + verified_email EmailField - - + + >] @@ -346,71 +346,71 @@ digraph model_graph { Document - - + + id AutoField - - - + + + owner ForeignKey (id) - - - + + + plan ForeignKey (id) - - - + + + created_on DateTimeField - - - + + + file FileField - - - + + + name CharField - - - + + + updated_on DateTimeField - - - + + + uuid UUIDField - - + + >] @@ -420,119 +420,119 @@ digraph model_graph { Action - - + + id AutoField - - - + + + created_by ForeignKey (id) - - - + + + is_for ForeignKey (id) - - - + + + plan ForeignKey (id) - - - + + + created_on DateTimeField - - - + + + description TextField - - - + + + end_date DateField - - - + + + file FileField - - - + + + is_deleted BooleanField - - - + + + name CharField - - - + + + status CharField - - - + + + type CharField - - - + + + updated_on DateTimeField - - - + + + uuid UUIDField - - + + >] @@ -542,79 +542,79 @@ digraph model_graph { Message - - + + id AutoField - - - + + + receiver ForeignKey (id) - - - + + + sender ForeignKey (id) - - - + + + content TextField - - - + + + created_on DateTimeField - - - + + + file FileField - - - + + + seen BooleanField - - - + + + sent BooleanField - - - + + + uuid UUIDField - - + + >] @@ -624,79 +624,79 @@ digraph model_graph { Invite - - + + id AutoField - - - + + + invitee ForeignKey (id) - - - + + + inviter ForeignKey (id) - - - + + + accepted BooleanField - - - + + + created_on DateTimeField - - - + + + invitee_email EmailField - - - + + + invitee_first_name CharField - - - + + + invitee_last_name CharField - - - + + + key CharField - - + + >] diff --git a/docs/architecture/configurations.dot b/docs/architecture/configurations.dot index 991a11675c..44902dfb76 100644 --- a/docs/architecture/configurations.dot +++ b/docs/architecture/configurations.dot @@ -28,7 +28,7 @@ digraph model_graph { SingletonModel - + >] @@ -38,15 +38,15 @@ digraph model_graph { OrderedModel
<OrderedModelBase>
- - + + order PositiveIntegerField - - + + >] @@ -56,623 +56,623 @@ digraph model_graph { SiteConfiguration
<SingletonModel>
- - + + id AutoField - - - + + + email_logo FilerImageField (file_ptr) - - - + + + favicon FilerImageField (file_ptr) - - - + + + footer_logo FilerImageField (file_ptr) - - - + + + hero_image_login FilerImageField (file_ptr) - - - + + + logo FilerImageField (file_ptr) - - - + + + openid_connect_logo FilerImageField (file_ptr) - - - + + + accent_color ColorField - - - + + + accent_font_color CharField - - - + + + account_help_text TextField - - - + + + allow_messages_file_sharing BooleanField - - - + + + contact_page URLField - - - + + + contact_phonenumber CharField - - - + + + cookie_info_text CharField - - - + + + cookie_link_text CharField - - - + + + cookie_link_url CharField - - - + + + display_social BooleanField - - - + + + eherkenning_enabled BooleanField - - - + + + email_new_message BooleanField - - - + + + email_verification_required BooleanField - - - + + + extra_css CSSField - - - + + + footer_logo_title CharField - - - + + + footer_logo_url URLField - - - + + + ga_code CharField - - - + + + gtm_code CharField - - - + + + hide_categories_from_anonymous_users BooleanField - - - + + + hide_search_from_anonymous_users BooleanField - - - + + + home_help_text TextField - - - + + + home_map_intro TextField - - - + + + home_map_title CharField - - - + + + home_product_finder_intro TextField - - - + + + home_product_finder_title CharField - - - + + + home_questionnaire_intro TextField - - - + + + home_questionnaire_title CharField - - - + + + home_theme_intro TextField - - - + + + home_theme_title CharField - - - + + + home_welcome_intro TextField - - - + + + home_welcome_title CharField - - - + + + kcm_survey_link_text CharField - - - + + + kcm_survey_link_url URLField - - - + + + login_2fa_sms BooleanField - - - + + + login_allow_registration BooleanField - - - + + + login_show BooleanField - - - + + + login_text TextField - - - + + + matomo_site_id PositiveIntegerField - - - + + + matomo_url CharField - - - + + + name CharField - - - + + + openid_connect_login_text CharField - - - + + + openid_display CharField - - - + + + plan_help_text TextField - - - + + + plans_edit_message CharField - - - + + + plans_intro TextField - - - + + + plans_no_plans_message CharField - - - + + + primary_color ColorField - - - + + + primary_font_color CharField - - - + + + product_help_text TextField - - - + + + questionnaire_help_text TextField - - - + + + recipients_email_digest ArrayField - - - + + + redirect_to CharField - - - + + + registration_text TextField - - - + + + search_filter_categories BooleanField - - - + + + search_filter_organizations BooleanField - - - + + + search_filter_tags BooleanField - - - + + + search_help_text TextField - - - + + + secondary_color ColorField - - - + + + secondary_font_color CharField - - - + + + select_questionnaire_intro TextField - - - + + + select_questionnaire_title CharField - - - + + + siteimprove_id CharField - - - + + + theme_help_text TextField - - - + + + theme_intro TextField - - - + + + theme_stylesheet FileField - - - + + + theme_title CharField - - - + + + warning_banner_background_color ColorField - - - + + + warning_banner_enabled BooleanField - - - + + + warning_banner_font_color ColorField - - - + + + warning_banner_text RichTextField - - + + >] @@ -682,63 +682,63 @@ digraph model_graph { CustomFontSet - - + + id AutoField - - - + + + site_configuration OneToOneField (id) - - - + + + body_font_bold CustomFontField - - - + + + body_font_bold_italic CustomFontField - - - + + + body_font_italic CustomFontField - - - + + + body_font_regular CustomFontField - - - + + + heading_font CustomFontField - - + + >] @@ -748,39 +748,39 @@ digraph model_graph { SiteConfigurationPage
<OrderedModel>
- - + + id AutoField - - - + + + configuration ForeignKey (id) - - - + + + flatpage ForeignKey (id) - - - + + + order PositiveIntegerField - - + + >] diff --git a/docs/architecture/haalcentraal.dot b/docs/architecture/haalcentraal.dot index cd4efaa1e7..e436b9c87c 100644 --- a/docs/architecture/haalcentraal.dot +++ b/docs/architecture/haalcentraal.dot @@ -28,7 +28,7 @@ digraph model_graph { SingletonModel - + >] @@ -38,39 +38,39 @@ digraph model_graph { HaalCentraalConfig
<SingletonModel>
- - + + id AutoField - - - + + + service OneToOneField (id) - - - + + + api_doelbinding CharField - - - + + + api_origin_oin CharField - - + + >] diff --git a/docs/architecture/kvk.dot b/docs/architecture/kvk.dot index e1972faab6..354abe90f8 100644 --- a/docs/architecture/kvk.dot +++ b/docs/architecture/kvk.dot @@ -28,7 +28,7 @@ digraph model_graph { SingletonModel - + >] @@ -38,47 +38,47 @@ digraph model_graph { KvKConfig
<SingletonModel>
- - + + id AutoField - - - + + + client_certificate ForeignKey (id) - - - + + + server_certificate ForeignKey (id) - - - + + + api_key CharField - - - + + + api_root URLField - - + + >] diff --git a/docs/architecture/openklant.dot b/docs/architecture/openklant.dot index b9688a9d07..c6677666a0 100644 --- a/docs/architecture/openklant.dot +++ b/docs/architecture/openklant.dot @@ -28,7 +28,7 @@ digraph model_graph { SingletonModel - + >] @@ -38,15 +38,15 @@ digraph model_graph { OrderedModel
<OrderedModelBase>
- - + + order PositiveIntegerField - - + + >] @@ -56,95 +56,95 @@ digraph model_graph { OpenKlantConfig
<SingletonModel>
- - + + id AutoField - - - + + + contactmomenten_service OneToOneField (id) - - - + + + klanten_service OneToOneField (id) - - - + + + register_bronorganisatie_rsin CharField - - - + + + register_channel CharField - - - + + + register_contact_moment BooleanField - - - + + + register_email EmailField - - - + + + register_employee_id CharField - - - + + + register_type CharField - - - + + + send_email_confirmation BooleanField - - - + + + use_rsin_for_innNnpId_query_parameter BooleanField - - + + >] @@ -154,47 +154,47 @@ digraph model_graph { ContactFormSubject
<OrderedModel>
- - + + id AutoField - - - + + + config ForeignKey (id) - - - + + + order PositiveIntegerField - - - + + + subject CharField - - - + + + subject_code CharField - - + + >] @@ -204,39 +204,39 @@ digraph model_graph { KlantContactMomentAnswer - - + + id AutoField - - - + + + user ForeignKey (id) - - - + + + contactmoment_url URLField - - - + + + is_seen BooleanField - - + + >] diff --git a/docs/architecture/openzaak.dot b/docs/architecture/openzaak.dot index 0e7ceacb6b..878631bd28 100644 --- a/docs/architecture/openzaak.dot +++ b/docs/architecture/openzaak.dot @@ -28,47 +28,47 @@ digraph model_graph { UserCaseStatusNotificationBase - - + + user ForeignKey (None) - - - + + + case_uuid UUIDField - - - + + + collision_key CharField - - - + + + created_on DateTimeField - - - + + + is_sent BooleanField - - + + >] @@ -78,7 +78,7 @@ digraph model_graph { SingletonModel - + >] @@ -88,127 +88,127 @@ digraph model_graph { OpenZaakConfig
<SingletonModel>
- - + + id AutoField - - - + + + catalogi_service OneToOneField (id) - - - + + + document_service OneToOneField (id) - - - + + + form_service OneToOneField (id) - - - + + + zaak_service OneToOneField (id) - - - + + + action_required_deadline_days IntegerField - - - + + + allowed_file_extensions ArrayField - - - + + + document_max_confidentiality CharField - - - + + + enable_categories_filtering_with_zaken BooleanField - - - + + + fetch_eherkenning_zaken_with_rsin BooleanField - - - + + + max_upload_size PositiveIntegerField - - - + + + reformat_esuite_zaak_identificatie BooleanField - - - + + + skip_notification_statustype_informeren BooleanField - - - + + + title_text TextField - - - + + + zaak_max_confidentiality CharField - - + + >] @@ -218,39 +218,39 @@ digraph model_graph { CatalogusConfig - - + + id AutoField - - - + + + domein CharField - - - + + + rsin CharField - - - + + + url URLField - - + + >] @@ -260,103 +260,103 @@ digraph model_graph { ZaakTypeConfig - - + + id AutoField - - - + + + catalogus ForeignKey (id) - - - + + + contact_form_enabled BooleanField - - - + + + contact_subject_code CharField - - - + + + description TextField - - - + + + document_upload_enabled BooleanField - - - + + + external_document_upload_url URLField - - - + + + identificatie CharField - - - + + + notify_status_changes BooleanField - - - + + + omschrijving CharField - - - + + + relevante_zaakperiode PositiveIntegerField - - - + + + urls ArrayField - - + + >] @@ -366,63 +366,63 @@ digraph model_graph { ZaakTypeInformatieObjectTypeConfig - - + + id AutoField - - - + + + zaaktype_config ForeignKey (id) - - - + + + document_notification_enabled BooleanField - - - + + + document_upload_enabled BooleanField - - - + + + informatieobjecttype_url URLField - - - + + + omschrijving CharField - - - + + + zaaktype_uuids ArrayField - - + + >] @@ -432,135 +432,135 @@ digraph model_graph { ZaakTypeStatusTypeConfig - - + + id AutoField - - - + + + zaaktype_config ForeignKey (id) - - - + + + action_required BooleanField - - - + + + call_to_action_text CharField - - - + + + call_to_action_url URLField - - - + + + case_link_text CharField - - - + + + description TextField - - - + + + document_upload_description TextField - - - + + + document_upload_enabled BooleanField - - - + + + notify_status_change BooleanField - - - + + + omschrijving CharField - - - + + + status_indicator CharField - - - + + + status_indicator_text TextField - - - + + + statustekst CharField - - - + + + statustype_url URLField - - - + + + zaaktype_uuids ArrayField - - + + >] @@ -570,55 +570,55 @@ digraph model_graph { ZaakTypeResultaatTypeConfig - - + + id AutoField - - - + + + zaaktype_config ForeignKey (id) - - - + + + description TextField - - - + + + omschrijving CharField - - - + + + resultaattype_url URLField - - - + + + zaaktype_uuids ArrayField - - + + >] @@ -628,63 +628,63 @@ digraph model_graph { UserCaseStatusNotification
<UserCaseStatusNotificationBase>
- - + + id AutoField - - - + + + user ForeignKey (id) - - - + + + case_uuid UUIDField - - - + + + collision_key CharField - - - + + + created_on DateTimeField - - - + + + is_sent BooleanField - - - + + + status_uuid UUIDField - - + + >] @@ -694,63 +694,63 @@ digraph model_graph { UserCaseInfoObjectNotification
<UserCaseStatusNotificationBase>
- - + + id AutoField - - - + + + user ForeignKey (id) - - - + + + case_uuid UUIDField - - - + + + collision_key CharField - - - + + + created_on DateTimeField - - - + + + is_sent BooleanField - - - + + + zaak_info_object_uuid UUIDField - - + + >] diff --git a/docs/architecture/pdc.dot b/docs/architecture/pdc.dot index 6e268e323b..6c0d556918 100644 --- a/docs/architecture/pdc.dot +++ b/docs/architecture/pdc.dot @@ -28,15 +28,15 @@ digraph model_graph { OrderedModel
<OrderedModelBase>
- - + + order PositiveIntegerField - - + + >] @@ -46,47 +46,47 @@ digraph model_graph { GeoModel - - + + city CharField - - - + + + geometry PointField - - - + + + housenumber CharField - - - + + + postcode NLZipCodeField - - - + + + street CharField - - + + >] @@ -96,31 +96,31 @@ digraph model_graph { MP_Node
<Node>
- - + + depth PositiveIntegerField - - - + + + numchild PositiveIntegerField - - - + + + path CharField - - + + >] @@ -130,135 +130,135 @@ digraph model_graph { Category
<MP_Node>
- - + + id AutoField - - - + + + icon FilerImageField (file_ptr) - - - + + + image FilerImageField (file_ptr) - - - + + + auto_redirect_to_link URLField - - - + + + depth PositiveIntegerField - - - + + + description TextField - - - + + + highlighted BooleanField - - - + + + name CharField - - - + + + numchild PositiveIntegerField - - - + + + path CharField - - - + + + published BooleanField - - - + + + slug SlugField - - - + + + visible_for_anonymous BooleanField - - - + + + visible_for_citizens BooleanField - - - + + + visible_for_companies BooleanField - - - + + + zaaktypen ArrayField - - + + >] @@ -268,55 +268,55 @@ digraph model_graph { Question
<OrderedModel>
- - + + id AutoField - - - + + + category ForeignKey (id) - - - + + + product ForeignKey (id) - - - + + + answer TextField - - - + + + order PositiveIntegerField - - - + + + question CharField - - + + >] @@ -326,23 +326,23 @@ digraph model_graph { Neighbourhood - - + + id AutoField - - - + + + name CharField - - + + >] @@ -352,111 +352,111 @@ digraph model_graph { Organization
<GeoModel>
- - + + id AutoField - - - + + + logo FilerImageField (file_ptr) - - - + + + neighbourhood ForeignKey (id) - - - + + + type ForeignKey (id) - - - + + + city CharField - - - + + + email EmailField - - - + + + geometry PointField - - - + + + housenumber CharField - - - + + + name CharField - - - + + + phonenumber CharField - - - + + + postcode NLZipCodeField - - - + + + slug SlugField - - - + + + street CharField - - + + >] @@ -466,23 +466,23 @@ digraph model_graph { OrganizationType - - + + id AutoField - - - + + + name CharField - - + + >] @@ -492,39 +492,39 @@ digraph model_graph { CategoryProduct
<OrderedModel>
- - + + id AutoField - - - + + + category ForeignKey (id) - - - + + + product ForeignKey (id) - - - + + + order PositiveIntegerField - - + + >] @@ -534,159 +534,159 @@ digraph model_graph { Product - - + + id AutoField - - - + + + icon FilerImageField (file_ptr) - - - + + + image FilerImageField (file_ptr) - - - + + + video ForeignKey (id) - - - + + + auto_redirect_to_link URLField - - - + + + button_text CharField - - - + + + content TextField - - - + + + content_is_collapsable BooleanField - - - + + + costs DecimalField - - - + + + created_on DateTimeField - - - + + + form OpenFormsSlugField - - - + + + keywords ArrayField - - - + + + link URLField - - - + + + name CharField - - - + + + published BooleanField - - - + + + slug SlugField - - - + + + summary TextField - - - + + + uniforme_productnaam CharField - - - + + + updated_on DateTimeField - - + + >] @@ -696,31 +696,31 @@ digraph model_graph { ProductFile - - + + id AutoField - - - + + + file FilerFileField (id) - - - + + + product ForeignKey (id) - - + + >] @@ -730,63 +730,63 @@ digraph model_graph { ProductContact - - + + id AutoField - - - + + + organization ForeignKey (id) - - - + + + email EmailField - - - + + + first_name CharField - - - + + + last_name CharField - - - + + + phonenumber CharField - - - + + + role CharField - - + + >] @@ -796,39 +796,39 @@ digraph model_graph { ProductLink - - + + id AutoField - - - + + + product ForeignKey (id) - - - + + + name CharField - - - + + + url URLField - - + + >] @@ -838,87 +838,87 @@ digraph model_graph { ProductLocation
<GeoModel>
- - + + id AutoField - - - + + + city CharField - - - + + + email EmailField - - - + + + geometry PointField - - - + + + housenumber CharField - - - + + + name CharField - - - + + + phonenumber CharField - - - + + + postcode NLZipCodeField - - - + + + street CharField - - - + + + uuid UUIDField - - + + >] @@ -928,63 +928,63 @@ digraph model_graph { ProductCondition
<OrderedModel>
- - + + id AutoField - - - + + + name CharField - - - + + + negative_text TextField - - - + + + order PositiveIntegerField - - - + + + positive_text TextField - - - + + + question TextField - - - + + + rule TextField - - + + >] @@ -994,47 +994,47 @@ digraph model_graph { Tag - - + + id AutoField - - - + + + icon FilerImageField (file_ptr) - - - + + + type ForeignKey (id) - - - + + + name CharField - - - + + + slug SlugField - - + + >] @@ -1044,23 +1044,23 @@ digraph model_graph { TagType - - + + id AutoField - - - + + + name CharField - - + + >] diff --git a/docs/architecture/plans.dot b/docs/architecture/plans.dot index 8b790c7502..c0c39ded2c 100644 --- a/docs/architecture/plans.dot +++ b/docs/architecture/plans.dot @@ -28,47 +28,47 @@ digraph model_graph { PlanTemplate - - + + id AutoField - - - + + + file FilerFileField (id) - - - + + + description TextField - - - + + + goal TextField - - - + + + name CharField - - + + >] @@ -78,55 +78,55 @@ digraph model_graph { ActionTemplate - - + + id AutoField - - - + + + plan_template ForeignKey (id) - - - + + + description TextField - - - + + + end_in_days PositiveIntegerField - - - + + + name CharField - - - + + + type CharField - - + + >] @@ -136,39 +136,39 @@ digraph model_graph { PlanContact - - + + id AutoField - - - + + + plan ForeignKey (id) - - - + + + user ForeignKey (id) - - - + + + notify_new BooleanField - - + + >] @@ -178,79 +178,79 @@ digraph model_graph { Plan - - + + id AutoField - - - + + + created_by ForeignKey (id) - - - + + + created_at DateTimeField - - - + + + description TextField - - - + + + end_date DateField - - - + + + goal TextField - - - + + + title CharField - - - + + + updated_at DateTimeField - - - + + + uuid UUIDField - - + + >] diff --git a/docs/beheerhandleiding/07_zoeken.rst b/docs/beheerhandleiding/07_zoeken.rst index 32f3a565f1..d14d3a4ff4 100644 --- a/docs/beheerhandleiding/07_zoeken.rst +++ b/docs/beheerhandleiding/07_zoeken.rst @@ -167,4 +167,3 @@ Door op een specifiek veld in het overzicht te klikken kunt u de zoekveldgewicht aanpassen. Er wordt een nieuw scherm geopend (zie 7.3.1) waar u de zoekveldgewicht en eventueel het veld kunt wijzigen. Om wijzigingen op te slaan klikt u op de knop [opslaan]. - diff --git a/docs/beheerhandleiding/09_datakoppelingen.rst b/docs/beheerhandleiding/09_datakoppelingen.rst index 6ed2f3b0e5..01582a5d59 100644 --- a/docs/beheerhandleiding/09_datakoppelingen.rst +++ b/docs/beheerhandleiding/09_datakoppelingen.rst @@ -30,8 +30,8 @@ gebruikers. Dit is overzichtelijk weergegeven in de tabel op deze pagina. 9.1 Catalogus Configs ===================== -Catalogus configs worden automatisch geïmporteerd vanuit Open Zaak of eSuite via de -ZGW-koppeling. Aan deze catalogi zijn zaaktypes gekoppeld, zoals geconfigureerd in +Catalogus configs worden automatisch geïmporteerd vanuit Open Zaak of eSuite via de +ZGW-koppeling. Aan deze catalogi zijn zaaktypes gekoppeld, zoals geconfigureerd in het onderdeel Zaaktypeconfiguratie. .. _CatalogusImportExport: @@ -43,12 +43,12 @@ Catalogi en Zaaktype Configuraties kunnen worden geëxporteerd en geïmporteerd verschillende OIP-installaties (bijvoorbeeld tussen acceptatie- en testomgevingen). .. note:: - De import/export-functionaliteit vereist dat de gekoppelde zaaksystemen - materieel gelijk zijn. Dit betekent dat de catalogi en onderliggende zaaktypes + De import/export-functionaliteit vereist dat de gekoppelde zaaksystemen + materieel gelijk zijn. Dit betekent dat de catalogi en onderliggende zaaktypes in beide ZGW API's aanwezig moeten zijn (hoewel de URLs en UUIDs mogen verschillen). Voer daarom de ``Importeer ZGW data`` periodieke taak eerst handmatig uit op zowel de bron als bestemming zodat de ZGW objecten volledig in sync zijn. - + .. note:: Het onderstaande proces spitst zich toe op het importeren van hele Catalogus @@ -62,8 +62,8 @@ verschillende OIP-installaties (bijvoorbeeld tussen acceptatie- en testomgevinge Importproces ^^^^^^^^^^^^ -Tijdens de import zoekt de ontvangende installatie catalogi en zaaktypes op basis van -specifieke kenmerken. Deze matching bepaalt hoe bijbehorende data (beschrijvingen, +Tijdens de import zoekt de ontvangende installatie catalogi en zaaktypes op basis van +specifieke kenmerken. Deze matching bepaalt hoe bijbehorende data (beschrijvingen, instellingen en metadata) worden gekoppeld. Matching-attributen @@ -89,7 +89,7 @@ Stappen voor exporteren: Exporteren van catalogus configuraties -De export omvat alle catalogi, zaaktypes en onderliggende objecten (resultaattypen, +De export omvat alle catalogi, zaaktypes en onderliggende objecten (resultaattypen, informatie-objecttypen, etc.) van de geselecteerde catalogi. Importeren @@ -653,7 +653,7 @@ Klik allereerst op ‘tonen’ om alle gegevens uit te vouwen. --------------------------------------------------- Het is mogelijk om individuele Zaaktype Configuratie objecten te importeren, op -analoge wijze zoals beschreven voor de Catalogus Configuraties (zie +analoge wijze zoals beschreven voor de Catalogus Configuraties (zie :ref:`CatalogusImportExport`). Voor meer details verwijzen we u naar deze sectie. In hoofdlijnen: via het totaaloverzicht @@ -673,5 +673,5 @@ via de knop "Importeer bestand": .. note:: Zaaktype Configuraties die via deze wijze worden gexporteerd, kunnen ook worden - geimporteerd via het Catalogus Configuratie scherm, en omgekeerd. - Zie verder :ref:`CatalogusImportExport`. \ No newline at end of file + geimporteerd via het Catalogus Configuratie scherm, en omgekeerd. + Zie verder :ref:`CatalogusImportExport`. diff --git a/docs/configuration/admin_oidc.rst b/docs/configuration/admin_oidc.rst index 3bcba25589..d54ba16108 100644 --- a/docs/configuration/admin_oidc.rst +++ b/docs/configuration/admin_oidc.rst @@ -68,121 +68,121 @@ Detailed Information Description Mapping from user-model fields to OIDC claims Possible values Mapping: {'some_key': 'Some value'} Default value {'email': ['email'], 'first_name': ['given_name'], 'last_name': ['family_name']} - + Variable ADMIN_OIDC_GROUPS_CLAIM Setting groups claim Description The name of the OIDC claim that holds the values to map to local user groups. Possible values No information available Default value roles - + Variable ADMIN_OIDC_MAKE_USERS_STAFF Setting make users staff Description Users will be flagged as being a staff user automatically. This allows users to login to the admin interface. By default they have no permissions, even if they are staff. Possible values True, False Default value False - + Variable ADMIN_OIDC_OIDC_NONCE_SIZE Setting Nonce size Description Sets the length of the random string used for OpenID Connect nonce verification Possible values string representing a positive integer Default value 32 - + Variable ADMIN_OIDC_OIDC_OP_AUTHORIZATION_ENDPOINT Setting Authorization endpoint Description URL of your OpenID Connect provider authorization endpoint Possible values string (URL) Default value No default - + Variable ADMIN_OIDC_OIDC_OP_DISCOVERY_ENDPOINT Setting Discovery endpoint Description URL of your OpenID Connect provider discovery endpoint ending with a slash (`.well-known/...` will be added automatically). If this is provided, the remaining endpoints can be omitted, as they will be derived from this endpoint. Possible values string (URL) Default value No default - + Variable ADMIN_OIDC_OIDC_OP_JWKS_ENDPOINT Setting JSON Web Key Set endpoint Description URL of your OpenID Connect provider JSON Web Key Set endpoint. Required if `RS256` is used as signing algorithm. Possible values string (URL) Default value No default - + Variable ADMIN_OIDC_OIDC_OP_TOKEN_ENDPOINT Setting Token endpoint Description URL of your OpenID Connect provider token endpoint Possible values string (URL) Default value No default - + Variable ADMIN_OIDC_OIDC_OP_USER_ENDPOINT Setting User endpoint Description URL of your OpenID Connect provider userinfo endpoint Possible values string (URL) Default value No default - + Variable ADMIN_OIDC_OIDC_RP_CLIENT_ID Setting OpenID Connect client ID Description OpenID Connect client ID provided by the OIDC Provider Possible values string Default value No default - + Variable ADMIN_OIDC_OIDC_RP_CLIENT_SECRET Setting OpenID Connect secret Description OpenID Connect secret provided by the OIDC Provider Possible values string Default value No default - + Variable ADMIN_OIDC_OIDC_RP_IDP_SIGN_KEY Setting Sign key Description Key the Identity Provider uses to sign ID tokens in the case of an RSA sign algorithm. Should be the signing key in PEM or DER format. Possible values string Default value No default - + Variable ADMIN_OIDC_OIDC_RP_SCOPES_LIST Setting OpenID Connect scopes Description OpenID Connect scopes that are requested during login Possible values string, comma-delimited ('foo,bar,baz') Default value openid, email, profile - + Variable ADMIN_OIDC_OIDC_RP_SIGN_ALGO Setting OpenID sign algorithm Description Algorithm the Identity Provider uses to sign ID tokens Possible values string Default value HS256 - + Variable ADMIN_OIDC_OIDC_STATE_SIZE Setting State size Description Sets the length of the random string used for OpenID Connect state verification Possible values string representing a positive integer Default value 32 - + Variable ADMIN_OIDC_OIDC_USE_NONCE Setting Use nonce Description Controls whether the OpenID Connect client uses nonce verification Possible values True, False Default value True - + Variable ADMIN_OIDC_SUPERUSER_GROUP_NAMES Setting Superuser group names Description If any of these group names are present in the claims upon login, the user will be marked as a superuser. If none of these groups are present the user will lose superuser permissions. Possible values string, comma-delimited ('foo,bar,baz') - Default value - + Default value + Variable ADMIN_OIDC_SYNC_GROUPS Setting Create local user groups if they do not exist yet Description If checked, local user groups will be created for group names present in the groups claim, if they do not exist yet locally. Possible values True, False Default value True - + Variable ADMIN_OIDC_SYNC_GROUPS_GLOB_PATTERN Setting groups glob pattern Description The glob pattern that groups must match to be synchronized to the local database. Possible values string Default value * - + Variable ADMIN_OIDC_USERINFO_CLAIMS_SOURCE Setting user information claims extracted from Description Indicates the source from which the user information claims should be extracted. Possible values userinfo_endpoint, id_token Default value userinfo_endpoint - + Variable ADMIN_OIDC_USERNAME_CLAIM Setting username claim Description The name of the OIDC claim that is used as the username diff --git a/docs/configuration/cms_cases.rst b/docs/configuration/cms_cases.rst index e2afa09c8a..df4e13c3fe 100644 --- a/docs/configuration/cms_cases.rst +++ b/docs/configuration/cms_cases.rst @@ -37,17 +37,17 @@ Detailed Information Description Icon in the menu Possible values String Default value No default - + Variable CMS_CASES_MENU_INDICATOR Description Menu indicator for the app Possible values String Default value No default - + Variable CMS_CASES_REQUIRES_AUTH Description Whether the access to the page is restricted Possible values True, False Default value No default - + Variable CMS_CASES_REQUIRES_AUTH_BSN_OR_KVK Description Access to the page requires BSN or KVK Possible values True, False diff --git a/docs/configuration/cms_collaborate.rst b/docs/configuration/cms_collaborate.rst index 93b78dcb9c..d0c2d9a105 100644 --- a/docs/configuration/cms_collaborate.rst +++ b/docs/configuration/cms_collaborate.rst @@ -37,17 +37,17 @@ Detailed Information Description Icon in the menu Possible values String Default value No default - + Variable CMS_COLLABORATE_MENU_INDICATOR Description Menu indicator for the app Possible values String Default value No default - + Variable CMS_COLLABORATE_REQUIRES_AUTH Description Whether the access to the page is restricted Possible values True, False Default value No default - + Variable CMS_COLLABORATE_REQUIRES_AUTH_BSN_OR_KVK Description Access to the page requires BSN or KVK Possible values True, False diff --git a/docs/configuration/cms_inbox.rst b/docs/configuration/cms_inbox.rst index a8851fac27..adce40e2fc 100644 --- a/docs/configuration/cms_inbox.rst +++ b/docs/configuration/cms_inbox.rst @@ -37,17 +37,17 @@ Detailed Information Description Icon in the menu Possible values String Default value No default - + Variable CMS_INBOX_MENU_INDICATOR Description Menu indicator for the app Possible values String Default value No default - + Variable CMS_INBOX_REQUIRES_AUTH Description Whether the access to the page is restricted Possible values True, False Default value No default - + Variable CMS_INBOX_REQUIRES_AUTH_BSN_OR_KVK Description Access to the page requires BSN or KVK Possible values True, False diff --git a/docs/configuration/cms_products.rst b/docs/configuration/cms_products.rst index dbbc5c3b78..87c1bff808 100644 --- a/docs/configuration/cms_products.rst +++ b/docs/configuration/cms_products.rst @@ -37,17 +37,17 @@ Detailed Information Description Icon in the menu Possible values String Default value No default - + Variable CMS_PRODUCTS_MENU_INDICATOR Description Menu indicator for the app Possible values String Default value No default - + Variable CMS_PRODUCTS_REQUIRES_AUTH Description Whether the access to the page is restricted Possible values True, False Default value No default - + Variable CMS_PRODUCTS_REQUIRES_AUTH_BSN_OR_KVK Description Access to the page requires BSN or KVK Possible values True, False diff --git a/docs/configuration/cms_profile.rst b/docs/configuration/cms_profile.rst index 0430ad8c95..13d0312dd3 100644 --- a/docs/configuration/cms_profile.rst +++ b/docs/configuration/cms_profile.rst @@ -48,17 +48,17 @@ Detailed Information Description Icon in the menu Possible values String Default value No default - + Variable CMS_PROFILE_MENU_INDICATOR Description Menu indicator for the app Possible values String Default value No default - + Variable CMS_PROFILE_REQUIRES_AUTH Description Whether the access to the page is restricted Possible values True, False Default value No default - + Variable CMS_PROFILE_REQUIRES_AUTH_BSN_OR_KVK Description Access to the page requires BSN or KVK Possible values True, False diff --git a/docs/configuration/cms_ssd.rst b/docs/configuration/cms_ssd.rst index 1781987e92..ef11b5b2ac 100644 --- a/docs/configuration/cms_ssd.rst +++ b/docs/configuration/cms_ssd.rst @@ -37,17 +37,17 @@ Detailed Information Description Icon in the menu Possible values String Default value No default - + Variable CMS_SSD_MENU_INDICATOR Description Menu indicator for the app Possible values String Default value No default - + Variable CMS_SSD_REQUIRES_AUTH Description Whether the access to the page is restricted Possible values True, False Default value No default - + Variable CMS_SSD_REQUIRES_AUTH_BSN_OR_KVK Description Access to the page requires BSN or KVK Possible values True, False diff --git a/docs/configuration/digid_oidc.rst b/docs/configuration/digid_oidc.rst index c4cff0317e..e8dee45d99 100644 --- a/docs/configuration/digid_oidc.rst +++ b/docs/configuration/digid_oidc.rst @@ -60,103 +60,103 @@ Detailed Information Description Naam van de claim die het BSN bevat van de ingelogde gebruiker. Possible values No information available Default value bsn - + Variable DIGID_OIDC_ENABLED Setting enable Description Indicates whether OpenID Connect for authentication/authorization is enabled Possible values True, False Default value False - + Variable DIGID_OIDC_OIDC_KEYCLOAK_IDP_HINT Setting Keycloak Identity Provider hint Description Specific for Keycloak: parameter that indicates which identity provider should be used (therefore skipping the Keycloak login screen). Possible values string Default value No default - + Variable DIGID_OIDC_OIDC_NONCE_SIZE Setting Nonce size Description Sets the length of the random string used for OpenID Connect nonce verification Possible values string representing a positive integer Default value 32 - + Variable DIGID_OIDC_OIDC_OP_AUTHORIZATION_ENDPOINT Setting Authorization endpoint Description URL of your OpenID Connect provider authorization endpoint Possible values string (URL) Default value No default - + Variable DIGID_OIDC_OIDC_OP_DISCOVERY_ENDPOINT Setting Discovery endpoint Description URL of your OpenID Connect provider discovery endpoint ending with a slash (`.well-known/...` will be added automatically). If this is provided, the remaining endpoints can be omitted, as they will be derived from this endpoint. Possible values string (URL) Default value No default - + Variable DIGID_OIDC_OIDC_OP_JWKS_ENDPOINT Setting JSON Web Key Set endpoint Description URL of your OpenID Connect provider JSON Web Key Set endpoint. Required if `RS256` is used as signing algorithm. Possible values string (URL) Default value No default - + Variable DIGID_OIDC_OIDC_OP_LOGOUT_ENDPOINT Setting Logout endpoint Description URL of your OpenID Connect provider logout endpoint Possible values string (URL) Default value No default - + Variable DIGID_OIDC_OIDC_OP_TOKEN_ENDPOINT Setting Token endpoint Description URL of your OpenID Connect provider token endpoint Possible values string (URL) Default value No default - + Variable DIGID_OIDC_OIDC_OP_USER_ENDPOINT Setting User endpoint Description URL of your OpenID Connect provider userinfo endpoint Possible values string (URL) Default value No default - + Variable DIGID_OIDC_OIDC_RP_CLIENT_ID Setting OpenID Connect client ID Description OpenID Connect client ID provided by the OIDC Provider Possible values string Default value No default - + Variable DIGID_OIDC_OIDC_RP_CLIENT_SECRET Setting OpenID Connect secret Description OpenID Connect secret provided by the OIDC Provider Possible values string Default value No default - + Variable DIGID_OIDC_OIDC_RP_IDP_SIGN_KEY Setting Sign key Description Key the Identity Provider uses to sign ID tokens in the case of an RSA sign algorithm. Should be the signing key in PEM or DER format. Possible values string Default value No default - + Variable DIGID_OIDC_OIDC_RP_SCOPES_LIST Setting OpenID Connect scopes Description OpenID Connect scopes that are requested during login. These scopes are hardcoded and must be supported by the identity provider. Possible values No information available Default value openid, bsn - + Variable DIGID_OIDC_OIDC_RP_SIGN_ALGO Setting OpenID sign algorithm Description Algorithm the Identity Provider uses to sign ID tokens Possible values string Default value HS256 - + Variable DIGID_OIDC_OIDC_STATE_SIZE Setting State size Description Sets the length of the random string used for OpenID Connect state verification Possible values string representing a positive integer Default value 32 - + Variable DIGID_OIDC_OIDC_USE_NONCE Setting Use nonce Description Controls whether the OpenID Connect client uses nonce verification Possible values True, False Default value True - + Variable DIGID_OIDC_USERINFO_CLAIMS_SOURCE Setting user information claims extracted from Description Indicates the source from which the user information claims should be extracted. diff --git a/docs/configuration/digid_saml.rst b/docs/configuration/digid_saml.rst index b9313f2c4b..5912d3111b 100644 --- a/docs/configuration/digid_saml.rst +++ b/docs/configuration/digid_saml.rst @@ -70,127 +70,127 @@ Detailed Information Description 'application/soap+xml' wordt als 'legacy' beschouwd. Moderne brokers verwachten typisch 'text/xml'. Possible values application/soap+xml, text/xml Default value application/soap+xml - + Variable DIGID_SAML_ATTRIBUTE_CONSUMING_SERVICE_INDEX Setting Attribute consuming service index Description Attribute consuming service index Possible values string Default value 1 - + Variable DIGID_SAML_BASE_URL Setting Basis-URL Description De basis-URL van de applicatie, zonder slash op het eind. Possible values string (URL) Default value No default - + Variable DIGID_SAML_CERTIFICATE_LABEL Setting label Description Recognisable label for the certificate Possible values string Default value No default - + Variable DIGID_SAML_CERTIFICATE_PRIVATE_KEY Setting private key Description The content of the private key Possible values string representing the (absolute) path to a file, including file extension Default value No default - + Variable DIGID_SAML_CERTIFICATE_PUBLIC_CERTIFICATE Setting public certificate Description The content of the certificate Possible values string representing the (absolute) path to a file, including file extension Default value No default - + Variable DIGID_SAML_CERTIFICATE_TYPE Setting type Description Is this only a certificate or is there an associated private key? Possible values key_pair, cert_only Default value No default - + Variable DIGID_SAML_DIGEST_ALGORITHM Setting digest algorithm Description Digest algorithm. Note that SHA1 is deprecated, but still the default value in the SAMLv2 standard. Warning: there are known issues with single-logout functionality if using anything other than SHA1 due to some hardcoded algorithm. Possible values http://www.w3.org/2000/09/xmldsig#sha1, http://www.w3.org/2001/04/xmlenc#sha256, http://www.w3.org/2001/04/xmldsig-more#sha384, http://www.w3.org/2001/04/xmlenc#sha512 Default value http://www.w3.org/2000/09/xmldsig#sha1 - + Variable DIGID_SAML_ENTITY_ID Setting entity ID Description Service provider entity ID. Possible values string Default value No default - + Variable DIGID_SAML_KEY_PASSPHRASE Setting wachtwoordzin private-key Description Wachtwoord voor de private-key voor de authenticatie-flow. Possible values string Default value No default - + Variable DIGID_SAML_METADATA_FILE_SOURCE Setting (XML) metadata-URL Description De URL waar het XML metadata-bestand kan gedownload worden. Possible values string (URL) - Default value - + Default value + Variable DIGID_SAML_ORGANIZATION_NAME Setting organisatienaam Description Naam van de organisatie die de service aanbiedt waarvoor DigiD/eHerkenning/eIDAS-authenticatie ingericht is. Je moet ook de URL opgeven voor dit in de metadata beschikbaar is. Possible values string Default value No default - + Variable DIGID_SAML_ORGANIZATION_URL Setting organisatie-URL Description URL van de organisatie die de service aanbiedt waarvoor DigiD/eHerkenning/eIDAS-authenticatie ingericht is. Je moet ook de organisatienaam opgeven voor dit in de metadata beschikbaar is. Possible values string (URL) Default value No default - + Variable DIGID_SAML_REQUESTED_ATTRIBUTES Setting gewenste attributen Description Een lijst van strings (of objecten) met de gewenste attributen, bijvoorbeeld '["bsn"]' Possible values Mapping: {'some_key': 'Some value'} Default value {'name': 'bsn', 'required': True} - + Variable DIGID_SAML_SERVICE_DESCRIPTION Setting Service-omschrijving Description Een beschrijving van de service die je aanbiedt. Possible values string Default value No default - + Variable DIGID_SAML_SERVICE_NAME Setting servicenaam Description Naam van de service die je aanbiedt. Possible values string Default value No default - + Variable DIGID_SAML_SIGNATURE_ALGORITHM Setting signature algorithm Description Ondertekenalgoritme. Merk op dat DSA_SHA1 en RSA_SHA1 deprecated zijn, maar RSA_SHA1 is nog steeds de default-waarde ind e SAMLv2-standaard. Opgelet: er zijn bekende problemen met de single-logoutfunctionaliteit indien je een ander algoritme dan SHA1 gebruikt (door hardcoded algoritmes). Possible values http://www.w3.org/2000/09/xmldsig#dsa-sha1, http://www.w3.org/2000/09/xmldsig#rsa-sha1, http://www.w3.org/2001/04/xmldsig-more#rsa-sha256, http://www.w3.org/2001/04/xmldsig-more#rsa-sha384, http://www.w3.org/2001/04/xmldsig-more#rsa-sha512 Default value http://www.w3.org/2000/09/xmldsig#rsa-sha1 - + Variable DIGID_SAML_SLO Setting Single logout Description Single Logout is beschikbaar indien ingeschakeld Possible values True, False Default value True - + Variable DIGID_SAML_TECHNICAL_CONTACT_PERSON_EMAIL Setting technisch contactpersoon: e-mailadres Description E-mailadres van de technische contactpersoon voor deze DigiD/eHerkenning/eIDAS-installatie. Je moet ook het telefoonnummer opgeven voor dit in de metadata beschikbaar is. Possible values string Default value No default - + Variable DIGID_SAML_TECHNICAL_CONTACT_PERSON_TELEPHONE Setting technisch contactpersoon: telefoonnummer Description Telefoonnummer van de technische contactpersoon voor deze DigiD/eHerkenning/eIDAS-installatie. Je moet ook het e-mailadres opgeven voor dit in de metadata beschikbaar is. Possible values string Default value No default - + Variable DIGID_SAML_WANT_ASSERTIONS_ENCRYPTED Setting versleutel assertions Description Indien aangevinkt, dan moeten de XML-assertions versleuteld zijn. Possible values True, False Default value False - + Variable DIGID_SAML_WANT_ASSERTIONS_SIGNED Setting onderteken assertions Description Indien aangevinkt, dan moeten de XML-assertions ondertekend zijn. In het andere geval moet de hele response ondertekend zijn. diff --git a/docs/configuration/eherkenning_oidc.rst b/docs/configuration/eherkenning_oidc.rst index 0d30d9fa63..900a866ac2 100644 --- a/docs/configuration/eherkenning_oidc.rst +++ b/docs/configuration/eherkenning_oidc.rst @@ -60,103 +60,103 @@ Detailed Information Description Indicates whether OpenID Connect for authentication/authorization is enabled Possible values True, False Default value False - + Variable EHERKENNING_OIDC_LEGAL_SUBJECT_CLAIM Setting bedrijfsidenticatie-claim Description Naam van de claim die de identificatie van het ingelogde/vertegenwoordigde bedrijf bevat. Possible values No information available Default value urn:etoegang:core:LegalSubjectID - + Variable EHERKENNING_OIDC_OIDC_KEYCLOAK_IDP_HINT Setting Keycloak Identity Provider hint Description Specific for Keycloak: parameter that indicates which identity provider should be used (therefore skipping the Keycloak login screen). Possible values string Default value No default - + Variable EHERKENNING_OIDC_OIDC_NONCE_SIZE Setting Nonce size Description Sets the length of the random string used for OpenID Connect nonce verification Possible values string representing a positive integer Default value 32 - + Variable EHERKENNING_OIDC_OIDC_OP_AUTHORIZATION_ENDPOINT Setting Authorization endpoint Description URL of your OpenID Connect provider authorization endpoint Possible values string (URL) Default value No default - + Variable EHERKENNING_OIDC_OIDC_OP_DISCOVERY_ENDPOINT Setting Discovery endpoint Description URL of your OpenID Connect provider discovery endpoint ending with a slash (`.well-known/...` will be added automatically). If this is provided, the remaining endpoints can be omitted, as they will be derived from this endpoint. Possible values string (URL) Default value No default - + Variable EHERKENNING_OIDC_OIDC_OP_JWKS_ENDPOINT Setting JSON Web Key Set endpoint Description URL of your OpenID Connect provider JSON Web Key Set endpoint. Required if `RS256` is used as signing algorithm. Possible values string (URL) Default value No default - + Variable EHERKENNING_OIDC_OIDC_OP_LOGOUT_ENDPOINT Setting Logout endpoint Description URL of your OpenID Connect provider logout endpoint Possible values string (URL) Default value No default - + Variable EHERKENNING_OIDC_OIDC_OP_TOKEN_ENDPOINT Setting Token endpoint Description URL of your OpenID Connect provider token endpoint Possible values string (URL) Default value No default - + Variable EHERKENNING_OIDC_OIDC_OP_USER_ENDPOINT Setting User endpoint Description URL of your OpenID Connect provider userinfo endpoint Possible values string (URL) Default value No default - + Variable EHERKENNING_OIDC_OIDC_RP_CLIENT_ID Setting OpenID Connect client ID Description OpenID Connect client ID provided by the OIDC Provider Possible values string Default value No default - + Variable EHERKENNING_OIDC_OIDC_RP_CLIENT_SECRET Setting OpenID Connect secret Description OpenID Connect secret provided by the OIDC Provider Possible values string Default value No default - + Variable EHERKENNING_OIDC_OIDC_RP_IDP_SIGN_KEY Setting Sign key Description Key the Identity Provider uses to sign ID tokens in the case of an RSA sign algorithm. Should be the signing key in PEM or DER format. Possible values string Default value No default - + Variable EHERKENNING_OIDC_OIDC_RP_SCOPES_LIST Setting OpenID Connect scopes Description OpenID Connect scopes that are requested during login. These scopes are hardcoded and must be supported by the identity provider. Possible values string, comma-delimited ('foo,bar,baz') Default value openid, kvk - + Variable EHERKENNING_OIDC_OIDC_RP_SIGN_ALGO Setting OpenID sign algorithm Description Algorithm the Identity Provider uses to sign ID tokens Possible values string Default value HS256 - + Variable EHERKENNING_OIDC_OIDC_STATE_SIZE Setting State size Description Sets the length of the random string used for OpenID Connect state verification Possible values string representing a positive integer Default value 32 - + Variable EHERKENNING_OIDC_OIDC_USE_NONCE Setting Use nonce Description Controls whether the OpenID Connect client uses nonce verification Possible values True, False Default value True - + Variable EHERKENNING_OIDC_USERINFO_CLAIMS_SOURCE Setting user information claims extracted from Description Indicates the source from which the user information claims should be extracted. diff --git a/docs/configuration/eherkenning_saml.rst b/docs/configuration/eherkenning_saml.rst index 80ed4d896f..8ede62de4a 100644 --- a/docs/configuration/eherkenning_saml.rst +++ b/docs/configuration/eherkenning_saml.rst @@ -89,199 +89,199 @@ Detailed Information Description 'application/soap+xml' wordt als 'legacy' beschouwd. Moderne brokers verwachten typisch 'text/xml'. Possible values application/soap+xml, text/xml Default value application/soap+xml - + Variable EHERKENNING_SAML_BASE_URL Setting Basis-URL Description De basis-URL van de applicatie, zonder slash op het eind. Possible values string (URL) Default value No default - + Variable EHERKENNING_SAML_CERTIFICATE_LABEL Setting label Description Recognisable label for the certificate Possible values string Default value No default - + Variable EHERKENNING_SAML_CERTIFICATE_PRIVATE_KEY Setting private key Description The content of the private key Possible values string representing the (absolute) path to a file, including file extension Default value No default - + Variable EHERKENNING_SAML_CERTIFICATE_PUBLIC_CERTIFICATE Setting public certificate Description The content of the certificate Possible values string representing the (absolute) path to a file, including file extension Default value No default - + Variable EHERKENNING_SAML_CERTIFICATE_TYPE Setting type Description Is this only a certificate or is there an associated private key? Possible values key_pair, cert_only Default value No default - + Variable EHERKENNING_SAML_DIGEST_ALGORITHM Setting digest algorithm Description Digest algorithm. Note that SHA1 is deprecated, but still the default value in the SAMLv2 standard. Warning: there are known issues with single-logout functionality if using anything other than SHA1 due to some hardcoded algorithm. Possible values http://www.w3.org/2000/09/xmldsig#sha1, http://www.w3.org/2001/04/xmlenc#sha256, http://www.w3.org/2001/04/xmldsig-more#sha384, http://www.w3.org/2001/04/xmlenc#sha512 Default value http://www.w3.org/2000/09/xmldsig#sha1 - + Variable EHERKENNING_SAML_EH_ATTRIBUTE_CONSUMING_SERVICE_INDEX Setting eHerkenning attribute consuming service index Description Attribute consuming service index voor de eHerkenningservice Possible values string Default value 9052 - + Variable EHERKENNING_SAML_EH_LOA Setting eHerkenning LoA Description Betrouwbaarheidsniveau (LoA) voor de eHerkenningservice. Possible values urn:etoegang:core:assurance-class:loa1, urn:etoegang:core:assurance-class:loa2, urn:etoegang:core:assurance-class:loa2plus, urn:etoegang:core:assurance-class:loa3, urn:etoegang:core:assurance-class:loa4 Default value urn:etoegang:core:assurance-class:loa3 - + Variable EHERKENNING_SAML_EH_REQUESTED_ATTRIBUTES Setting gewenste attributen Description Een lijst van extra gewenste attributen. Eén enkel gewenst attribuut kan een string (de naam van het attribuut) zijn of een object met de sleutels 'name' en 'required', waarbij 'name' een string is en 'required' een boolean. Possible values Mapping: {'some_key': 'Some value'} Default value {'name': 'urn:etoegang:1.11:attribute-represented:CompanyName', 'required': True, 'purpose_statements': {'en': 'For testing purposes.', 'nl': 'Voor testdoeleinden.'}} - + Variable EHERKENNING_SAML_EH_SERVICE_INSTANCE_UUID Setting UUID eHerkenningservice instance Description UUID van de eHerkenningservice-instantie. Eenmaal dit in catalogi opgenomen is kan de waarde enkel via een handmatig proces gewijzigd worden. Possible values UUID string (e.g. f6b45142-0c60-4ec7-b43d-28ceacdc0b34) Default value random UUID string - + Variable EHERKENNING_SAML_EH_SERVICE_UUID Setting UUID eHerkenningservice Description UUID van de eHerkenningservice. Eenmaal dit in catalogi opgenomen is kan de waarde enkel via een handmatig proces gewijzigd worden. Possible values UUID string (e.g. f6b45142-0c60-4ec7-b43d-28ceacdc0b34) Default value random UUID string - + Variable EHERKENNING_SAML_EIDAS_ATTRIBUTE_CONSUMING_SERVICE_INDEX Setting eIDAS attribute consuming service index Description Attribute consuming service index voor de eIDAS-service Possible values string Default value 9053 - + Variable EHERKENNING_SAML_EIDAS_LOA Setting eIDAS LoA Description Betrouwbaarheidsniveau (LoA) voor de eIDAS-service. Possible values urn:etoegang:core:assurance-class:loa1, urn:etoegang:core:assurance-class:loa2, urn:etoegang:core:assurance-class:loa2plus, urn:etoegang:core:assurance-class:loa3, urn:etoegang:core:assurance-class:loa4 Default value urn:etoegang:core:assurance-class:loa3 - + Variable EHERKENNING_SAML_EIDAS_REQUESTED_ATTRIBUTES Setting gewenste attributen Description Een lijst van extra gewenste attributen. Eén enkel gewenst attribuut kan een string (de naam van het attribuut) zijn of een object met de sleutels 'name' en 'required', waarbij 'name' een string is en 'required' een boolean. Possible values Mapping: {'some_key': 'Some value'} Default value {'name': 'urn:etoegang:1.9:attribute:FirstName', 'required': True, 'purpose_statements': {'en': 'For testing purposes.', 'nl': 'Voor testdoeleinden.'}}, {'name': 'urn:etoegang:1.9:attribute:FamilyName', 'required': True, 'purpose_statements': {'en': 'For testing purposes.', 'nl': 'Voor testdoeleinden.'}}, {'name': 'urn:etoegang:1.9:attribute:DateOfBirth', 'required': True, 'purpose_statements': {'en': 'For testing purposes.', 'nl': 'Voor testdoeleinden.'}}, {'name': 'urn:etoegang:1.11:attribute-represented:CompanyName', 'required': True, 'purpose_statements': {'en': 'For testing purposes.', 'nl': 'Voor testdoeleinden.'}} - + Variable EHERKENNING_SAML_EIDAS_SERVICE_INSTANCE_UUID Setting UUID eIDAS-service instance Description UUID van de eIDAS-service-instantie. Eenmaal dit in catalogi opgenomen is kan de waarde enkel via een handmatig proces gewijzigd worden. Possible values UUID string (e.g. f6b45142-0c60-4ec7-b43d-28ceacdc0b34) Default value random UUID string - + Variable EHERKENNING_SAML_EIDAS_SERVICE_UUID Setting UUID eIDAS-service Description UUID van de eIDAS-service. Eenmaal dit in catalogi opgenomen is kan de waarde enkel via een handmatig proces gewijzigd worden. Possible values UUID string (e.g. f6b45142-0c60-4ec7-b43d-28ceacdc0b34) Default value random UUID string - + Variable EHERKENNING_SAML_ENTITY_ID Setting entity ID Description Service provider entity ID. Possible values string Default value No default - + Variable EHERKENNING_SAML_KEY_PASSPHRASE Setting wachtwoordzin private-key Description Wachtwoord voor de private-key voor de authenticatie-flow. Possible values string Default value No default - + Variable EHERKENNING_SAML_MAKELAAR_ID Setting makelaar-ID Description OIN van de makelaar waarmee eHerkenning/eIDAS ingericht is. Possible values string Default value No default - + Variable EHERKENNING_SAML_METADATA_FILE_SOURCE Setting (XML) metadata-URL Description De URL waar het XML metadata-bestand kan gedownload worden. Possible values string (URL) - Default value - + Default value + Variable EHERKENNING_SAML_NO_EIDAS Setting zonder eIDAS Description Indien aangevinkt, dan zal de dienstcatalogus enkel de eHerkenningservice bevatten. Possible values True, False Default value False - + Variable EHERKENNING_SAML_OIN Setting OIN Description De OIN van het bedrijf dat de service aanbiedt. Possible values string Default value No default - + Variable EHERKENNING_SAML_ORGANIZATION_NAME Setting organisatienaam Description Naam van de organisatie die de service aanbiedt waarvoor DigiD/eHerkenning/eIDAS-authenticatie ingericht is. Je moet ook de URL opgeven voor dit in de metadata beschikbaar is. Possible values string Default value No default - + Variable EHERKENNING_SAML_ORGANIZATION_URL Setting organisatie-URL Description URL van de organisatie die de service aanbiedt waarvoor DigiD/eHerkenning/eIDAS-authenticatie ingericht is. Je moet ook de organisatienaam opgeven voor dit in de metadata beschikbaar is. Possible values string (URL) Default value No default - + Variable EHERKENNING_SAML_PRIVACY_POLICY Setting privacybeleid Description De URL waar het privacybeleid van de service-aanbieder (organisatie) beschreven staat. Possible values string (URL) Default value No default - + Variable EHERKENNING_SAML_SERVICE_DESCRIPTION Setting Service-omschrijving Description Een beschrijving van de service die je aanbiedt. Possible values string Default value No default - + Variable EHERKENNING_SAML_SERVICE_LANGUAGE Setting servicetaal Description eHerkenning/eIDAS-metadata zal deze taal bevatten Possible values string Default value nl - + Variable EHERKENNING_SAML_SERVICE_NAME Setting servicenaam Description Naam van de service die je aanbiedt. Possible values string Default value No default - + Variable EHERKENNING_SAML_SIGNATURE_ALGORITHM Setting signature algorithm Description Ondertekenalgoritme. Merk op dat DSA_SHA1 en RSA_SHA1 deprecated zijn, maar RSA_SHA1 is nog steeds de default-waarde ind e SAMLv2-standaard. Opgelet: er zijn bekende problemen met de single-logoutfunctionaliteit indien je een ander algoritme dan SHA1 gebruikt (door hardcoded algoritmes). Possible values http://www.w3.org/2000/09/xmldsig#dsa-sha1, http://www.w3.org/2000/09/xmldsig#rsa-sha1, http://www.w3.org/2001/04/xmldsig-more#rsa-sha256, http://www.w3.org/2001/04/xmldsig-more#rsa-sha384, http://www.w3.org/2001/04/xmldsig-more#rsa-sha512 Default value http://www.w3.org/2000/09/xmldsig#rsa-sha1 - + Variable EHERKENNING_SAML_TECHNICAL_CONTACT_PERSON_EMAIL Setting technisch contactpersoon: e-mailadres Description E-mailadres van de technische contactpersoon voor deze DigiD/eHerkenning/eIDAS-installatie. Je moet ook het telefoonnummer opgeven voor dit in de metadata beschikbaar is. Possible values string Default value No default - + Variable EHERKENNING_SAML_TECHNICAL_CONTACT_PERSON_TELEPHONE Setting technisch contactpersoon: telefoonnummer Description Telefoonnummer van de technische contactpersoon voor deze DigiD/eHerkenning/eIDAS-installatie. Je moet ook het e-mailadres opgeven voor dit in de metadata beschikbaar is. Possible values string Default value No default - + Variable EHERKENNING_SAML_WANT_ASSERTIONS_ENCRYPTED Setting versleutel assertions Description Indien aangevinkt, dan moeten de XML-assertions versleuteld zijn. Possible values True, False Default value False - + Variable EHERKENNING_SAML_WANT_ASSERTIONS_SIGNED Setting onderteken assertions Description Indien aangevinkt, dan moeten de XML-assertions ondertekend zijn. In het andere geval moet de hele response ondertekend zijn. diff --git a/docs/configuration/kic.rst b/docs/configuration/kic.rst index b823b48064..fb112c8636 100644 --- a/docs/configuration/kic.rst +++ b/docs/configuration/kic.rst @@ -63,68 +63,68 @@ Detailed Information Description The client ID of the klant contactmomenten service Possible values string (URL) Default value No default - + Variable KIC_CONTACTMOMENTEN_SERVICE_API_ROOT Description The API root of the klant contactmomenten service Possible values string (URL) Default value No default - + Variable KIC_CONTACTMOMENTEN_SERVICE_SECRET Description The secret of the klant contactmomenten service Possible values string (URL) Default value No default - + Variable KIC_KLANTEN_SERVICE_API_CLIENT_ID Description The API root of the klanten service Possible values string (URL) Default value No default - + Variable KIC_KLANTEN_SERVICE_API_ROOT Description The API root of the klanten service Possible values string (URL) Default value No default - + Variable KIC_KLANTEN_SERVICE_SECRET Description The secret of the klanten service Possible values string (URL) Default value No default - + Variable KIC_REGISTER_BRONORGANISATIE_RSIN Setting Organisatie RSIN Description No description Possible values string - Default value - + Default value + Variable KIC_REGISTER_CHANNEL Setting Contactmoment kanaal Description De kanaal waarop nieuwe contactmomenten worden aangemaakt Possible values string Default value contactformulier - + Variable KIC_REGISTER_CONTACT_MOMENT Setting Registreer in Contactmomenten API Description No description Possible values True, False Default value False - + Variable KIC_REGISTER_EMAIL Setting Registreer op email adres Description No description Possible values string representing an Email address (foo@bar.com) Default value No default - + Variable KIC_REGISTER_EMPLOYEE_ID Setting Medewerker identificatie Description Gebruikersnaam van actieve medewerker uit e-Suite Possible values string - Default value - + Default value + Variable KIC_REGISTER_TYPE Setting Contactmoment type Description Naam van 'contacttype' uit e-Suite Possible values string Default value Melding - + Variable KIC_USE_RSIN_FOR_INNNNPID_QUERY_PARAMETER Setting Haal bronnen op uit de Klanten- en Contactmomenten-API's voor gebruikers die zijn geauthenticeerd met eHerkenning via RSIN Description Indien ingeschakeld, worden bronnen uit de Klanten- en Contactmomenten-API's voor eHerkenning-gebruikers opgehaald via RSIN (Open Klant). Indien niet ingeschakeld, worden deze bronnen via het KVK-nummer. diff --git a/docs/configuration/siteconfig.rst b/docs/configuration/siteconfig.rst index 7645579488..424d57c165 100644 --- a/docs/configuration/siteconfig.rst +++ b/docs/configuration/siteconfig.rst @@ -114,427 +114,427 @@ Detailed Information Description Accentkleur van de gemeentesite/huisstijl Possible values No information available Default value #FF0000 - + Variable SITE_ACCENT_FONT_COLOR Setting Accent tekstkleur Description De tekstkleur voor wanneer de achtergrond de accentkleur is Possible values #FFFFFF, #4B4B4B Default value #4B4B4B - + Variable SITE_ACCOUNT_HELP_TEXT Setting Helptekst mijn profiel Description De helptekst in de popup van de profielpagina's Possible values text (string) Default value Op dit scherm ziet u uw persoonlijke profielgegevens en gerelateerde gegevens. - + Variable SITE_ALLOW_MESSAGES_FILE_SHARING Setting Sta het delen van bestanden via Mijn Berichten toe Description Of het delen van bestanden via Mijn Berichten mogelijk is of niet. Indien uitgeschakeld dan kunnen alleen tekstberichten worden verzonden Possible values True, False Default value True - + Variable SITE_CONTACTMOMENT_CONTACT_FORM_ENABLED Setting Contactmoment contact formulier Description Display contact form on the questions list page so that users can create new questions Possible values True, False Default value True - + Variable SITE_CONTACT_PAGE Setting URL Description URL van de contactpagina van de organisatie Possible values string (URL) Default value No default - + Variable SITE_CONTACT_PHONENUMBER Setting Telefoonnummer Description Telefoonnummer van de organisatie Possible values string Default value No default - + Variable SITE_COOKIE_INFO_TEXT Setting Tekst cookiebanner informatie Description De tekstinhoud van de cookiebanner. Wanneer deze wordt ingevuld dan wordt de cookiebanner zichtbaar. Possible values string Default value Wij gebruiken cookies om onze website en dienstverlening te verbeteren. - + Variable SITE_COOKIE_LINK_TEXT Setting Tekst cookiebanner link Description De tekst die wordt gebruikt als link naar de privacypagina. Possible values string Default value Lees meer over ons cookiebeleid. - + Variable SITE_COOKIE_LINK_URL Setting URL van de privacypagina Description De link naar de pagina met het privacybeleid. Possible values string Default value /pages/privacyverklaring/ - + Variable SITE_DISPLAY_SOCIAL Setting Toon sociale media knoppen bij elk product Description Maak het delen mogelijk van producten op sociale media (Facebook, LinkedIn...) Possible values True, False Default value True - + Variable SITE_EHERKENNING_ENABLED Setting eHerkenning authentication ingeschakeld Description Of gebruikers in kunnen loggen met eHerkenning of niet. Standaard wordt de SAML integratie hiervoor gebruikt (van toepassing bij een rechtstreekse aansluiting op een eHerkenning makelaar). Voor het gebruiken van een OpenID Connect (OIDC) koppeling, navigeer naar `OpenID Connect configuratie voor eHerkenning` om deze te activeren. Possible values True, False Default value False - + Variable SITE_EMAIL_VERIFICATION_REQUIRED Setting E-mailverificatie vereist Description Of gebruikers verplicht zijn om na het inloggen hun e-mailadres te verifieren Possible values True, False Default value False - + Variable SITE_FOOTER_LOGO_TITLE Setting Footer logo title Description The title - help text of the footer logo. Possible values string - Default value - + Default value + Variable SITE_FOOTER_LOGO_URL Setting Footer logo link Description The external link for the footer logo. Possible values string (URL) - Default value - + Default value + Variable SITE_GA_CODE Setting Google Analytics code Description Normaalgesproken is dit een code van het formaat 'G-XXXX'. Door dit in te stellen wordt Google Analytics gebruikt. Possible values string Default value No default - + Variable SITE_GTM_CODE Setting Google Tag Manager code Description Normaalgesproken is dit een code van het formaat 'GTM-XXXX'. Door dit in te stellen wordt Google Tag Manager gebruikt. Possible values string Default value No default - + Variable SITE_HIDE_CATEGORIES_FROM_ANONYMOUS_USERS Setting Blokkeer toegang tot Onderwerpen voor niet-ingelogde gebruikers Description Indien geselecteerd: alleen ingelogde gebruikers hebben toegang tot Onderwerpen. Possible values True, False Default value False - + Variable SITE_HIDE_SEARCH_FROM_ANONYMOUS_USERS Setting Verberg zoekbalk voor anonieme gebruiker Description Indien geselecteerd: alleen ingelogde gebruikers zien de zoekfunctie. Possible values True, False Default value False - + Variable SITE_HOME_HELP_TEXT Setting Helptekst homepage Description Helptekst in de popup op de voorpagina Possible values text (string) Default value Welkom! Op dit scherm vindt u een overzicht van de verschillende onderwerpen en producten & diensten. - + Variable SITE_HOME_MAP_INTRO Setting Introductietekst kaart Description Introductietekst van de kaart op de homepage Possible values text (string) Default value No default - + Variable SITE_HOME_MAP_TITLE Setting Koptekst van de kaart op de homepage Description Koptekst van de kaart op de homepage Possible values string Default value In de buurt - + Variable SITE_HOME_PRODUCT_FINDER_INTRO Setting Introductietekst productzoeker homepage Description Introductietekst van de productzoeker op de homepage. Possible values text (string) Default value Met een paar simpele vragen ziet u welke producten passen bij uw situatie - + Variable SITE_HOME_PRODUCT_FINDER_TITLE Setting Productzoeker titel Description Titel van de productzoeker op de homepage. Possible values string Default value Productzoeker - + Variable SITE_HOME_QUESTIONNAIRE_INTRO Setting Introductietekst vragenlijst homepage Description Vragenlijst introductietekst op de homepage. Possible values text (string) Default value Test met een paar simpele vragen of u recht heeft op een product - + Variable SITE_HOME_QUESTIONNAIRE_TITLE Setting Titel vragenlijst homepage Description Vragenlijst titel op de homepage. Possible values string Default value Waar bent u naar op zoek? - + Variable SITE_HOME_THEME_INTRO Setting Onderwerpen introductietekst op de homepage Description Introductietekst 'Onderwerpen' op de homepage Possible values text (string) Default value No default - + Variable SITE_HOME_THEME_TITLE - Setting Titel 'Onderwerpen' op de homepage + Setting Titel 'Onderwerpen' op de homepage Description Koptekst van de Onderwerpen op de homepage Possible values string Default value Onderwerpen - + Variable SITE_HOME_WELCOME_INTRO Setting Introductietekst homepage Description Introductietekst op de homepage Possible values text (string) Default value No default - + Variable SITE_HOME_WELCOME_TITLE Setting Koptekst homepage Description Koptekst op de homepage Possible values string Default value Welkom - + Variable SITE_KCM_SURVEY_LINK_TEXT Setting Feedbackknop label Description De label van de knop wat wordt gebruikt om gebruikersfeedback te verzamelen Possible values string Default value No default - + Variable SITE_KCM_SURVEY_LINK_URL Setting Feedbackknop URL Description De externe link achter de feedbackknop feedback. Possible values string (URL) Default value No default - + Variable SITE_LOGIN_2FA_SMS Setting Log in met 2FA-met-SMS Description Bepaalt of gebruikers die met gebruikersnaam+wachtwoord inloggen verplicht een SMS verificatiecode dienen in te vullen Possible values True, False Default value False - + Variable SITE_LOGIN_ALLOW_REGISTRATION Setting Sta lokale registratie toe Description Wanneer deze optie uit staat is het enkel toegestaan om met DigiD in te loggen. Zet deze instelling aan om ook het inloggen met gebruikersnaam/wachtwoord en het aanmelden zonder DigiD toe te staan. Possible values True, False Default value False - + Variable SITE_LOGIN_SHOW Setting Toon inlogknop rechts bovenin Description Wanneer deze optie uit staat dan kan nog wel worden ingelogd via /accounts/login/ , echter het inloggen is verborgen Possible values True, False Default value True - + Variable SITE_LOGIN_TEXT Setting Login tekst Description Deze tekst wordt getoond op de login pagina. Possible values text (string) Default value No default - + Variable SITE_MATOMO_SITE_ID Setting Matamo site ID Description De 'idsite' van de website in Matamo die getrackt dient te worden. Possible values string representing a positive integer Default value No default - + Variable SITE_MATOMO_URL Setting Matamo server URL Description De domeinnaam / URL van de Matamo server, bijvoorbeeld 'matamo.example.com'. Possible values string Default value No default - + Variable SITE_NAME Setting Naam Description Naam van de gemeente Possible values string Default value No default - + Variable SITE_NOTIFICATIONS_ACTIONS_ENABLED Setting Gebruikersnotificaties voor verlopende acties Description Notificaties voor verlopende acties (indien ingesteld, kunnen individuele gebruikers zich nog afmelden door de notificaties in het kader van aflopende samenwerkingen uit te schakelen) Possible values True, False Default value True - + Variable SITE_NOTIFICATIONS_CASES_ENABLED Setting Gebruikersnotificaties voor aanvragen Description Activeer notificaties voor aanvragen (indien ingeschakeld kunnen gebruikers zich nog steeds zelf afmelden voor meldingen over aanvraag-updates, maar niet voor meldingen betreffende verplichte acties) Possible values True, False Default value True - + Variable SITE_NOTIFICATIONS_MESSAGES_ENABLED Setting Gebruikersnotificaties voor berichten Description Activeer notificaties voor nieuwe berichten (indien actief kunnen gebruikers ervoor kiezen zichzelf alsnog af te melden) Possible values True, False Default value True - + Variable SITE_NOTIFICATIONS_PLANS_ENABLED Setting Gebruikersnotificaties voor verlopende samenwerkingen Description Notificaties voor verlopende samenwerkingen (indien ingesteld, kunnen individuele gebruikers ervoor kiezen zichzelf alsnog af te melden) Possible values True, False Default value True - + Variable SITE_OPENID_CONNECT_LOGIN_TEXT Setting OpenID Connect login tekst Description De tekst die getoond wordt wanneer OpenID Connect (OIDC/Azure AD) als loginmethode is ingesteld Possible values string Default value Login with Azure AD - + Variable SITE_OPENID_DISPLAY Setting Toon optie om in te loggen via OpenID Connect Description Alleen geselecteerde groepen zullen de optie zien om met OpenID Connect in te loggen. Possible values admin, regular Default value admin - + Variable SITE_PLANS_EDIT_MESSAGE Setting Standaardtekst 'doel wijzigen' Description Het bericht wanneer een gebruiker een doel wijzigt. Possible values string Default value Hier kunt u uw doel aanpassen - + Variable SITE_PLANS_INTRO Setting Introductietekst Samenwerken Description Subtitel voor de planpagina. Possible values text (string) - Default value Hier werkt u aan uw doelen. Dit doet u samen met uw contactpersoon bij de gemeente. - + Default value Hier werkt u aan uw doelen. Dit doet u samen met uw contactpersoon bij de gemeente. + Variable SITE_PLANS_NO_PLANS_MESSAGE Setting Standaardtekst geen samenwerkingen Description Het bericht als een gebruiker nog geen plannen heeft. Possible values string Default value U heeft nog geen plan gemaakt. - + Variable SITE_PLAN_HELP_TEXT Setting Helptekst samenwerken Description De helptekst in de popup van de samenwerken-pagina's Possible values text (string) Default value Met het onderdeel Samenwerken kunt u samen met uw contactpersonen of begeleider van de gemeente aan de slag om met een samenwerkingsplan uw persoonlijke situatie te verbeteren. Door samen aan uw doelen te werken en acties te omschrijven kunnen we elkaar helpen. - + Variable SITE_PRIMARY_COLOR Setting Primaire kleur Description Hoofdkleur van de gemeentesite/huisstijl Possible values No information available Default value #FFFFFF - + Variable SITE_PRIMARY_FONT_COLOR Setting Primaire tekstkleur Description De tekstkleur voor wanneer de achtergrond de hoofdkleur is Possible values #FFFFFF, #4B4B4B Default value #FFFFFF - + Variable SITE_PRODUCT_HELP_TEXT Setting Helptekst producten Description Helptekst in de popup van de productenpagina's Possible values text (string) Default value Op dit scherm kunt u de details vinden over het gekozen product of dienst. Afhankelijk van het product kunt u deze direct aanvragen of meer informatie opvragen. - + Variable SITE_QUESTIONNAIRE_HELP_TEXT Setting Helptekst vragenlijst/zelftest Description De helptekst in de popup op de vragenlijst/zelftestpagina's Possible values text (string) Default value Het onderdeel Zelftest stelt u in staat om met het beantwoorden van enkele vragen een advies te krijgen van de gemeente, met concrete vervolgstappen en producten en diensten. U kunt tevens uw antwoorden en het advies bewaren om met een begeleider van de gemeente te bespreken. - + Variable SITE_RECIPIENTS_EMAIL_DIGEST Setting ontvangers e-mailsamenvatting Description De e-mailadressen van beheerders die een dagelijkse samenvatting dienen te krijgen van punten van orde. Possible values No information available - Default value - + Default value + Variable SITE_REDIRECT_TO Setting Stuur niet-ingelogde gebruiker door naar Description Geef een URL of pad op waar de niet-ingelogde gebruiker naar toe doorgestuurd moet worden vanuit de niet-ingelogde homepage. Pad voorbeeld: '/accounts/login', URL voorbeeld: 'https://gemeente.groningen.nl' Possible values string Default value No default - + Variable SITE_REGISTRATION_TEXT Setting Registratie tekst Description Deze tekst wordt getoond op de registratie pagina. Possible values text (string) Default value No default - + Variable SITE_SEARCH_FILTER_CATEGORIES Setting Onderwerpenfilter toevoegen aan zoekresultaten Description Of er categorie-selectievakjes moeten worden weergegeven om het zoekresultaat te filteren. Possible values True, False Default value True - + Variable SITE_SEARCH_FILTER_ORGANIZATIONS Setting Organisaties-filter toevoegen aan zoekresultaten Description Of er organisatie-selectievakjes moeten worden weergegeven om het zoekresultaat te filteren. Possible values True, False Default value True - + Variable SITE_SEARCH_FILTER_TAGS Setting Tagfilter toevoegen aan zoekresultaten Description Of er tag-selectievakjes moeten worden weergegeven om het zoekresultaat te filteren. Possible values True, False Default value True - + Variable SITE_SEARCH_HELP_TEXT Setting Helptekst zoeken Description De helptekst in de popup op de zoekpagina's Possible values text (string) Default value Op dit scherm kunt u zoeken naar de producten en diensten. - + Variable SITE_SECONDARY_COLOR Setting Secundaire kleur Description Secundaire kleur van de gemeentesite/huisstijl Possible values No information available Default value #0000FF - + Variable SITE_SECONDARY_FONT_COLOR Setting Secundaire tekstkleur Description De tekstkleur voor wanneer de achtergrond de secundaire kleur is Possible values #FFFFFF, #4B4B4B Default value #FFFFFF - + Variable SITE_SELECT_QUESTIONNAIRE_INTRO Setting Introductietekst vragenlijst widget Description Vragenlijst introductietekst op de onderwerpen en profielpagina's. Possible values text (string) Default value Kies hieronder één van de volgende vragenlijsten om de zelftest te starten. - + Variable SITE_SELECT_QUESTIONNAIRE_TITLE Setting Titel vragenlijst widget Description Vragenlijst keuzetitel op de onderwerpen en profielpagina's. Possible values string Default value Keuze zelftest? - + Variable SITE_SITEIMPROVE_ID Setting SiteImprove ID Description SiteImprove ID - Dit nummer kan gevonden worden in de SiteImprove snippet, dit is onderdeel van een URL zoals '//siteimproveanalytics.com/js/siteanalyze_xxxxx.js' waarbij het xxxxx-deel de SiteImprove ID is die hier ingevuld moet worden. Possible values string - Default value - + Default value + Variable SITE_THEME_HELP_TEXT Setting Onderwerpen help Description Helptekst in de popup op de onderwerpenpagina Possible values text (string) Default value Op dit scherm vindt u de verschillende onderwerpen waarvoor wij producten en diensten aanbieden. - + Variable SITE_THEME_INTRO Setting Onderwerpen introductie Description Introductietekst op de onderwerpenpagina Possible values text (string) Default value No default - + Variable SITE_THEME_TITLE Setting Onderwerpen titel Description Titel op de Onderwerpenpagina Possible values string Default value Onderwerpen - + Variable SITE_WARNING_BANNER_BACKGROUND_COLOR Setting Waarschuwingsbanner achtergrond Description Waarschuwingsbanner achtergrondkleur Possible values No information available Default value #FFDBAD - + Variable SITE_WARNING_BANNER_ENABLED Setting Toon waarschuwingsbanner Description Of de waarschuwingsbanner zichtbaar moet zijn of niet. Possible values True, False Default value False - + Variable SITE_WARNING_BANNER_FONT_COLOR Setting Waarschuwingsbanner tekst Description De tekstkleur voor de waarschuwingsbanner Possible values No information available Default value #000000 - + Variable SITE_WARNING_BANNER_TEXT Setting Tekstinhoud waarschuwingsbanner Description De tekst die zichtbaar is in de waarschuwingsbanner diff --git a/docs/configuration/zgw.rst b/docs/configuration/zgw.rst index 203c69f44f..7bc1874b0c 100644 --- a/docs/configuration/zgw.rst +++ b/docs/configuration/zgw.rst @@ -78,116 +78,116 @@ Detailed Information Description Aantal dagen voor gebruiker om actie te ondernemen. Possible values string representing an integer Default value 15 - + Variable ZGW_ALLOWED_FILE_EXTENSIONS Setting allowed file extensions Description Een lijst van toegestande bestandsextensies, alleen documentuploads met een van deze extensies worden toegelaten. Possible values No information available Default value bmp, doc, docx, gif, jpeg, jpg, msg, pdf, png, ppt, pptx, rtf, tiff, txt, vsd, xls, xlsx - + Variable ZGW_CATALOGI_SERVICE_API_ROOT Description The API root of the catalogi service Possible values string (URL) Default value No default - + Variable ZGW_CATALOGI_SERVICE_CLIENT_ID Description The API root of the catalogi service Possible values string (URL) Default value No default - + Variable ZGW_CATALOGI_SERVICE_SECRET Description The secret of the catalogi service Possible values string (URL) Default value No default - + Variable ZGW_DOCUMENTEN_SERVICE_CLIENT_ID Description The API root of the documenten service Possible values string (URL) Default value No default - + Variable ZGW_DOCUMENTEN_SERVICE_SECRET Description The secret of the documenten service Possible values string (URL) Default value No default - + Variable ZGW_DOCUMENT_MAX_CONFIDENTIALITY Setting Documenten vertrouwelijkheid Description Selecteer de maximale vertrouwelijkheid van de getoonde documenten van zaken Possible values openbaar, beperkt_openbaar, intern, zaakvertrouwelijk, vertrouwelijk, confidentieel, geheim, zeer_geheim Default value openbaar - + Variable ZGW_DOCUMENT_SERVICE_API_ROOT Description The API root of the documenten service Possible values string (URL) Default value No default - + Variable ZGW_ENABLE_CATEGORIES_FILTERING_WITH_ZAKEN Setting Inschakelen gepersonaliseerde Onderwerpen op basis van zaken Description Indien ingeschakeld dan worden (indien ingelogd met DigiD/eHerkenning) de getoonde onderwerpen op de Homepage bepaald op basis van de zaken van de gebruiker Possible values True, False Default value False - + Variable ZGW_FETCH_EHERKENNING_ZAKEN_WITH_RSIN Setting Maak gebruik van het RSIN voor ophalen eHerkenning zaken Description Indien ingeschakeld dan wordt het RSIN van eHerkenning gebruikers gebruikt om de zaken op te halen. Indien uitgeschakeld dan wordt het KVK nummer gebruikt om de zaken op te halen. Open Zaak hanteert conform de ZGW API specificatie de RSIN, de eSuite maakt gebruik van het KVK nummer. Possible values True, False Default value False - + Variable ZGW_FORMULIEREN_SERVICE_CLIENT_ID Description The API root of the formulieren service Possible values string (URL) Default value No default - + Variable ZGW_FORMULIEREN_SERVICE_SECRET Description The secret of the formulieren service Possible values string (URL) Default value No default - + Variable ZGW_FROMULIEREN_SERVICE_API_ROOT Description The API root of the formulieren service Possible values string (URL) Default value No default - + Variable ZGW_MAX_UPLOAD_SIZE Setting Maximale upload grootte (in MB) Description Documentuploads mogen maximaal dit aantal MB groot zijn, anders worden ze geweigerd. Possible values string representing a positive integer Default value 50 - + Variable ZGW_REFORMAT_ESUITE_ZAAK_IDENTIFICATIE Setting Converteer eSuite zaaknummers Description Schakel dit in om de zaaknummers van het interne eSuite format (ex: '0014ESUITE66392022') om te zetten naar een toegankelijkere notatie ('6639-2022'). Possible values True, False Default value False - + Variable ZGW_SKIP_NOTIFICATION_STATUSTYPE_INFORMEREN Setting Maak gebruik van StatusType.informeren workaround (eSuite) Description Schakel dit in wanneer StatusType.informeren niet wordt ondersteund door de ZGW API waar deze omgeving aan is gekoppeld (zoals de eSuite ZGW API)Hierdoor is het verplicht om per zaaktype aan te geven wanneer een inwoner hier een notificatie van dient te krijgen. Possible values True, False Default value False - + Variable ZGW_TITLE_TEXT Setting Titel tekst Description De titel/introductietekst getoond op de lijstweergave van 'Mijn aanvragen'. Possible values text (string) Default value Hier vindt u een overzicht van al uw lopende en afgeronde aanvragen. - + Variable ZGW_ZAAK_MAX_CONFIDENTIALITY Setting Zaak vertrouwelijkheid Description Selecteer de maximale vertrouwelijkheid van de getoonde zaken Possible values openbaar, beperkt_openbaar, intern, zaakvertrouwelijk, vertrouwelijk, confidentieel, geheim, zeer_geheim Default value openbaar - + Variable ZGW_ZAAK_SERVICE_API_ROOT Description The API root of the zaak service Possible values string (URL) Default value No default - + Variable ZGW_ZAAK_SERVICE_CLIENT_ID Description The API root of the zaak service Possible values string (URL) Default value No default - + Variable ZGW_ZAAK_SERVICE_SECRET Description The secret of the zaak service Possible values string (URL) diff --git a/docs/openssl.conf b/docs/openssl.conf index 9a6b314f47..e9a4029ad2 100644 --- a/docs/openssl.conf +++ b/docs/openssl.conf @@ -8,4 +8,3 @@ system_default = system_default_sect [system_default_sect] Options = UnsafeLegacyRenegotiation - diff --git a/docs/testing.rst b/docs/testing.rst index 035021495e..3461107e8b 100644 --- a/docs/testing.rst +++ b/docs/testing.rst @@ -51,5 +51,3 @@ Coverage reports can be found in ``build/reports/coverage``. To trigger a test run on file change (source file or test file), run:: $ karma start karma.conf.js --single-run=false --browsers=PhantomJS - - diff --git a/performance-tests/README.md b/performance-tests/README.md index dd71bbb7b2..130205ffdb 100644 --- a/performance-tests/README.md +++ b/performance-tests/README.md @@ -10,4 +10,4 @@ cd performance-tests ./tests.sh ``` -The results will be stored in `performance-tests/results/` \ No newline at end of file +The results will be stored in `performance-tests/results/` diff --git a/requirements/test.txt b/requirements/test.txt index a70ae6a48a..3dbf758015 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -1,2 +1 @@ -r base.txt - diff --git a/ruff.toml b/ruff.toml index c4c46c0cd9..c1a2e9bbf9 100644 --- a/ruff.toml +++ b/ruff.toml @@ -36,22 +36,33 @@ indent-width = 4 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", + # https://docs.astral.sh/ruff/rules/#pyflakes-f "E", + # https://docs.astral.sh/ruff/rules/#pyflakes-f "F", - "S", - "I", - "BLE", - "C90", - "S106", - "UP", ] -ignore = ["E501"] +ignore = [ + # Whitespace before ':' (conflicts with Black) + "E203", + # Two spaces before inline comment + "E261", + # Line too long + "E501", + # Do not assign a lambda expression + "E731", + # Name may be undefined from '*' import + "F405", + # Blank line contains whitespace + "W293", + # Trailing whitespace + "W291", + # Local variable is assigned but never used + "F841", + # Ambiguous variable name + "E741", +] + # Allow fix for all enabled rules (when `--fix`) is provided. fixable = ["ALL"] @@ -85,4 +96,4 @@ docstring-code-format = false # # This only has an effect when the `docstring-code-format` setting is # enabled. -docstring-code-line-length = "dynamic" \ No newline at end of file +docstring-code-line-length = "dynamic" diff --git a/src/eherkenning/static/eherkenning/error.svg b/src/eherkenning/static/eherkenning/error.svg index 6cc63eb31f..d467ed63f6 100644 --- a/src/eherkenning/static/eherkenning/error.svg +++ b/src/eherkenning/static/eherkenning/error.svg @@ -13,4 +13,4 @@ - \ No newline at end of file + diff --git a/src/eherkenning/static/eherkenning/extra.css b/src/eherkenning/static/eherkenning/extra.css index 811c3f0816..499cec12a4 100644 --- a/src/eherkenning/static/eherkenning/extra.css +++ b/src/eherkenning/static/eherkenning/extra.css @@ -91,4 +91,4 @@ h2 { #section-header { padding-bottom: 0px; -} \ No newline at end of file +} diff --git a/src/open_inwoner/accounts/templates/django_registration/registration_closed.html b/src/open_inwoner/accounts/templates/django_registration/registration_closed.html index c3b5f0fe3b..3b973fec9d 100644 --- a/src/open_inwoner/accounts/templates/django_registration/registration_closed.html +++ b/src/open_inwoner/accounts/templates/django_registration/registration_closed.html @@ -1 +1 @@ -{% extends "master.html" %} \ No newline at end of file +{% extends "master.html" %} diff --git a/src/open_inwoner/apimock/apis/qmatic/appointment/customers/identify;email=foo@bar.org.json b/src/open_inwoner/apimock/apis/qmatic/appointment/customers/identify;email=foo@bar.org.json index 6904a70b3c..77aaa50432 100644 --- a/src/open_inwoner/apimock/apis/qmatic/appointment/customers/identify;email=foo@bar.org.json +++ b/src/open_inwoner/apimock/apis/qmatic/appointment/customers/identify;email=foo@bar.org.json @@ -27,4 +27,4 @@ "email": "foo@bar.org" } } -] \ No newline at end of file +] diff --git a/src/open_inwoner/apimock/apis/qmatic/calendar-backend/public/api/v1/customers/12345/appointments.json b/src/open_inwoner/apimock/apis/qmatic/calendar-backend/public/api/v1/customers/12345/appointments.json index b241e5287a..91d8590902 100644 --- a/src/open_inwoner/apimock/apis/qmatic/calendar-backend/public/api/v1/customers/12345/appointments.json +++ b/src/open_inwoner/apimock/apis/qmatic/calendar-backend/public/api/v1/customers/12345/appointments.json @@ -251,4 +251,4 @@ } ], "notifications": [] -} \ No newline at end of file +} diff --git a/src/open_inwoner/components/templates/components/File/File.html b/src/open_inwoner/components/templates/components/File/File.html index 8e8e4c780c..da670d35bd 100644 --- a/src/open_inwoner/components/templates/components/File/File.html +++ b/src/open_inwoner/components/templates/components/File/File.html @@ -56,4 +56,3 @@ - diff --git a/src/open_inwoner/components/templates/components/Header/AccessibilityHeader.html b/src/open_inwoner/components/templates/components/Header/AccessibilityHeader.html index dd2460d46a..bf26c5d2f4 100644 --- a/src/open_inwoner/components/templates/components/Header/AccessibilityHeader.html +++ b/src/open_inwoner/components/templates/components/Header/AccessibilityHeader.html @@ -33,4 +33,3 @@
- diff --git a/src/open_inwoner/components/templates/components/Header/AccessibilitySkipLink.html b/src/open_inwoner/components/templates/components/Header/AccessibilitySkipLink.html index 1bd08a696c..f7f25d469d 100644 --- a/src/open_inwoner/components/templates/components/Header/AccessibilitySkipLink.html +++ b/src/open_inwoner/components/templates/components/Header/AccessibilitySkipLink.html @@ -6,4 +6,4 @@ {{ link_text }} -

\ No newline at end of file +

diff --git a/src/open_inwoner/components/templates/components/Header/Header.html b/src/open_inwoner/components/templates/components/Header/Header.html index bb98f676f5..1abe02aa54 100644 --- a/src/open_inwoner/components/templates/components/Header/Header.html +++ b/src/open_inwoner/components/templates/components/Header/Header.html @@ -33,7 +33,7 @@ {# end of mobile header-menu with logo #}
- +
{% button icon="close" text=_("Sluiten") hide_text=True icon_outlined=True transparent=True id="closeMobileNav" %}
diff --git a/src/open_inwoner/components/templates/components/Questionnaire/Questionnaire.html b/src/open_inwoner/components/templates/components/Questionnaire/Questionnaire.html index 3d7425cfe5..e96424739a 100644 --- a/src/open_inwoner/components/templates/components/Questionnaire/Questionnaire.html +++ b/src/open_inwoner/components/templates/components/Questionnaire/Questionnaire.html @@ -8,4 +8,4 @@ {% endfor %} -
\ No newline at end of file + diff --git a/src/open_inwoner/conf/fixtures/mail-editor.json b/src/open_inwoner/conf/fixtures/mail-editor.json index 714197ae96..8705120373 100644 --- a/src/open_inwoner/conf/fixtures/mail-editor.json +++ b/src/open_inwoner/conf/fixtures/mail-editor.json @@ -1 +1 @@ -[{"model": "mail_editor.mailtemplate", "pk": 1, "fields": {"internal_name": "", "template_type": "invite", "language": null, "remarks": "", "subject": "Uitnodiging voor {{ site_name }}", "body": "\r\n\r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n
 \r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t
\r\n\t\t\t\t\t\t

Beste,

\r\n\r\n\t\t\t\t\t\t

Je bent door {{ inviter_name}} uitgenodigd om in te loggen op {{ site_name }}. Gebruik onderstaande link om je aan te melden

\r\n\r\n\t\t\t\t\t\t

aanmelden

\r\n\r\n\t\t\t\t\t\t

Mocht je geen behoefte hieraan hebben dan staat het je vrij om dit bericht te negeren

\r\n\r\n\t\t\t\t\t\t

met vriendelijke groet,

\r\n\r\n\t\t\t\t\t\t

{{ site_name }}

\r\n\t\t\t\t\t\t
\r\n\t\t\t
 
\r\n", "base_template_path": null}}, {"model": "mail_editor.mailtemplate", "pk": 2, "fields": {"internal_name": "", "template_type": "new_messages", "language": null, "remarks": "", "subject": "Nieuwe berichten op {{ site_name }}", "body": "\r\n\r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n
 \r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t
\r\n\t\t\t\t\t\t

Beste

\r\n\r\n\t\t\t\t\t\t

U heeft {{ total_messages }} nieuwe bericht(en) ontvangen van uw contactpersonen.

\r\n\r\n\t\t\t\t\t\t

Bekijk uw berichten

\r\n\r\n\t\t\t\t\t\t

Met vriendelijke groet,

\r\n\r\n\t\t\t\t\t\t

{{ site_name }}

\r\n\t\t\t\t\t\t
\r\n\t\t\t
 
\r\n", "base_template_path": null}}, {"model": "mail_editor.mailtemplate", "pk": 3, "fields": {"internal_name": "", "template_type": "expiring_action", "language": null, "remarks": "", "subject": "Uw actie(s) lopen vandaag af", "body": "\r\n\r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n
 \r\n\t\t\t

Beste

\r\n\r\n\t\t\t

U ontvangt deze email omdat u een of meerdere acties heeft die vandaag aflopen

\r\n\t\t\t\r\n\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n{% for action in actions %} \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n{% endfor %}\r\n\t\t\t\t\r\n\t\t\t
Actie naamDoelEinddatum
{{ action.name }}{{ action.goal }}{{ action.end_date|date:\"d-m-Y\" }}
\r\n \r\n\t\t\t

Naar uw profiel

\r\n\r\n\t\t\t

Met vriendelijke groet,

\r\n\r\n\t\t\t

{{ site_name }}

\r\n\t\t\t
 
\r\n", "base_template_path": null}}, {"model": "mail_editor.mailtemplate", "pk": 4, "fields": {"internal_name": "", "template_type": "expiring_plan", "language": null, "remarks": "", "subject": "Uw plan verloopt vandaag", "body": "\r\n\r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n
 \r\n\t\t\t

Beste

\r\n\r\n\t\t\t

U ontvangt deze email omdat u een plan heeft dat vandaag verloopt

\r\n\t\t\t\r\n\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n{% for plan in plans %} \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n{% endfor %}\r\n\t\t\t\t\r\n\t\t\t
Plan naamDoelEinddatum
{{ plan.title }}{{ plan.goal }}{{ plan.end_date|date:\"d-m-Y\" }}
\r\n\r\n\t\t\t

Naar uw profiel

\r\n\r\n\t\t\t

Met vriendelijke groet,

\r\n\r\n\t\t\t

{{ site_name }}

\r\n\t\t\t
 
\r\n", "base_template_path": null}}] \ No newline at end of file +[{"model": "mail_editor.mailtemplate", "pk": 1, "fields": {"internal_name": "", "template_type": "invite", "language": null, "remarks": "", "subject": "Uitnodiging voor {{ site_name }}", "body": "\r\n\r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n
 \r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t
\r\n\t\t\t\t\t\t

Beste,

\r\n\r\n\t\t\t\t\t\t

Je bent door {{ inviter_name}} uitgenodigd om in te loggen op {{ site_name }}. Gebruik onderstaande link om je aan te melden

\r\n\r\n\t\t\t\t\t\t

aanmelden

\r\n\r\n\t\t\t\t\t\t

Mocht je geen behoefte hieraan hebben dan staat het je vrij om dit bericht te negeren

\r\n\r\n\t\t\t\t\t\t

met vriendelijke groet,

\r\n\r\n\t\t\t\t\t\t

{{ site_name }}

\r\n\t\t\t\t\t\t
\r\n\t\t\t
 
\r\n", "base_template_path": null}}, {"model": "mail_editor.mailtemplate", "pk": 2, "fields": {"internal_name": "", "template_type": "new_messages", "language": null, "remarks": "", "subject": "Nieuwe berichten op {{ site_name }}", "body": "\r\n\r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n
 \r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t
\r\n\t\t\t\t\t\t

Beste

\r\n\r\n\t\t\t\t\t\t

U heeft {{ total_messages }} nieuwe bericht(en) ontvangen van uw contactpersonen.

\r\n\r\n\t\t\t\t\t\t

Bekijk uw berichten

\r\n\r\n\t\t\t\t\t\t

Met vriendelijke groet,

\r\n\r\n\t\t\t\t\t\t

{{ site_name }}

\r\n\t\t\t\t\t\t
\r\n\t\t\t
 
\r\n", "base_template_path": null}}, {"model": "mail_editor.mailtemplate", "pk": 3, "fields": {"internal_name": "", "template_type": "expiring_action", "language": null, "remarks": "", "subject": "Uw actie(s) lopen vandaag af", "body": "\r\n\r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n
 \r\n\t\t\t

Beste

\r\n\r\n\t\t\t

U ontvangt deze email omdat u een of meerdere acties heeft die vandaag aflopen

\r\n\t\t\t\r\n\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n{% for action in actions %} \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n{% endfor %}\r\n\t\t\t\t\r\n\t\t\t
Actie naamDoelEinddatum
{{ action.name }}{{ action.goal }}{{ action.end_date|date:\"d-m-Y\" }}
\r\n \r\n\t\t\t

Naar uw profiel

\r\n\r\n\t\t\t

Met vriendelijke groet,

\r\n\r\n\t\t\t

{{ site_name }}

\r\n\t\t\t
 
\r\n", "base_template_path": null}}, {"model": "mail_editor.mailtemplate", "pk": 4, "fields": {"internal_name": "", "template_type": "expiring_plan", "language": null, "remarks": "", "subject": "Uw plan verloopt vandaag", "body": "\r\n\r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n
 \r\n\t\t\t

Beste

\r\n\r\n\t\t\t

U ontvangt deze email omdat u een plan heeft dat vandaag verloopt

\r\n\t\t\t\r\n\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n{% for plan in plans %} \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n{% endfor %}\r\n\t\t\t\t\r\n\t\t\t
Plan naamDoelEinddatum
{{ plan.title }}{{ plan.goal }}{{ plan.end_date|date:\"d-m-Y\" }}
\r\n\r\n\t\t\t

Naar uw profiel

\r\n\r\n\t\t\t

Met vriendelijke groet,

\r\n\r\n\t\t\t

{{ site_name }}

\r\n\t\t\t
 
\r\n", "base_template_path": null}}] diff --git a/src/open_inwoner/conf/local_example.py b/src/open_inwoner/conf/local_example.py index 15dea5dcdb..752855a406 100644 --- a/src/open_inwoner/conf/local_example.py +++ b/src/open_inwoner/conf/local_example.py @@ -17,7 +17,7 @@ PLAYWRIGHT_MULTI_ONLY_DEFAULT = True # Enable django-debug-toolbar -from .dev import INSTALLED_APPS, MIDDLEWARE +from .dev import INSTALLED_APPS, MIDDLEWARE # noqa: E402 INSTALLED_APPS += ["debug_toolbar"] MIDDLEWARE += ["debug_toolbar.middleware.DebugToolbarMiddleware"] diff --git a/src/open_inwoner/conf/locale/README b/src/open_inwoner/conf/locale/README index 7aeac85e57..08a26ca9ce 100644 --- a/src/open_inwoner/conf/locale/README +++ b/src/open_inwoner/conf/locale/README @@ -1,4 +1,4 @@ -In this directory, language directories can be created ('nl', 'en', etc.) for +In this directory, language directories can be created ('nl', 'en', etc.) for every locale in the Django settings. We use centralized translations for easy management, merging and translating. @@ -6,4 +6,4 @@ Usage:: cd src/project_name python ../manage.py makemessages --all - python ../manage.py compilemessages \ No newline at end of file + python ../manage.py compilemessages diff --git a/src/open_inwoner/conf/parts/expiring_action.html b/src/open_inwoner/conf/parts/expiring_action.html index 56f6338e50..16fcab78fb 100644 --- a/src/open_inwoner/conf/parts/expiring_action.html +++ b/src/open_inwoner/conf/parts/expiring_action.html @@ -77,4 +77,3 @@ - diff --git a/src/open_inwoner/configurations/tests/bootstrap/files/zgw_api_step_zero_groups.yaml b/src/open_inwoner/configurations/tests/bootstrap/files/zgw_api_step_zero_groups.yaml index c5bda520ee..08839c688b 100644 --- a/src/open_inwoner/configurations/tests/bootstrap/files/zgw_api_step_zero_groups.yaml +++ b/src/open_inwoner/configurations/tests/bootstrap/files/zgw_api_step_zero_groups.yaml @@ -16,5 +16,5 @@ openzaak_config: - .pdf - .txt # Empty api_groups should not raise a missing exception, but should raise a - # + # api_groups: [] diff --git a/src/open_inwoner/haalcentraal/tests/files/personen_1.3.yaml b/src/open_inwoner/haalcentraal/tests/files/personen_1.3.yaml index a7e9869886..5ead01dae3 100644 --- a/src/open_inwoner/haalcentraal/tests/files/personen_1.3.yaml +++ b/src/open_inwoner/haalcentraal/tests/files/personen_1.3.yaml @@ -2808,4 +2808,4 @@ components: door de warn-text met de human-readable waarschuwing example: '299 https://service.../api/.../v1 "Deze versie van de API is verouderd en zal uit dienst worden genomen op 2018-02-01. Raadpleeg voor meer informatie - hier de documentatie: https://omgevingswet.../api/.../v1".' \ No newline at end of file + hier de documentatie: https://omgevingswet.../api/.../v1".' diff --git a/src/open_inwoner/pdc/static/pdc/category_file_example.csv b/src/open_inwoner/pdc/static/pdc/category_file_example.csv index f904e01963..82a4d1dd6f 100644 --- a/src/open_inwoner/pdc/static/pdc/category_file_example.csv +++ b/src/open_inwoner/pdc/static/pdc/category_file_example.csv @@ -1,2 +1,2 @@ name,slug,description -Name of category,,A short description \ No newline at end of file +Name of category,,A short description diff --git a/src/open_inwoner/questionnaire/fixtures/questionnaire_sampledata.json b/src/open_inwoner/questionnaire/fixtures/questionnaire_sampledata.json index 7dd4387521..fe51488c70 100644 --- a/src/open_inwoner/questionnaire/fixtures/questionnaire_sampledata.json +++ b/src/open_inwoner/questionnaire/fixtures/questionnaire_sampledata.json @@ -1,2 +1 @@ [] - diff --git a/src/open_inwoner/questionnaire/fixtures/questionnaire_sampledata_2.json b/src/open_inwoner/questionnaire/fixtures/questionnaire_sampledata_2.json index 20fb906d57..4c011f9c8b 100644 --- a/src/open_inwoner/questionnaire/fixtures/questionnaire_sampledata_2.json +++ b/src/open_inwoner/questionnaire/fixtures/questionnaire_sampledata_2.json @@ -1 +1 @@ -[{"model": "questionnaire.questionnairestep", "pk": 1, "fields": {"path": "0001", "depth": 1, "numchild": 3, "parent_answer": "", "title": "", "description": "", "question": "Wat is jouw situatie?", "question_subject": "Situatie", "slug": "wat-is-jouw-situatie", "help_text": "Kies het antwoord dat het meest van toepassing is", "content": "", "related_products": []}}, {"model": "questionnaire.questionnairestep", "pk": 2, "fields": {"path": "00010001", "depth": 2, "numchild": 2, "parent_answer": "Ik wil werkervaring opdoen", "title": "", "description": "", "question": "Op welke manier wil je werkervaring opdoen?", "question_subject": "Werkervaring", "slug": "op-welke-manier-wil-je-werkervaring-opdoen", "help_text": "Kies het antwoord dat het meest van toepassing is", "content": "", "related_products": []}}, {"model": "questionnaire.questionnairestep", "pk": 3, "fields": {"path": "00010003", "depth": 2, "numchild": 2, "parent_answer": "Ik wil graag hulp krijgen om te solliciteren", "title": "", "description": "", "question": "Waarbij wil je graag hulp?", "question_subject": "Solliciteren", "slug": "waarbij-wil-je-graag-hulp", "help_text": "Kies het antwoord dat het meest van toepassing is", "content": "", "related_products": []}}, {"model": "questionnaire.questionnairestep", "pk": 4, "fields": {"path": "00010004", "depth": 2, "numchild": 0, "parent_answer": "Ik wil een eigen bedrijf beginnen", "title": "", "description": "", "question": "Advies + eigen bedrijf", "question_subject": "Advies en eigen bedrijf", "slug": "advies-eigen-bedrijf", "help_text": "Kies het antwoord dat het meest van toepassing is", "content": "", "related_products": []}}, {"model": "questionnaire.questionnairestep", "pk": 5, "fields": {"path": "000100010003", "depth": 3, "numchild": 0, "parent_answer": "Ik wil uitproberen of een beroep bij me past", "title": "", "description": "", "question": "Advies + werkervaringsplek", "question_subject": "Werkervaringsplek", "slug": "advies-werkervaringsplek", "help_text": "Kies het antwoord dat het meest van toepassing is", "content": "", "related_products": []}}, {"model": "questionnaire.questionnairestep", "pk": 6, "fields": {"path": "000100010001", "depth": 3, "numchild": 0, "parent_answer": "Ik wil vrijwilligerswerk gaan doen", "title": "", "description": "", "question": "Advies + vrijwilligerswerk", "question_subject": "Vrijwilligerswerk", "slug": "advies-vrijwilligerswerk", "help_text": "Kies het antwoord dat het meest van toepassing is", "content": "Informatie en uitleg over de gekozen optie...", "related_products": []}}, {"model": "questionnaire.questionnairestep", "pk": 7, "fields": {"path": "000100030003", "depth": 3, "numchild": 0, "parent_answer": "Ik wil graag hulp bij het aanpassen/maken van mijn CV", "title": "", "description": "", "question": "Advies + CV hulp", "question_subject": "CV hulp", "slug": "advies-cv-hulp", "help_text": "Kies het antwoord dat het meest van toepassing is", "content": "", "related_products": []}}, {"model": "questionnaire.questionnairestep", "pk": 8, "fields": {"path": "000100030001", "depth": 3, "numchild": 0, "parent_answer": "Ik wil graag hulp bij het solliciteren", "title": "", "description": "", "question": "Advies + Sollicitatietraining", "question_subject": "Sollicitatietraining", "slug": "advies-sollicitatietraining", "help_text": "Kies het antwoord dat het meest van toepassing is", "content": "", "related_products": []}}] \ No newline at end of file +[{"model": "questionnaire.questionnairestep", "pk": 1, "fields": {"path": "0001", "depth": 1, "numchild": 3, "parent_answer": "", "title": "", "description": "", "question": "Wat is jouw situatie?", "question_subject": "Situatie", "slug": "wat-is-jouw-situatie", "help_text": "Kies het antwoord dat het meest van toepassing is", "content": "", "related_products": []}}, {"model": "questionnaire.questionnairestep", "pk": 2, "fields": {"path": "00010001", "depth": 2, "numchild": 2, "parent_answer": "Ik wil werkervaring opdoen", "title": "", "description": "", "question": "Op welke manier wil je werkervaring opdoen?", "question_subject": "Werkervaring", "slug": "op-welke-manier-wil-je-werkervaring-opdoen", "help_text": "Kies het antwoord dat het meest van toepassing is", "content": "", "related_products": []}}, {"model": "questionnaire.questionnairestep", "pk": 3, "fields": {"path": "00010003", "depth": 2, "numchild": 2, "parent_answer": "Ik wil graag hulp krijgen om te solliciteren", "title": "", "description": "", "question": "Waarbij wil je graag hulp?", "question_subject": "Solliciteren", "slug": "waarbij-wil-je-graag-hulp", "help_text": "Kies het antwoord dat het meest van toepassing is", "content": "", "related_products": []}}, {"model": "questionnaire.questionnairestep", "pk": 4, "fields": {"path": "00010004", "depth": 2, "numchild": 0, "parent_answer": "Ik wil een eigen bedrijf beginnen", "title": "", "description": "", "question": "Advies + eigen bedrijf", "question_subject": "Advies en eigen bedrijf", "slug": "advies-eigen-bedrijf", "help_text": "Kies het antwoord dat het meest van toepassing is", "content": "", "related_products": []}}, {"model": "questionnaire.questionnairestep", "pk": 5, "fields": {"path": "000100010003", "depth": 3, "numchild": 0, "parent_answer": "Ik wil uitproberen of een beroep bij me past", "title": "", "description": "", "question": "Advies + werkervaringsplek", "question_subject": "Werkervaringsplek", "slug": "advies-werkervaringsplek", "help_text": "Kies het antwoord dat het meest van toepassing is", "content": "", "related_products": []}}, {"model": "questionnaire.questionnairestep", "pk": 6, "fields": {"path": "000100010001", "depth": 3, "numchild": 0, "parent_answer": "Ik wil vrijwilligerswerk gaan doen", "title": "", "description": "", "question": "Advies + vrijwilligerswerk", "question_subject": "Vrijwilligerswerk", "slug": "advies-vrijwilligerswerk", "help_text": "Kies het antwoord dat het meest van toepassing is", "content": "Informatie en uitleg over de gekozen optie...", "related_products": []}}, {"model": "questionnaire.questionnairestep", "pk": 7, "fields": {"path": "000100030003", "depth": 3, "numchild": 0, "parent_answer": "Ik wil graag hulp bij het aanpassen/maken van mijn CV", "title": "", "description": "", "question": "Advies + CV hulp", "question_subject": "CV hulp", "slug": "advies-cv-hulp", "help_text": "Kies het antwoord dat het meest van toepassing is", "content": "", "related_products": []}}, {"model": "questionnaire.questionnairestep", "pk": 8, "fields": {"path": "000100030001", "depth": 3, "numchild": 0, "parent_answer": "Ik wil graag hulp bij het solliciteren", "title": "", "description": "", "question": "Advies + Sollicitatietraining", "question_subject": "Sollicitatietraining", "slug": "advies-sollicitatietraining", "help_text": "Kies het antwoord dat het meest van toepassing is", "content": "", "related_products": []}}] diff --git a/src/open_inwoner/static/img/admin/calendar-alt-regular.svg b/src/open_inwoner/static/img/admin/calendar-alt-regular.svg index 1e90abcbba..0468eda563 100644 --- a/src/open_inwoner/static/img/admin/calendar-alt-regular.svg +++ b/src/open_inwoner/static/img/admin/calendar-alt-regular.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/src/open_inwoner/static/img/admin/clock-regular.svg b/src/open_inwoner/static/img/admin/clock-regular.svg index ef1d84a1b8..99fe6fb457 100644 --- a/src/open_inwoner/static/img/admin/clock-regular.svg +++ b/src/open_inwoner/static/img/admin/clock-regular.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/src/open_inwoner/static/img/admin/edit-regular.svg b/src/open_inwoner/static/img/admin/edit-regular.svg index 6f92bb5d0e..174efd8716 100644 --- a/src/open_inwoner/static/img/admin/edit-regular.svg +++ b/src/open_inwoner/static/img/admin/edit-regular.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/src/open_inwoner/static/img/admin/plus-square-regular.svg b/src/open_inwoner/static/img/admin/plus-square-regular.svg index b9e300d9e7..40ef670ace 100644 --- a/src/open_inwoner/static/img/admin/plus-square-regular.svg +++ b/src/open_inwoner/static/img/admin/plus-square-regular.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/src/open_inwoner/static/img/admin/trash-alt-regular.svg b/src/open_inwoner/static/img/admin/trash-alt-regular.svg index 500af9cb82..4be206b9e3 100644 --- a/src/open_inwoner/static/img/admin/trash-alt-regular.svg +++ b/src/open_inwoner/static/img/admin/trash-alt-regular.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/src/open_inwoner/templates/admin/catalogusconfig_change_list.html b/src/open_inwoner/templates/admin/catalogusconfig_change_list.html index 38a2f2e19e..51c0a8cdf3 100644 --- a/src/open_inwoner/templates/admin/catalogusconfig_change_list.html +++ b/src/open_inwoner/templates/admin/catalogusconfig_change_list.html @@ -9,4 +9,3 @@ {% endblock %} - diff --git a/src/open_inwoner/templates/admin/import_zgw_export_form.html b/src/open_inwoner/templates/admin/import_zgw_export_form.html index 0cc50e433f..e1c6167547 100644 --- a/src/open_inwoner/templates/admin/import_zgw_export_form.html +++ b/src/open_inwoner/templates/admin/import_zgw_export_form.html @@ -13,7 +13,7 @@

{% trans "Import ZGW information from a file" %}

-
+ {% csrf_token %} {{ form.as_p }} diff --git a/src/open_inwoner/templates/admin/widgets/map.html b/src/open_inwoner/templates/admin/widgets/map.html index 948aba2865..4a5abacf3e 100644 --- a/src/open_inwoner/templates/admin/widgets/map.html +++ b/src/open_inwoner/templates/admin/widgets/map.html @@ -1,3 +1,3 @@ {% load i18n map_tags %} -{% map lat lng geojson_feature_collection=json admin=True %} \ No newline at end of file +{% map lat lng geojson_feature_collection=json admin=True %} diff --git a/src/open_inwoner/templates/admin/zaaktypeconfig_change_list.html b/src/open_inwoner/templates/admin/zaaktypeconfig_change_list.html index 8ea4080c0b..a1252a8fc5 100644 --- a/src/open_inwoner/templates/admin/zaaktypeconfig_change_list.html +++ b/src/open_inwoner/templates/admin/zaaktypeconfig_change_list.html @@ -9,4 +9,3 @@ {% endblock %} - diff --git a/src/open_inwoner/templates/analytics/matomo.html b/src/open_inwoner/templates/analytics/matomo.html index 8b890a8711..2e4313a1a6 100644 --- a/src/open_inwoner/templates/analytics/matomo.html +++ b/src/open_inwoner/templates/analytics/matomo.html @@ -16,5 +16,3 @@ {% endif %} - - diff --git a/src/open_inwoner/templates/cms/menu/primary.html b/src/open_inwoner/templates/cms/menu/primary.html index c24438251e..54131bfd2f 100644 --- a/src/open_inwoner/templates/cms/menu/primary.html +++ b/src/open_inwoner/templates/cms/menu/primary.html @@ -14,4 +14,3 @@ {% endwith %} {% endfor %} - diff --git a/src/open_inwoner/templates/django/forms/widgets/select.html b/src/open_inwoner/templates/django/forms/widgets/select.html index e6bb9cb0d3..2df6d8c954 100644 --- a/src/open_inwoner/templates/django/forms/widgets/select.html +++ b/src/open_inwoner/templates/django/forms/widgets/select.html @@ -2,4 +2,4 @@ {% endif %}{% for option in group_choices %} {% include option.template_name with widget=option %}{% endfor %}{% if group_name %} {% endif %}{% endfor %} - \ No newline at end of file + diff --git a/src/open_inwoner/templates/master.html b/src/open_inwoner/templates/master.html index 42ba4256d0..35d72a45c5 100644 --- a/src/open_inwoner/templates/master.html +++ b/src/open_inwoner/templates/master.html @@ -63,7 +63,7 @@ - + {% if cookiebanner_enabled %} {# render cookiebanner first #}
{% endif %} - + {% include "components/Header/AccessibilitySkipLink.html" %} {% if warning_banner_enabled %} diff --git a/src/open_inwoner/templates/utils/widgets/message_file_input.html b/src/open_inwoner/templates/utils/widgets/message_file_input.html index 0eec17b12c..67b0917924 100644 --- a/src/open_inwoner/templates/utils/widgets/message_file_input.html +++ b/src/open_inwoner/templates/utils/widgets/message_file_input.html @@ -2,4 +2,3 @@ - diff --git a/src/openklant2/docker-compose.yaml b/src/openklant2/docker-compose.yaml index cfa375a3a7..fdb24685ba 100644 --- a/src/openklant2/docker-compose.yaml +++ b/src/openklant2/docker-compose.yaml @@ -1,6 +1,6 @@ # This docker-compose is used internally in the testsuite to dynamically spin up # an OpenKlant2 backend, seed it with known data, and record VCR fixtures. Be -# sure to verify any changes here are consistent with +# sure to verify any changes here are consistent with version: '3' services: diff --git a/src/openklant2/tests/test_partij.py b/src/openklant2/tests/test_partij.py index 11f1b006dd..7dadaf1e80 100644 --- a/src/openklant2/tests/test_partij.py +++ b/src/openklant2/tests/test_partij.py @@ -93,7 +93,6 @@ def test_create_persoon(client) -> None: "digitaleAdressen": None, "rekeningnummers": None, "voorkeursRekeningnummer": None, - "soortPartij": "persoon", "voorkeurstaal": "nld", "indicatieActief": True, "indicatieGeheimhouding": False, From ec91456f5d1b33e1f2fb228e03574757b9dd3650 Mon Sep 17 00:00:00 2001 From: Sidney Richards Date: Mon, 6 Jan 2025 22:45:54 +0100 Subject: [PATCH 03/11] fixup! fixup! [WIP] pre-commit and ruff --- ruff.toml | 2 + src/open_inwoner/accounts/gateways.py | 4 +- src/open_inwoner/accounts/managers.py | 2 +- src/open_inwoner/accounts/models.py | 6 +- .../accounts/notifications/tasks.py | 3 +- .../tests/test_notify_expiring_actions.py | 2 +- .../accounts/views/contactmoments.py | 3 +- src/open_inwoner/accounts/views/login.py | 8 +- src/open_inwoner/cms/cases/views/cases.py | 2 +- src/open_inwoner/cms/cases/views/services.py | 9 ++- src/open_inwoner/cms/cases/views/status.py | 33 +++++--- .../components/templatetags/string_tags.py | 4 +- src/open_inwoner/conf/base.py | 2 +- src/open_inwoner/conf/local_example.py | 2 +- src/open_inwoner/configurations/admin.py | 9 ++- src/open_inwoner/configurations/models.py | 2 +- src/open_inwoner/openklant/api_models.py | 18 ++--- src/open_inwoner/openklant/services.py | 3 +- .../tests/test_openklant2_service.py | 4 +- src/open_inwoner/openzaak/api_models.py | 78 +++++++++---------- src/open_inwoner/openzaak/clients.py | 5 +- src/open_inwoner/openzaak/exceptions.py | 2 +- src/open_inwoner/openzaak/import_export.py | 5 +- .../openzaak/tests/test_case_detail.py | 6 +- .../openzaak/tests/test_import_export.py | 1 - .../openzaak/tests/test_zgw_imports.py | 2 +- .../tests/test_zgw_imports_iotypes.py | 2 - src/open_inwoner/plans/views.py | 10 +-- src/open_inwoner/questionnaire/admin.py | 8 +- src/open_inwoner/questionnaire/models.py | 2 +- src/open_inwoner/search/results.py | 3 +- src/open_inwoner/ssd/templatetags/ssd_tags.py | 2 +- src/open_inwoner/utils/admin.py | 4 +- src/open_inwoner/utils/decorators.py | 6 +- src/open_inwoner/utils/geocode.py | 2 +- src/open_inwoner/utils/logentry.py | 24 +++++- src/open_inwoner/utils/mixins.py | 6 +- src/open_inwoner/utils/schema.py | 4 +- src/open_inwoner/utils/templatetags/utils.py | 4 +- src/open_inwoner/utils/tests/test_glom.py | 6 +- src/open_inwoner/utils/text.py | 2 +- src/open_inwoner/utils/validators.py | 2 +- src/openklant2/_resources/base.py | 14 +++- src/openklant2/_resources/partij.py | 4 +- src/openklant2/factories/helpers.py | 2 +- src/openklant2/tests/test_partij.py | 1 + .../types/resources/klant_contact.py | 4 +- 47 files changed, 189 insertions(+), 140 deletions(-) diff --git a/ruff.toml b/ruff.toml index c1a2e9bbf9..ac9b9b5c5b 100644 --- a/ruff.toml +++ b/ruff.toml @@ -41,6 +41,8 @@ select = [ "E", # https://docs.astral.sh/ruff/rules/#pyflakes-f "F", + # https://docs.astral.sh/ruff/rules/#isort-i + "I", ] ignore = [ # Whitespace before ':' (conflicts with Black) diff --git a/src/open_inwoner/accounts/gateways.py b/src/open_inwoner/accounts/gateways.py index 41d729832b..0aa9f03918 100644 --- a/src/open_inwoner/accounts/gateways.py +++ b/src/open_inwoner/accounts/gateways.py @@ -65,7 +65,9 @@ def send(self, to, token, **kwargs): ) except messagebird.client.ErrorException as e: for error in e.errors: - logger.critical(f"Could not send SMS to {to}:\n{error}") + logger.critical( + ("Could not send SMS to {to}:\n{error}").format(to=to, error=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 e752a10aa4..c34eea1965 100644 --- a/src/open_inwoner/accounts/managers.py +++ b/src/open_inwoner/accounts/managers.py @@ -33,7 +33,7 @@ def get_by_kvk(self, kvk): def eherkenning_create(self, kvk, **kwargs): return super().create( - email=f"user-{kvk}@localhost", + email="user-{}@localhost".format(kvk), login_type=LoginTypeChoices.eherkenning, kvk=kvk, ) diff --git a/src/open_inwoner/accounts/models.py b/src/open_inwoner/accounts/models.py index 10ae22f7df..2ba955132e 100644 --- a/src/open_inwoner/accounts/models.py +++ b/src/open_inwoner/accounts/models.py @@ -110,7 +110,9 @@ def get_callback_view(self): def generate_uuid_image_name(instance, filename): filename, file_extension = os.path.splitext(filename) - return f"profile/{uuid4()}{file_extension.lower()}" + return "profile/{uuid}{file_extension}".format( + uuid=uuid4(), file_extension=file_extension.lower() + ) class User(AbstractBaseUser, PermissionsMixin): @@ -881,7 +883,7 @@ def get_full_name(self): """ Returns the first_name plus the last_name of the invitee, with a space in between. """ - full_name = f"{self.invitee_first_name} {self.invitee_last_name}" + full_name = "{} {}".format(self.invitee_first_name, self.invitee_last_name) return full_name.strip() def save(self, **kwargs): diff --git a/src/open_inwoner/accounts/notifications/tasks.py b/src/open_inwoner/accounts/notifications/tasks.py index dbf22924b9..c203b91896 100644 --- a/src/open_inwoner/accounts/notifications/tasks.py +++ b/src/open_inwoner/accounts/notifications/tasks.py @@ -1,5 +1,4 @@ -from collections.abc import Callable -from typing import Any +from typing import Any, Callable import celery 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 5e2709dfdb..af5a3dc1af 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], strict=False): + for email, recipient in zip([email1, email2], [joe, schmoe]): self.assertEqual( email.subject, "Acties verlopen vandaag op Open Inwoner Platform" ) diff --git a/src/open_inwoner/accounts/views/contactmoments.py b/src/open_inwoner/accounts/views/contactmoments.py index 78a5971f83..de47e522a9 100644 --- a/src/open_inwoner/accounts/views/contactmoments.py +++ b/src/open_inwoner/accounts/views/contactmoments.py @@ -1,6 +1,5 @@ import logging -from collections.abc import Iterable -from typing import Protocol +from typing import Iterable, Protocol from django.contrib.auth.mixins import AccessMixin from django.core.exceptions import ImproperlyConfigured diff --git a/src/open_inwoner/accounts/views/login.py b/src/open_inwoner/accounts/views/login.py index d70625bf5d..b52a9bfeb7 100644 --- a/src/open_inwoner/accounts/views/login.py +++ b/src/open_inwoner/accounts/views/login.py @@ -83,7 +83,7 @@ def form_valid(self, form): else: self.log_user_action( user, - f"SMS bericht met code is verzonden aan {user.phonenumber}", + "SMS bericht met code is verzonden aan {}".format(user.phonenumber), ) messages.debug(self.request, gateway.get_message(token)) @@ -255,7 +255,7 @@ def post(self, request): else: self.log_user_action( user, - f"SMS bericht met code is verzonden aan {user.phonenumber}", + "SMS bericht met code is verzonden aan {}".format(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, - f"SMS bericht met code is verzonden aan {phonenumber}", + "SMS bericht met code is verzonden aan {}".format(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, - f"Telefoonnummer gewijzigd: {phonenumber}", + "Telefoonnummer gewijzigd: {}".format(phonenumber), ) self.user_cache.save() diff --git a/src/open_inwoner/cms/cases/views/cases.py b/src/open_inwoner/cms/cases/views/cases.py index 2a6572b538..da30e9ee40 100644 --- a/src/open_inwoner/cms/cases/views/cases.py +++ b/src/open_inwoner/cms/cases/views/cases.py @@ -1,5 +1,5 @@ import logging -from collections.abc import Sequence +from typing import Sequence from django.urls import reverse from django.utils.functional import cached_property diff --git a/src/open_inwoner/cms/cases/views/services.py b/src/open_inwoner/cms/cases/views/services.py index 49aeba8476..7de2b4df64 100644 --- a/src/open_inwoner/cms/cases/views/services.py +++ b/src/open_inwoner/cms/cases/views/services.py @@ -2,9 +2,8 @@ import enum import functools import logging -from collections.abc import Callable from dataclasses import dataclass -from typing import TypedDict +from typing import Callable, TypedDict from django.http import HttpRequest from django.utils.translation import gettext_lazy as _ @@ -226,7 +225,9 @@ def resolve_cases( case = futures[task]["case"] group = futures[task]["api_group"] logger.exception( - f"Error while resolving case {case} with API group {group}" + "Error while resolving case {case} with API group {group}".format( + case=case, group=group + ) ) return resolved_cases @@ -264,7 +265,7 @@ def resolve_case(self, case: Zaak, group: ZGWApiGroupConfig) -> Zaak: ): try: update_case = task.result() - if callable(update_case): + if hasattr(update_case, "__call__"): 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 c175469c5c..b35bddef71 100644 --- a/src/open_inwoner/cms/cases/views/status.py +++ b/src/open_inwoner/cms/cases/views/status.py @@ -2,9 +2,8 @@ import datetime as dt import logging from collections import defaultdict -from collections.abc import Iterable from datetime import datetime -from typing import Protocol +from typing import Iterable, Protocol from django.conf import settings from django.contrib import messages @@ -317,7 +316,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(f"Case {self.case} has only one statustype") + logger.info("Case {case} has only one statustype".format(case=self.case)) return statustype_numbers.sort() @@ -367,7 +366,9 @@ 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( - f"Issue #2037 -- Retrieving status individually for case {self.case.identification} because of eSuite" + "Issue #2037 -- Retrieving status individually for case {} because of eSuite".format( + self.case.identification + ) ) self.case.status = zaken_client.fetch_single_status(self.case.status) status_types_mapping[self.case.status.statustype].append(self.case.status) @@ -458,7 +459,9 @@ def is_file_upload_enabled_for_case_type(self) -> bool: ).exists() ) logger.info( - f"Case {self.case.url} has case type file upload: {case_upload_enabled}" + "Case {url} has case type file upload: {case_upload_enabled}".format( + url=self.case.url, case_upload_enabled=case_upload_enabled + ) ) return case_upload_enabled @@ -471,18 +474,26 @@ def is_file_upload_enabled_for_statustype(self) -> bool: except AttributeError as e: logger.exception(e) logger.info( - f"Could not retrieve status type for case {self.case}; " - "the status has not been resolved to a ZGW model object." + "Could not retrieve status type for case {case}; " + "the status has not been resolved to a ZGW model object.".format( + case=self.case + ) ) return True except KeyError as e: logger.exception(e) logger.info( - f"Could not retrieve status type config for url {self.case.status.statustype.url}" + "Could not retrieve status type config for url {url}".format( + url=self.case.status.statustype.url + ) ) return True logger.info( - f"Case {self.case.url} status type {self.case.status.statustype} has status type file upload: {enabled_for_status_type}" + "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, + ) ) return enabled_for_status_type @@ -652,9 +663,7 @@ def get_case_document_files( config = OpenZaakConfig.get_solo() documents = [] - for case_info_obj, info_obj in zip( - case_info_objects, info_objects, strict=False - ): + for case_info_obj, info_obj in zip(case_info_objects, info_objects): if not info_obj: continue if not is_info_object_visible( diff --git a/src/open_inwoner/components/templatetags/string_tags.py b/src/open_inwoner/components/templatetags/string_tags.py index 09948c31b1..5662f1c87f 100644 --- a/src/open_inwoner/components/templatetags/string_tags.py +++ b/src/open_inwoner/components/templatetags/string_tags.py @@ -25,7 +25,9 @@ def optional_paragraph(optional_text: str) -> str: if not optional_text: return "" return format_html( - f'

{linebreaksbr(optional_text)}

' + '

{optional_text}

'.format( + optional_text=linebreaksbr(optional_text) + ) ) diff --git a/src/open_inwoner/conf/base.py b/src/open_inwoner/conf/base.py index aa1223445e..580f33bd22 100644 --- a/src/open_inwoner/conf/base.py +++ b/src/open_inwoner/conf/base.py @@ -994,7 +994,7 @@ ) if ALLOWED_HOSTS: - BASE_URL = f"https://{ALLOWED_HOSTS[0]}" + BASE_URL = "https://{}".format(ALLOWED_HOSTS[0]) else: BASE_URL = "https://example.com" diff --git a/src/open_inwoner/conf/local_example.py b/src/open_inwoner/conf/local_example.py index 752855a406..15dea5dcdb 100644 --- a/src/open_inwoner/conf/local_example.py +++ b/src/open_inwoner/conf/local_example.py @@ -17,7 +17,7 @@ PLAYWRIGHT_MULTI_ONLY_DEFAULT = True # Enable django-debug-toolbar -from .dev import INSTALLED_APPS, MIDDLEWARE # noqa: E402 +from .dev import INSTALLED_APPS, MIDDLEWARE INSTALLED_APPS += ["debug_toolbar"] MIDDLEWARE += ["debug_toolbar.middleware.DebugToolbarMiddleware"] diff --git a/src/open_inwoner/configurations/admin.py b/src/open_inwoner/configurations/admin.py index a589b7344e..41b86c9c44 100644 --- a/src/open_inwoner/configurations/admin.py +++ b/src/open_inwoner/configurations/admin.py @@ -339,7 +339,14 @@ 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 = f"'{label1}' ({color1}) en '{label2}' ({color2}) hebben niet genoeg contrast: {round(ratio, 1)}:1 waar {expected_ratio}:1 wordt verwacht." + 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, + ) self.message_user(request, message, messages.WARNING) check_contrast_ratio( diff --git a/src/open_inwoner/configurations/models.py b/src/open_inwoner/configurations/models.py index eacc223f50..47e3d974c2 100644 --- a/src/open_inwoner/configurations/models.py +++ b/src/open_inwoner/configurations/models.py @@ -702,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 f"{path}/{filename}" + return "{path}/{filename}".format(path=path, filename=filename) def update_filename_body(self, filename: str) -> str: return CustomFontSet.update_filename( diff --git a/src/open_inwoner/openklant/api_models.py b/src/open_inwoner/openklant/api_models.py index b2dc137b6c..58c0803895 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, TypedDict +from typing import NotRequired, Optional, TypedDict, Union from zgw_consumers.api_models.base import ZGWModel @@ -63,11 +63,11 @@ class ContactMoment(ZGWModel): # eSuite OAS (compatible) url: str bronorganisatie: str - registratiedatum: datetime | None = None + registratiedatum: Optional[datetime] = None kanaal: str = "" tekst: str = "" # NOTE annoyingly we can't put MedewerkerIdentificatie here as type because of - medewerker_identificatie: dict | None = None + medewerker_identificatie: Optional[dict] = 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: str | None = None - volgend_contactmoment: str | None = None + vorig_contactmoment: Optional[str] = None + volgend_contactmoment: Optional[str] = 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: str | ContactMoment - klant: str | Klant + contactmoment: Union[str, ContactMoment] + klant: Union[str, Klant] rol: str # open-klant non-standard *AFWIJKING* @@ -138,6 +138,6 @@ class ObjectContactMoment(ZGWModel): Contactmomenten API """ - contactmoment: str | ContactMoment - object: str | Klant + contactmoment: Union[str, ContactMoment] + object: Union[str, Klant] object_type: str diff --git a/src/open_inwoner/openklant/services.py b/src/open_inwoner/openklant/services.py index d93f2a6eba..0badc29f95 100644 --- a/src/open_inwoner/openklant/services.py +++ b/src/open_inwoner/openklant/services.py @@ -1,9 +1,8 @@ import datetime import logging import uuid -from collections.abc import Iterable from datetime import timedelta -from typing import Literal, NotRequired, Protocol, Self +from typing import Iterable, Literal, NotRequired, Protocol, Self import glom from ape_pie.client import APIClient diff --git a/src/open_inwoner/openklant/tests/test_openklant2_service.py b/src/open_inwoner/openklant/tests/test_openklant2_service.py index 274df7d5df..820d618326 100644 --- a/src/open_inwoner/openklant/tests/test_openklant2_service.py +++ b/src/open_inwoner/openklant/tests/test_openklant2_service.py @@ -304,7 +304,9 @@ def test_update_partij_from_user(self): ) -QUESTION_DATE = datetime.datetime(2024, 10, 2, 14, 0, 25, 587564, tzinfo=datetime.UTC) +QUESTION_DATE = datetime.datetime( + 2024, 10, 2, 14, 0, 25, 587564, tzinfo=datetime.timezone.utc +) @tag("openklant2") diff --git a/src/open_inwoner/openzaak/api_models.py b/src/open_inwoner/openzaak/api_models.py index a011112d9e..d0506da7cb 100644 --- a/src/open_inwoner/openzaak/api_models.py +++ b/src/open_inwoner/openzaak/api_models.py @@ -2,7 +2,7 @@ import re from dataclasses import dataclass, field from datetime import date, datetime -from typing import Union +from typing import Optional, Union from dateutil.relativedelta import relativedelta from django.utils.translation import gettext as _ @@ -31,12 +31,12 @@ class Zaak(ZGWModel): registratiedatum: date startdatum: date vertrouwelijkheidaanduiding: str - status: Union[str, "Status"] | None - einddatum_gepland: date | None = None - uiterlijke_einddatum_afdoening: date | None = None + status: Optional[Union[str, "Status"]] + einddatum_gepland: Optional[date] = None + uiterlijke_einddatum_afdoening: Optional[date] = None # publicatiedatum: Optional[date] - einddatum: date | None = None - resultaat: Union[str, "Resultaat"] | None = None + einddatum: Optional[date] = None + resultaat: Optional[Union[str, "Resultaat"]] = None # relevante_andere_zaken: list # zaakgeometrie: dict @@ -154,21 +154,21 @@ class ZaakType(ZGWModel): # roltypen: list # besluittypen: list - begin_geldigheid: date | None = None - einde_geldigheid: date | None = None - versiedatum: date | None = None - concept: bool | None = None + begin_geldigheid: Optional[date] = None + einde_geldigheid: Optional[date] = None + versiedatum: Optional[date] = None + concept: Optional[bool] = None @dataclass class ZaakInformatieObject(ZGWModel): url: str informatieobject: Union[str, "InformatieObject"] - zaak: str | Zaak + zaak: Union[str, Zaak] # aard_relatie_weergave: str titel: str # beschrijving: str - registratiedatum: datetime | None + registratiedatum: Optional[datetime] @dataclass @@ -177,8 +177,8 @@ class InformatieObjectType(ZGWModel): catalogus: str omschrijving: str vertrouwelijkheidaanduiding: str - begin_geldigheid: date | None = None - einde_geldigheid: date | None = None + begin_geldigheid: Optional[date] = None + einde_geldigheid: Optional[date] = None concept: bool = False @@ -200,15 +200,15 @@ class InformatieObject(ZGWModel): inhoud: str bestandsomvang: int # indicatieGebruiksrecht: str - informatieobjecttype: str | InformatieObjectType + informatieobjecttype: Union[str, InformatieObjectType] locked: bool # bestandsdelen: List[str] - 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} + 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} @dataclass @@ -224,14 +224,14 @@ class Rol(ZGWModel): url: str zaak: str betrokkene_type: str - roltype: str | RolType + roltype: Union[str, RolType] omschrijving: str omschrijving_generiek: str roltoelichting: str - indicatie_machtiging: str | None = "" - registratiedatum: datetime | None = None - betrokkene: str | None = "" - betrokkene_identificatie: dict | None = None + indicatie_machtiging: Optional[str] = "" + registratiedatum: Optional[datetime] = None + betrokkene: Optional[str] = "" + betrokkene_identificatie: Optional[dict] = None def get_betrokkene_type_display(self): return RolTypes[self.betrokkene_type].label @@ -251,8 +251,8 @@ class ResultaatType(ZGWModel): omschrijving_generiek: str = "" toelichting: str = "" archiefnominatie: str = "" - archiefactietermijn: relativedelta | None = None - brondatum_archiefprocedure: dict | None = None + archiefactietermijn: Optional[relativedelta] = None + brondatum_archiefprocedure: Optional[dict] = None # E-suite compatibility # result description ("omschrijving") with >20 chars @@ -262,9 +262,9 @@ class ResultaatType(ZGWModel): @dataclass class Resultaat(ZGWModel): url: str - zaak: str | Zaak - resultaattype: str | ResultaatType - toelichting: str | None = "" + zaak: Union[str, Zaak] + resultaattype: Union[str, ResultaatType] + toelichting: Optional[str] = "" @dataclass @@ -272,21 +272,21 @@ class StatusType(ZGWModel): url: str # bug: not required according to OAS zaaktype: str omschrijving: str - volgnummer: int | None # not in eSuite + volgnummer: Optional[int] # not in eSuite omschrijving_generiek: str = "" statustekst: str = "" is_eindstatus: bool = False # not in eSuite - informeren: bool | None = False + informeren: Optional[bool] = False @dataclass class Status(ZGWModel): url: str - zaak: str | Zaak - statustype: str | StatusType - datum_status_gezet: datetime | None = None - statustoelichting: str | None = "" + zaak: Union[str, Zaak] + statustype: Union[str, StatusType] + datum_status_gezet: Optional[datetime] = None + statustoelichting: Optional[str] = "" @dataclass @@ -324,8 +324,8 @@ class OpenSubmission(Model): uuid: str naam: str datum_laatste_wijziging: datetime - vervolg_link: str | None = None - eind_datum_geldigheid: datetime | None = None + vervolg_link: Optional[str] = None + eind_datum_geldigheid: Optional[datetime] = None @property def identification(self) -> str: diff --git a/src/open_inwoner/openzaak/clients.py b/src/open_inwoner/openzaak/clients.py index 86c877d7d1..d880c1051d 100644 --- a/src/open_inwoner/openzaak/clients.py +++ b/src/open_inwoner/openzaak/clients.py @@ -2,10 +2,9 @@ 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, TypeAlias, TypeVar +from typing import Any, Literal, Mapping, Type, TypeAlias, TypeVar from ape_pie.client import APIClient from django.conf import settings @@ -883,7 +882,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 00e6e5904e..ff20d4b4f5 100644 --- a/src/open_inwoner/openzaak/exceptions.py +++ b/src/open_inwoner/openzaak/exceptions.py @@ -1,4 +1,4 @@ -from collections.abc import Sequence +from typing import Sequence class InvalidAuth(Exception): diff --git a/src/open_inwoner/openzaak/import_export.py b/src/open_inwoner/openzaak/import_export.py index 02d30098a1..6fbcc7a2cf 100644 --- a/src/open_inwoner/openzaak/import_export.py +++ b/src/open_inwoner/openzaak/import_export.py @@ -3,8 +3,7 @@ import json import logging from collections import defaultdict -from collections.abc import Generator -from typing import IO, Any, Self +from typing import IO, Any, Generator, Self from urllib.parse import urlparse from django.apps import apps @@ -184,7 +183,7 @@ def __iter__(self) -> Generator[QuerySet, Any, None]: ) def __eq__(self, other: QuerySet) -> bool: - for a, b in zip(self, other, strict=False): + for a, b in zip(self, other): if a.difference(b).exists(): return False return True diff --git a/src/open_inwoner/openzaak/tests/test_case_detail.py b/src/open_inwoner/openzaak/tests/test_case_detail.py index 0071a75850..969b8cb9a8 100644 --- a/src/open_inwoner/openzaak/tests/test_case_detail.py +++ b/src/open_inwoner/openzaak/tests/test_case_detail.py @@ -1030,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"], strict=False): + for link, question in zip(links, case["questions"]): self.assertEqual( link.attrib["href"], reverse( @@ -1152,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"], strict=False): + for link, question in zip(links, case["questions"]): self.assertEqual( link.attrib["href"], reverse( @@ -1701,7 +1701,7 @@ def test_access_as_vestiging_when_only_role_for_vestiging(self, m): response = self.client.get(self.case_detail_url) - self.assertEqual(response.status_code, 200) + self.assertEquals(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_import_export.py b/src/open_inwoner/openzaak/tests/test_import_export.py index e6a0462d02..31e9df5fac 100644 --- a/src/open_inwoner/openzaak/tests/test_import_export.py +++ b/src/open_inwoner/openzaak/tests/test_import_export.py @@ -137,7 +137,6 @@ 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_zgw_imports.py b/src/open_inwoner/openzaak/tests/test_zgw_imports.py index e6eb4f923f..06cdff68d9 100644 --- a/src/open_inwoner/openzaak/tests/test_zgw_imports.py +++ b/src/open_inwoner/openzaak/tests/test_zgw_imports.py @@ -218,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, strict=False): + for i, root in zip((0, 2), self.roots): 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_iotypes.py b/src/open_inwoner/openzaak/tests/test_zgw_imports_iotypes.py index 0d4c407316..b7852e942b 100644 --- a/src/open_inwoner/openzaak/tests/test_zgw_imports_iotypes.py +++ b/src/open_inwoner/openzaak/tests/test_zgw_imports_iotypes.py @@ -318,7 +318,6 @@ 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,7 +419,6 @@ 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/plans/views.py b/src/open_inwoner/plans/views.py index a83e8d1e4d..7c6c704c70 100644 --- a/src/open_inwoner/plans/views.py +++ b/src/open_inwoner/plans/views.py @@ -434,7 +434,7 @@ def get_object(self): return Plan.objects.connected(self.request.user).get( uuid=self.kwargs.get("uuid") ) - except ObjectDoesNotExist: + except ObjectDoesNotExist as e: raise Http404 def form_valid(self, form): @@ -485,7 +485,7 @@ def get_plan(self): return Plan.objects.connected(self.request.user).get( uuid=self.kwargs.get("plan_uuid") ) - except ObjectDoesNotExist: + except ObjectDoesNotExist as e: raise Http404 def form_valid(self, form): @@ -519,7 +519,7 @@ def get_plan(self): return Plan.objects.connected(self.request.user).get( uuid=self.kwargs.get("plan_uuid") ) - except ObjectDoesNotExist: + except ObjectDoesNotExist as e: raise Http404 def get_template_tag_args(self, context): @@ -534,7 +534,7 @@ def get_plan(self): return Plan.objects.connected(self.request.user).get( uuid=self.kwargs.get("plan_uuid") ) - except ObjectDoesNotExist: + except ObjectDoesNotExist as e: raise Http404 def get_success_url(self) -> str: @@ -577,7 +577,7 @@ def get_plan(self): return Plan.objects.connected(self.request.user).get( uuid=self.kwargs.get("plan_uuid") ) - except ObjectDoesNotExist: + except ObjectDoesNotExist as e: raise Http404 diff --git a/src/open_inwoner/questionnaire/admin.py b/src/open_inwoner/questionnaire/admin.py index 0f800e9325..3449e6bc54 100644 --- a/src/open_inwoner/questionnaire/admin.py +++ b/src/open_inwoner/questionnaire/admin.py @@ -103,14 +103,14 @@ class QuestionnaireStepAdmin(TreeAdmin): def display_question_answer(self, obj): redirect = "" if obj.redirect_to: - redirect = ( - f" - doorsturen -> {obj.redirect_to.question} - {obj.redirect_to.id}" + redirect = " - doorsturen -> {} - {}".format( + obj.redirect_to.question, obj.redirect_to.id ) - postfix = f" ({obj.id} - {obj.code}{redirect})" + postfix = " ({} - {}{})".format(obj.id, obj.code, redirect) if not obj.parent_answer: return obj.question + postfix - return f"{obj.parent_answer} -> {obj.question}" + postfix + return "{} -> {}".format(obj.parent_answer, obj.question) + postfix display_question_answer.allow_tags = True diff --git a/src/open_inwoner/questionnaire/models.py b/src/open_inwoner/questionnaire/models.py index a61006f114..cf7b91c4a4 100644 --- a/src/open_inwoner/questionnaire/models.py +++ b/src/open_inwoner/questionnaire/models.py @@ -109,7 +109,7 @@ class Meta: ordering = ("path",) def __str__(self) -> str: - return f"({self.id} - {self.code}) {self.question}" + return "({} - {}) {}".format(self.id, self.code, self.question) def get_absolute_url(self) -> str: if self.is_root(): diff --git a/src/open_inwoner/search/results.py b/src/open_inwoner/search/results.py index 26b249a5b4..f9a7298e91 100644 --- a/src/open_inwoner/search/results.py +++ b/src/open_inwoner/search/results.py @@ -1,6 +1,7 @@ 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 @@ -27,7 +28,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/ssd/templatetags/ssd_tags.py b/src/open_inwoner/ssd/templatetags/ssd_tags.py index 0b8445989c..64e85d3a65 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 f"{float(value) / 100:.2f}".replace(".", ",") + return "{:.2f}".format(float(value) / 100).replace(".", ",") except ValueError: return "" diff --git a/src/open_inwoner/utils/admin.py b/src/open_inwoner/utils/admin.py index 2809321495..45df3a890e 100644 --- a/src/open_inwoner/utils/admin.py +++ b/src/open_inwoner/utils/admin.py @@ -120,7 +120,9 @@ def object_link(self, obj): ct = obj.content_type try: url = reverse( - (f"admin:{ct.app_label}_{ct.model}_change"), + ("admin:{app_label}_{model}_change").format( + app_label=ct.app_label, model=ct.model + ), args=[obj.object_id], ) link = format_html( diff --git a/src/open_inwoner/utils/decorators.py b/src/open_inwoner/utils/decorators.py index 249cbedfde..593787e913 100644 --- a/src/open_inwoner/utils/decorators.py +++ b/src/open_inwoner/utils/decorators.py @@ -80,16 +80,14 @@ 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, strict=False) - ) + defaults = dict(zip(argspec.args[positional_count:], argspec.defaults)) else: defaults = {} @wraps(func) def wrapped(*args, **kwargs) -> RT: key_kwargs = defaults.copy() - named_args = dict(zip(argspec.args, args, strict=False), **kwargs) + named_args = dict(zip(argspec.args, args), **kwargs) key_kwargs.update(**named_args) if argspec.varkw: diff --git a/src/open_inwoner/utils/geocode.py b/src/open_inwoner/utils/geocode.py index c1f06da923..cc6b48205a 100644 --- a/src/open_inwoner/utils/geocode.py +++ b/src/open_inwoner/utils/geocode.py @@ -39,7 +39,7 @@ def __init__( ) self.domain = domain.strip("/") - self.api = f"{self.scheme}://{self.domain}{self.geocode_path}" + self.api = "{}://{}{}".format(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 5de1f85f5e..2c8a2c42a3 100644 --- a/src/open_inwoner/utils/logentry.py +++ b/src/open_inwoner/utils/logentry.py @@ -67,7 +67,11 @@ def addition(request, object, message=""): """ Log that an object has been successfully added. """ - logger.info(f"Added: {object}, {message}. \n{request}") + logger.info( + ("Added: {object}, {message}. \n{request}").format( + object=object, message=message, request=request + ) + ) TimelineLog.log_from_request( request=request, content_object=object, @@ -82,7 +86,11 @@ def change(request, object, message): """ Log that an object has been successfully changed. """ - logger.info(f"Changed: {object}, {message}. \n{request}") + logger.info( + ("Changed: {object}, {message}. \n{request}").format( + object=object, message=message, request=request + ) + ) TimelineLog.log_from_request( request=request, content_object=object, @@ -97,7 +105,11 @@ def deletion(request, object, message=""): """ Log that an object was deleted. """ - logger.info(f"Deleted: {object}, {message}. \n{request}") + logger.info( + ("Deleted: {object}, {message}. \n{request}").format( + object=object, message=message, request=request + ) + ) TimelineLog.log_from_request( request=request, content_object=object, @@ -113,7 +125,11 @@ 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(f"User action: {object}, {message}. \n{request}") + logger.info( + ("User action: {object}, {message}. \n{request}").format( + object=object, message=message, request=request + ) + ) TimelineLog.log_from_request( request=request, content_object=object, diff --git a/src/open_inwoner/utils/mixins.py b/src/open_inwoner/utils/mixins.py index a0c8f6e1cc..cb47908a57 100644 --- a/src/open_inwoner/utils/mixins.py +++ b/src/open_inwoner/utils/mixins.py @@ -41,7 +41,11 @@ def create_throttle_key(self): :rtype string Use as key to save the last access """ - return f"throttling_{self.get_throttle_identifier()}_{self.throttle_name}_{self.get_throttle_window()}" + return "throttling_{id}_{throttle_name}_{window}".format( + id=self.get_throttle_identifier(), + throttle_name=self.throttle_name, + window=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 15c40c23fb..9ccca0a6ff 100644 --- a/src/open_inwoner/utils/schema.py +++ b/src/open_inwoner/utils/schema.py @@ -1,10 +1,12 @@ +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/templatetags/utils.py b/src/open_inwoner/utils/templatetags/utils.py index db448d047b..83a82696a5 100644 --- a/src/open_inwoner/utils/templatetags/utils.py +++ b/src/open_inwoner/utils/templatetags/utils.py @@ -58,7 +58,7 @@ def placekitten(width=800, height=600): {%placekitten %} {%placekitten 200 200 %} """ - return format_html(f'') + return format_html(''.format(placekitten_src(width, height))) @register.simple_tag @@ -71,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 f"//placekitten.com/{width}/{height}" + return "//placekitten.com/{}/{}".format(width, height) @register.simple_tag diff --git a/src/open_inwoner/utils/tests/test_glom.py b/src/open_inwoner/utils/tests/test_glom.py index b497588d22..013b43f439 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.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) + 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) diff --git a/src/open_inwoner/utils/text.py b/src/open_inwoner/utils/text.py index 021df0e26c..046a56394c 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 = f"<{tag}>{{}}" + html_tag = "<{}>{{}}".format(tag, tag) replace = { name: format_html(html_tag, force_str(value)) for name, value in kwargs.items() } diff --git a/src/open_inwoner/utils/validators.py b/src/open_inwoner/utils/validators.py index 69f32bb724..c7a0aa739b 100644 --- a/src/open_inwoner/utils/validators.py +++ b/src/open_inwoner/utils/validators.py @@ -128,7 +128,7 @@ def __call__(self, value): Validates that the input matches the regular expression. """ if not self.regex.search(force_str(value)): - message = f"{self.message}: {force_str(value)}" + message = "{}: {}".format(self.message, force_str(value)) raise ValidationError(message, code=self.code) diff --git a/src/openklant2/_resources/base.py b/src/openklant2/_resources/base.py index 8a1da7bcb9..c4fb99dce9 100644 --- a/src/openklant2/_resources/base.py +++ b/src/openklant2/_resources/base.py @@ -1,8 +1,14 @@ 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, @@ -36,8 +42,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") @@ -113,7 +119,7 @@ def _process_params(params: Mapping | None) -> None | Mapping: def _paginator( self, paginated_data: PaginatedResponseBody[T], - max_requests: int | None = None, + max_requests: Optional[int] = None, ) -> Generator[T, Any, None]: def row_iterator( _data: PaginatedResponseBody[T], num_requests=0 diff --git a/src/openklant2/_resources/partij.py b/src/openklant2/_resources/partij.py index 776c9ca9e8..4016635211 100644 --- a/src/openklant2/_resources/partij.py +++ b/src/openklant2/_resources/partij.py @@ -1,5 +1,5 @@ import uuid -from typing import cast +from typing import Optional, 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: PartijRetrieveParams | None = None + self, /, uuid: str | uuid.UUID, *, params: Optional[PartijRetrieveParams] = 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 69c8cc6862..e27541d505 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) - cls.post_generation_validator = validate + setattr(cls, "post_generation_validator", validate) return cls diff --git a/src/openklant2/tests/test_partij.py b/src/openklant2/tests/test_partij.py index 7dadaf1e80..11f1b006dd 100644 --- a/src/openklant2/tests/test_partij.py +++ b/src/openklant2/tests/test_partij.py @@ -93,6 +93,7 @@ def test_create_persoon(client) -> None: "digitaleAdressen": None, "rekeningnummers": None, "voorkeursRekeningnummer": None, + "soortPartij": "persoon", "voorkeurstaal": "nld", "indicatieActief": True, "indicatieGeheimhouding": False, diff --git a/src/openklant2/types/resources/klant_contact.py b/src/openklant2/types/resources/klant_contact.py index 09fb8fe410..98e10435ad 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, Required +from typing import Literal, NotRequired, Optional, Required from pydantic import TypeAdapter from typing_extensions import TypedDict @@ -79,7 +79,7 @@ class KlantContact(TypedDict): nummer: str kanaal: str onderwerp: str - inhoud: str | None + inhoud: Optional[str] indicatieContactGelukt: Required[bool | None] taal: LanguageCode From 82d940379dcd3598d2e5ed37cd696ac339e1c227 Mon Sep 17 00:00:00 2001 From: Sidney Richards Date: Tue, 7 Jan 2025 09:14:11 +0100 Subject: [PATCH 04/11] fixup! fixup! fixup! [WIP] pre-commit and ruff --- src/open_inwoner/conf/local_example.py | 2 +- src/openklant2/tests/test_partij.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/open_inwoner/conf/local_example.py b/src/open_inwoner/conf/local_example.py index 15dea5dcdb..752855a406 100644 --- a/src/open_inwoner/conf/local_example.py +++ b/src/open_inwoner/conf/local_example.py @@ -17,7 +17,7 @@ PLAYWRIGHT_MULTI_ONLY_DEFAULT = True # Enable django-debug-toolbar -from .dev import INSTALLED_APPS, MIDDLEWARE +from .dev import INSTALLED_APPS, MIDDLEWARE # noqa: E402 INSTALLED_APPS += ["debug_toolbar"] MIDDLEWARE += ["debug_toolbar.middleware.DebugToolbarMiddleware"] diff --git a/src/openklant2/tests/test_partij.py b/src/openklant2/tests/test_partij.py index 11f1b006dd..7dadaf1e80 100644 --- a/src/openklant2/tests/test_partij.py +++ b/src/openklant2/tests/test_partij.py @@ -93,7 +93,6 @@ def test_create_persoon(client) -> None: "digitaleAdressen": None, "rekeningnummers": None, "voorkeursRekeningnummer": None, - "soortPartij": "persoon", "voorkeurstaal": "nld", "indicatieActief": True, "indicatieGeheimhouding": False, From 9be47958f651e5a347c7a7fa0f9f3b591154289f Mon Sep 17 00:00:00 2001 From: Sidney Richards Date: Tue, 7 Jan 2025 09:43:24 +0100 Subject: [PATCH 05/11] fixup! fixup! fixup! fixup! [WIP] pre-commit and ruff --- requirements/dev.in | 2 ++ requirements/dev.txt | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/requirements/dev.in b/requirements/dev.in index aa757d1dda..ad62e39df8 100644 --- a/requirements/dev.in +++ b/requirements/dev.in @@ -16,3 +16,5 @@ django-silk # VCR pytest-recording vcrpy + +pre-commit \ No newline at end of file diff --git a/requirements/dev.txt b/requirements/dev.txt index ad01732463..37c58145dd 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -126,6 +126,8 @@ cffi==1.15.0 # -r requirements/ci.txt # cryptography # weasyprint +cfgv==3.4.0 + # via pre-commit charset-normalizer==2.0.6 # via # -c requirements/ci.txt @@ -220,6 +222,8 @@ dill==0.3.7 # -c requirements/ci.txt # -r requirements/ci.txt # pylint +distlib==0.3.9 + # via virtualenv django==4.2.16 # via # -c requirements/ci.txt @@ -651,6 +655,8 @@ faker==27.0.0 # factory-boy # polyfactory # zgw-consumers-oas +filelock==3.16.1 + # via virtualenv flake8==7.0.0 # via # -c requirements/ci.txt @@ -731,6 +737,8 @@ humanfriendly==10.0 # via # -c requirements/ci.txt # -r requirements/ci.txt +identify==2.6.5 + # via pre-commit idna==3.7 # via # -c requirements/ci.txt @@ -870,6 +878,8 @@ mypy-extensions==1.0.0 # -c requirements/ci.txt # -r requirements/ci.txt # black +nodeenv==1.9.1 + # via pre-commit notifications-api-common==0.2.2 # via # -c requirements/ci.txt @@ -939,6 +949,7 @@ platformdirs==2.4.0 # -r requirements/ci.txt # black # pylint + # virtualenv playwright==1.47.0 # via # -c requirements/ci.txt @@ -952,6 +963,8 @@ polyfactory==2.13.0 # via # -c requirements/ci.txt # -r requirements/ci.txt +pre-commit==4.0.1 + # via -r requirements/dev.in prompt-toolkit==3.0.36 # via # -c requirements/ci.txt @@ -1099,6 +1112,7 @@ pyyaml==6.0.2 # bandit # drf-spectacular # gemma-zds-client + # pre-commit # pydantic-settings # tablib # vcrpy @@ -1327,6 +1341,8 @@ vine==5.1.0 # amqp # celery # kombu +virtualenv==20.21.1 + # via pre-commit waitress==2.1.2 # via # -c requirements/ci.txt From cc712805e83ea697c1c2ef14ec12455f308b31b1 Mon Sep 17 00:00:00 2001 From: Sidney Richards Date: Tue, 7 Jan 2025 09:44:22 +0100 Subject: [PATCH 06/11] fixup! fixup! fixup! fixup! fixup! [WIP] pre-commit and ruff --- .github/workflows/code-quality.yml | 29 +++++++++++++++++++++++++++-- .github/workflows/pre-commit.yml | 29 ----------------------------- 2 files changed, 27 insertions(+), 31 deletions(-) delete mode 100644 .github/workflows/pre-commit.yml diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml index ad2a55584a..cd0c251845 100644 --- a/.github/workflows/code-quality.yml +++ b/.github/workflows/code-quality.yml @@ -94,8 +94,7 @@ jobs: ports: - 5432:5432 # Needed because the postgres container does not provide a healthcheck - options: - --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 + options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 steps: - uses: actions/checkout@v3 @@ -154,3 +153,29 @@ jobs: - name: Run Bandit run: | bandit -r ./src/ -x tests,conf/utils.py -s B101 + + pre-commit: + name: Pre-commit hooks + 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 }} diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml deleted file mode 100644 index 1c182c1eeb..0000000000 --- a/.github/workflows/pre-commit.yml +++ /dev/null @@ -1,29 +0,0 @@ -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 }} From b8faf1ea9b5595fd9be1d5ed5e9b38c9457dcf2b Mon Sep 17 00:00:00 2001 From: Sidney Richards Date: Tue, 7 Jan 2025 09:53:23 +0100 Subject: [PATCH 07/11] fixup! fixup! fixup! fixup! fixup! fixup! [WIP] pre-commit and ruff --- .github/workflows/code-quality.yml | 7 ++----- requirements/dev.in | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml index cd0c251845..b59c0ae7ca 100644 --- a/.github/workflows/code-quality.yml +++ b/.github/workflows/code-quality.yml @@ -159,13 +159,10 @@ jobs: 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' + python-version: '3.11' - name: Install pre-commit run: pip install pre-commit @@ -175,7 +172,7 @@ jobs: run: | echo "files=$(git diff --name-only origin/main...HEAD | tr '\n' ' ')" >> $GITHUB_OUTPUT - - name: Run pre-commit + - name: Run pre-commit on changed files continue-on-error: true run: | pre-commit run --files ${{ steps.changed-files.outputs.files }} diff --git a/requirements/dev.in b/requirements/dev.in index ad62e39df8..8fb2cf03bf 100644 --- a/requirements/dev.in +++ b/requirements/dev.in @@ -17,4 +17,4 @@ django-silk pytest-recording vcrpy -pre-commit \ No newline at end of file +pre-commit From 83319d373a066d88a3d83887f2a2ff78124667cf Mon Sep 17 00:00:00 2001 From: Sidney Richards Date: Tue, 7 Jan 2025 09:54:26 +0100 Subject: [PATCH 08/11] fixup! fixup! fixup! fixup! fixup! fixup! fixup! [WIP] pre-commit and ruff --- .github/workflows/code-quality.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml index b59c0ae7ca..a5d172d7ee 100644 --- a/.github/workflows/code-quality.yml +++ b/.github/workflows/code-quality.yml @@ -170,7 +170,7 @@ jobs: - name: Get changed files id: changed-files run: | - echo "files=$(git diff --name-only origin/main...HEAD | tr '\n' ' ')" >> $GITHUB_OUTPUT + echo "files=$(git diff --name-only origin/develop...HEAD | tr '\n' ' ')" >> $GITHUB_OUTPUT - name: Run pre-commit on changed files continue-on-error: true From d51dce7440b18d749928d93f2cdc36a7b1380ee2 Mon Sep 17 00:00:00 2001 From: Sidney Richards Date: Tue, 7 Jan 2025 13:51:17 +0100 Subject: [PATCH 09/11] fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! [WIP] pre-commit and ruff --- .pre-commit-config.yaml | 11 ++++++- .../accounts/notifications/typing.py | 3 +- src/open_inwoner/accounts/tests/test_auth.py | 30 +++++++++---------- src/open_inwoner/cms/cases/forms.py | 6 ++-- src/open_inwoner/cms/cases/views/status.py | 6 ++-- src/open_inwoner/cms/extensions/cms_menus.py | 3 +- .../components/templatetags/action_tags.py | 6 ++-- .../configurations/bootstrap/cms.py | 3 +- .../configurations/bootstrap/siteconfig.py | 3 +- src/open_inwoner/openklant/services.py | 18 +++++------ src/open_inwoner/openzaak/admin.py | 12 ++++---- .../test_notification_zaak_infoobject.py | 6 ++-- src/open_inwoner/openzaak/types.py | 3 +- src/open_inwoner/pdc/managers.py | 6 ++-- src/open_inwoner/utils/validators.py | 3 +- 15 files changed, 65 insertions(+), 54 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 154fdc1908..e179429ddc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,4 +16,13 @@ repos: - id: ruff args: [--fix] # Run the formatter. - - id: ruff-format + # - id: ruff-format + - repo: https://github.com/pycqa/flake8 + rev: 7.0.0 + hooks: + - id: flake8 + - repo: https://github.com/psf/black-pre-commit-mirror + rev: 22.12.0 + hooks: + - id: black + language_version: python3.11 diff --git a/src/open_inwoner/accounts/notifications/typing.py b/src/open_inwoner/accounts/notifications/typing.py index a54a78552e..23dfa92ac6 100644 --- a/src/open_inwoner/accounts/notifications/typing.py +++ b/src/open_inwoner/accounts/notifications/typing.py @@ -4,4 +4,5 @@ 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/test_auth.py b/src/open_inwoner/accounts/tests/test_auth.py index 2c4680e3b9..ddaa9c711c 100644 --- a/src/open_inwoner/accounts/tests/test_auth.py +++ b/src/open_inwoner/accounts/tests/test_auth.py @@ -152,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") @@ -179,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") @@ -283,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"]) @@ -668,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") @@ -722,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/cms/cases/forms.py b/src/open_inwoner/cms/cases/forms.py index c8988759c1..f21ac5a228 100644 --- a/src/open_inwoner/cms/cases/forms.py +++ b/src/open_inwoner/cms/cases/forms.py @@ -37,10 +37,8 @@ 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/views/status.py b/src/open_inwoner/cms/cases/views/status.py index b35bddef71..436801886e 100644 --- a/src/open_inwoner/cms/cases/views/status.py +++ b/src/open_inwoner/cms/cases/views/status.py @@ -911,9 +911,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/extensions/cms_menus.py b/src/open_inwoner/cms/extensions/cms_menus.py index 6ea41c4b75..7a2f71853e 100644 --- a/src/open_inwoner/cms/extensions/cms_menus.py +++ b/src/open_inwoner/cms/extensions/cms_menus.py @@ -35,8 +35,7 @@ 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/components/templatetags/action_tags.py b/src/open_inwoner/components/templatetags/action_tags.py index 4892e01e28..83e83cf5f3 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/configurations/bootstrap/cms.py b/src/open_inwoner/configurations/bootstrap/cms.py index 78022e70f8..4685c47fb3 100644 --- a/src/open_inwoner/configurations/bootstrap/cms.py +++ b/src/open_inwoner/configurations/bootstrap/cms.py @@ -60,7 +60,8 @@ 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): diff --git a/src/open_inwoner/configurations/bootstrap/siteconfig.py b/src/open_inwoner/configurations/bootstrap/siteconfig.py index 40dc40203b..123676ff61 100644 --- a/src/open_inwoner/configurations/bootstrap/siteconfig.py +++ b/src/open_inwoner/configurations/bootstrap/siteconfig.py @@ -149,4 +149,5 @@ def configure(self): form.save() - def test_configuration(self): ... + def test_configuration(self): + ... diff --git a/src/open_inwoner/openklant/services.py b/src/open_inwoner/openklant/services.py index 0badc29f95..f6764b6e4a 100644 --- a/src/open_inwoner/openklant/services.py +++ b/src/open_inwoner/openklant/services.py @@ -305,18 +305,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 @@ -1252,9 +1252,9 @@ 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"]: diff --git a/src/open_inwoner/openzaak/admin.py b/src/open_inwoner/openzaak/admin.py index d1bfc6cb7f..d67ca145d8 100644 --- a/src/open_inwoner/openzaak/admin.py +++ b/src/open_inwoner/openzaak/admin.py @@ -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/tests/test_notification_zaak_infoobject.py b/src/open_inwoner/openzaak/tests/test_notification_zaak_infoobject.py index 40c8dbb897..ac148e0d41 100644 --- a/src/open_inwoner/openzaak/tests/test_notification_zaak_infoobject.py +++ b/src/open_inwoner/openzaak/tests/test_notification_zaak_infoobject.py @@ -292,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/types.py b/src/open_inwoner/openzaak/types.py index bbb3102567..ccecb11a7a 100644 --- a/src/open_inwoner/openzaak/types.py +++ b/src/open_inwoner/openzaak/types.py @@ -9,7 +9,8 @@ class UniformCase(Protocol): """ @property - def identification(self) -> str: ... + def identification(self) -> str: + ... def process_data(self) -> dict: """ diff --git a/src/open_inwoner/pdc/managers.py b/src/open_inwoner/pdc/managers.py index 48390665be..ac0bf8a4d4 100644 --- a/src/open_inwoner/pdc/managers.py +++ b/src/open_inwoner/pdc/managers.py @@ -93,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/utils/validators.py b/src/open_inwoner/utils/validators.py index c7a0aa739b..a651a63c72 100644 --- a/src/open_inwoner/utils/validators.py +++ b/src/open_inwoner/utils/validators.py @@ -14,7 +14,8 @@ class ParsePhoneNumber(Protocol): - def __call__(self, value: str) -> "PhoneNumber": ... # pragma: nocover + def __call__(self, value: str) -> "PhoneNumber": + ... # pragma: nocover @deconstructible From 44cdbf70a086e2df1602409b033ab4b9b5916bef Mon Sep 17 00:00:00 2001 From: Sidney Richards Date: Tue, 7 Jan 2025 13:57:38 +0100 Subject: [PATCH 10/11] fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! [WIP] pre-commit and ruff --- .github/workflows/code-quality.yml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml index a5d172d7ee..2b83b774a5 100644 --- a/.github/workflows/code-quality.yml +++ b/.github/workflows/code-quality.yml @@ -167,12 +167,5 @@ jobs: - name: Install pre-commit run: pip install pre-commit - - name: Get changed files - id: changed-files - run: | - echo "files=$(git diff --name-only origin/develop...HEAD | tr '\n' ' ')" >> $GITHUB_OUTPUT - - - name: Run pre-commit on changed files - continue-on-error: true - run: | - pre-commit run --files ${{ steps.changed-files.outputs.files }} + - name: Run pre-commit on all files + run: pre-commit run --all-files From b906fc313d5cea5c2ab0eae07fb60d0ad69c2855 Mon Sep 17 00:00:00 2001 From: Sidney Richards Date: Tue, 7 Jan 2025 14:14:01 +0100 Subject: [PATCH 11/11] fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! [WIP] pre-commit and ruff --- .pre-commit-config.yaml | 2 ++ ruff.toml | 34 +++---------------- .../tests/test_notify_expiring_actions.py | 2 +- src/open_inwoner/cms/cases/views/services.py | 2 +- src/open_inwoner/cms/cases/views/status.py | 4 ++- src/open_inwoner/openzaak/import_export.py | 2 +- .../openzaak/tests/test_case_detail.py | 4 +-- .../openzaak/tests/test_import_export.py | 1 + .../openzaak/tests/test_zgw_imports.py | 2 +- .../tests/test_zgw_imports_iotypes.py | 2 ++ src/open_inwoner/utils/decorators.py | 6 ++-- src/openklant2/factories/helpers.py | 2 +- 12 files changed, 23 insertions(+), 40 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e179429ddc..a51cb9136a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,6 +15,7 @@ repos: # Run the linter. - id: ruff args: [--fix] + types: [file, python] # Run the formatter. # - id: ruff-format - repo: https://github.com/pycqa/flake8 @@ -26,3 +27,4 @@ repos: hooks: - id: black language_version: python3.11 + types: [file, python] diff --git a/ruff.toml b/ruff.toml index ac9b9b5c5b..0e61dce5bb 100644 --- a/ruff.toml +++ b/ruff.toml @@ -26,6 +26,7 @@ exclude = [ "node_modules", "site-packages", "venv", + "env", ] # Same as Black. @@ -37,12 +38,12 @@ target-version = "py311" [lint] select = [ - # https://docs.astral.sh/ruff/rules/#pyflakes-f + # https://docs.astral.sh/ruff/rules/#error-e "E", # https://docs.astral.sh/ruff/rules/#pyflakes-f "F", - # https://docs.astral.sh/ruff/rules/#isort-i - "I", + # Bugbear + "B", ] ignore = [ # Whitespace before ':' (conflicts with Black) @@ -72,30 +73,3 @@ 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" 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/cms/cases/views/services.py b/src/open_inwoner/cms/cases/views/services.py index 7de2b4df64..42e3891d72 100644 --- a/src/open_inwoner/cms/cases/views/services.py +++ b/src/open_inwoner/cms/cases/views/services.py @@ -265,7 +265,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 436801886e..5e4b9fde9f 100644 --- a/src/open_inwoner/cms/cases/views/status.py +++ b/src/open_inwoner/cms/cases/views/status.py @@ -663,7 +663,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( diff --git a/src/open_inwoner/openzaak/import_export.py b/src/open_inwoner/openzaak/import_export.py index 6fbcc7a2cf..952c26df39 100644 --- a/src/open_inwoner/openzaak/import_export.py +++ b/src/open_inwoner/openzaak/import_export.py @@ -183,7 +183,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/tests/test_case_detail.py b/src/open_inwoner/openzaak/tests/test_case_detail.py index 969b8cb9a8..e500650a89 100644 --- a/src/open_inwoner/openzaak/tests/test_case_detail.py +++ b/src/open_inwoner/openzaak/tests/test_case_detail.py @@ -1030,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( @@ -1152,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( 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_zgw_imports.py b/src/open_inwoner/openzaak/tests/test_zgw_imports.py index 06cdff68d9..e6eb4f923f 100644 --- a/src/open_inwoner/openzaak/tests/test_zgw_imports.py +++ b/src/open_inwoner/openzaak/tests/test_zgw_imports.py @@ -218,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_iotypes.py b/src/open_inwoner/openzaak/tests/test_zgw_imports_iotypes.py index b7852e942b..0d4c407316 100644 --- a/src/open_inwoner/openzaak/tests/test_zgw_imports_iotypes.py +++ b/src/open_inwoner/openzaak/tests/test_zgw_imports_iotypes.py @@ -318,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] @@ -419,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/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/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