diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6f054d5472a..6a0360fe6ca 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -30,7 +30,7 @@ repos: - repo: https://github.com/abravalheri/validate-pyproject - rev: v0.15 + rev: v0.16 hooks: - id: validate-pyproject files: pyproject.toml$ @@ -44,24 +44,24 @@ repos: additional_dependencies: ["rstcheck[sphinx]"] - repo: https://github.com/MarketSquare/robotframework-tidy - rev: "4.8.1" + rev: "4.11.0" hooks: - id: robotidy - repo: https://github.com/jendrikseipp/vulture - rev: v2.10 + rev: v2.11 hooks: - id: vulture exclude: | /tests/ - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: 'v0.1.13' + rev: 'v0.3.4' hooks: - id: ruff - repo: https://github.com/asottile/pyupgrade - rev: v3.15.0 + rev: v3.15.2 hooks: - id: pyupgrade args: [--py310-plus] @@ -73,12 +73,12 @@ repos: args: [--target-version, "4.2"] - repo: https://github.com/psf/black - rev: "23.12.1" + rev: "24.3.0" hooks: - id: black - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.8.0 + rev: v1.9.0 hooks: - id: mypy additional_dependencies: ['types-PyYAML', 'types-cachetools', 'types-retry', 'pydantic', 'pynacl', 'httpx'] @@ -145,7 +145,7 @@ repos: exclude: '^rocky/rocky/templates/admin/.*\.html$' - repo: https://github.com/thibaudcolas/pre-commit-stylelint - rev: v16.1.0 + rev: v16.3.0 hooks: - id: stylelint args: [ --fix ] @@ -155,13 +155,13 @@ repos: files: "^(rocky\/assets\/css\/|docs\/source\/).*.(css|scss|sass)$" - repo: https://github.com/shellcheck-py/shellcheck-py - rev: v0.9.0.6 + rev: v0.10.0.1 hooks: - id: shellcheck args: ["-e", "SC1091"] - repo: https://github.com/scop/pre-commit-shfmt - rev: v3.7.0-4 + rev: v3.8.0-1 hooks: - id: shfmt args: ["-w", "-s", "-i", "4", "-sr"] diff --git a/boefjes/boefjes/migrations/versions/0001_add_katalogus_models.py b/boefjes/boefjes/migrations/versions/0001_add_katalogus_models.py index 215574773b8..2a9cfd11232 100644 --- a/boefjes/boefjes/migrations/versions/0001_add_katalogus_models.py +++ b/boefjes/boefjes/migrations/versions/0001_add_katalogus_models.py @@ -5,6 +5,7 @@ Create Date: 2022-05-18 14:19:15.882901 """ + import sqlalchemy as sa from alembic import op diff --git a/boefjes/boefjes/migrations/versions/0002_change_lengths_of_several_char_fields.py b/boefjes/boefjes/migrations/versions/0002_change_lengths_of_several_char_fields.py index 26aff48a1d9..34996310e2a 100644 --- a/boefjes/boefjes/migrations/versions/0002_change_lengths_of_several_char_fields.py +++ b/boefjes/boefjes/migrations/versions/0002_change_lengths_of_several_char_fields.py @@ -5,6 +5,7 @@ Create Date: 2022-09-06 10:13:48.622901 """ + import sqlalchemy as sa from alembic import op diff --git a/boefjes/boefjes/migrations/versions/0003_longer_plugin_ids.py b/boefjes/boefjes/migrations/versions/0003_longer_plugin_ids.py index 3c8f32abc30..a219b0c39df 100644 --- a/boefjes/boefjes/migrations/versions/0003_longer_plugin_ids.py +++ b/boefjes/boefjes/migrations/versions/0003_longer_plugin_ids.py @@ -5,6 +5,7 @@ Create Date: 2022-09-06 10:13:48.622901 """ + import sqlalchemy as sa from alembic import op diff --git a/boefjes/boefjes/migrations/versions/197672984df0_make_organisation_code_field_larger.py b/boefjes/boefjes/migrations/versions/197672984df0_make_organisation_code_field_larger.py index 5d24cebb5ec..f9849b88f0b 100644 --- a/boefjes/boefjes/migrations/versions/197672984df0_make_organisation_code_field_larger.py +++ b/boefjes/boefjes/migrations/versions/197672984df0_make_organisation_code_field_larger.py @@ -5,6 +5,7 @@ Create Date: 2022-12-12 13:22:07.119970 """ + import sqlalchemy as sa from alembic import op diff --git a/boefjes/boefjes/migrations/versions/cd34fdfafdaf_json_settings_for_settings_table.py b/boefjes/boefjes/migrations/versions/cd34fdfafdaf_json_settings_for_settings_table.py index d52cb9a4140..7351d140501 100644 --- a/boefjes/boefjes/migrations/versions/cd34fdfafdaf_json_settings_for_settings_table.py +++ b/boefjes/boefjes/migrations/versions/cd34fdfafdaf_json_settings_for_settings_table.py @@ -5,6 +5,7 @@ Create Date: 2023-02-16 14:47:20.424959 """ + import json import sqlalchemy as sa diff --git a/boefjes/boefjes/plugins/kat_cve_2023_34039/main.py b/boefjes/boefjes/plugins/kat_cve_2023_34039/main.py index 4375430b576..e1772afa343 100644 --- a/boefjes/boefjes/plugins/kat_cve_2023_34039/main.py +++ b/boefjes/boefjes/plugins/kat_cve_2023_34039/main.py @@ -13,6 +13,7 @@ (*) Exploit by Sina Kheirkhah (@SinSinology) of Summoning Team (@SummoningTeam) """ + import logging import os diff --git a/boefjes/boefjes/plugins/kat_dns/main.py b/boefjes/boefjes/plugins/kat_dns/main.py index 5b969e07b54..a4a5a77e0fb 100644 --- a/boefjes/boefjes/plugins/kat_dns/main.py +++ b/boefjes/boefjes/plugins/kat_dns/main.py @@ -1,4 +1,5 @@ """Boefje script for getting dns records""" + import json import logging import re diff --git a/boefjes/boefjes/plugins/kat_dns_zone/main.py b/boefjes/boefjes/plugins/kat_dns_zone/main.py index fd553346330..c0ef2102e4f 100644 --- a/boefjes/boefjes/plugins/kat_dns_zone/main.py +++ b/boefjes/boefjes/plugins/kat_dns_zone/main.py @@ -1,4 +1,5 @@ """Boefje script for getting dns records""" + import logging import dns.resolver diff --git a/boefjes/boefjes/plugins/kat_dnssec/main.py b/boefjes/boefjes/plugins/kat_dnssec/main.py index 887223b6431..430c20a0f36 100644 --- a/boefjes/boefjes/plugins/kat_dnssec/main.py +++ b/boefjes/boefjes/plugins/kat_dnssec/main.py @@ -1,4 +1,5 @@ """Boefje script checking if dnssec has been correctly configured and is valid for given hostname""" + import json import re diff --git a/boefjes/boefjes/plugins/kat_external_db/main.py b/boefjes/boefjes/plugins/kat_external_db/main.py index 7f0478d2931..cb89e7ae5ea 100644 --- a/boefjes/boefjes/plugins/kat_external_db/main.py +++ b/boefjes/boefjes/plugins/kat_external_db/main.py @@ -1,4 +1,5 @@ """Boefje script for getting domains and ipaddresses from dadb""" + from os import getenv import requests diff --git a/boefjes/boefjes/plugins/kat_rpki/main.py b/boefjes/boefjes/plugins/kat_rpki/main.py index 2d8d1fce389..bbf247a0101 100644 --- a/boefjes/boefjes/plugins/kat_rpki/main.py +++ b/boefjes/boefjes/plugins/kat_rpki/main.py @@ -1,4 +1,5 @@ """Boefje script for validating vrps records based on code from @trideeindhoven""" + import hashlib import json import os diff --git a/boefjes/boefjes/plugins/kat_wpscan/main.py b/boefjes/boefjes/plugins/kat_wpscan/main.py index a90cf3293d1..1056198d886 100644 --- a/boefjes/boefjes/plugins/kat_wpscan/main.py +++ b/boefjes/boefjes/plugins/kat_wpscan/main.py @@ -1,4 +1,5 @@ """Boefje script for scanning wordpress sites using wpscan""" + from os import getenv import docker diff --git a/bytes/bytes/database/migrations/versions/0001_initial.py b/bytes/bytes/database/migrations/versions/0001_initial.py index 6840cc7196c..2a0512abc30 100644 --- a/bytes/bytes/database/migrations/versions/0001_initial.py +++ b/bytes/bytes/database/migrations/versions/0001_initial.py @@ -5,6 +5,7 @@ Create Date: 2021-10-19 07:43:37.479544 """ + import sqlalchemy as sa from alembic import op from sqlalchemy.dialects import postgresql diff --git a/bytes/bytes/database/migrations/versions/0002_drop_output_add_input.py b/bytes/bytes/database/migrations/versions/0002_drop_output_add_input.py index 3f2132fb82e..9636b05767e 100644 --- a/bytes/bytes/database/migrations/versions/0002_drop_output_add_input.py +++ b/bytes/bytes/database/migrations/versions/0002_drop_output_add_input.py @@ -5,6 +5,7 @@ Create Date: 2021-12-15 10:50:52.581056 """ + import sqlalchemy as sa from alembic import op from sqlalchemy.dialects import postgresql diff --git a/bytes/bytes/database/migrations/versions/0003_rename_module_to_normalizer_boefje.py b/bytes/bytes/database/migrations/versions/0003_rename_module_to_normalizer_boefje.py index 87f18119358..ea699b64737 100644 --- a/bytes/bytes/database/migrations/versions/0003_rename_module_to_normalizer_boefje.py +++ b/bytes/bytes/database/migrations/versions/0003_rename_module_to_normalizer_boefje.py @@ -5,6 +5,7 @@ Create Date: 2021-12-20 13:25:08.395995 """ + from alembic import op # revision identifiers, used by Alembic. diff --git a/bytes/bytes/database/migrations/versions/0004_rename_boefje_name_to_boefje_id.py b/bytes/bytes/database/migrations/versions/0004_rename_boefje_name_to_boefje_id.py index 758635fcac3..c4606138630 100644 --- a/bytes/bytes/database/migrations/versions/0004_rename_boefje_name_to_boefje_id.py +++ b/bytes/bytes/database/migrations/versions/0004_rename_boefje_name_to_boefje_id.py @@ -5,6 +5,7 @@ Create Date: 2022-01-24 15:53:16.867896 """ + from alembic import op # revision identifiers, used by Alembic. diff --git a/bytes/bytes/database/migrations/versions/0005_add_secure_hash_link_boefje_meta.py b/bytes/bytes/database/migrations/versions/0005_add_secure_hash_link_boefje_meta.py index fef357dcef5..81de1bda6c2 100644 --- a/bytes/bytes/database/migrations/versions/0005_add_secure_hash_link_boefje_meta.py +++ b/bytes/bytes/database/migrations/versions/0005_add_secure_hash_link_boefje_meta.py @@ -5,6 +5,7 @@ Create Date: 2022-03-23 14:28:54.048206 """ + import sqlalchemy as sa from alembic import op diff --git a/bytes/bytes/database/migrations/versions/0006_remove_redundant_dispatches_field.py b/bytes/bytes/database/migrations/versions/0006_remove_redundant_dispatches_field.py index be7e82c8456..97df64cd2f2 100644 --- a/bytes/bytes/database/migrations/versions/0006_remove_redundant_dispatches_field.py +++ b/bytes/bytes/database/migrations/versions/0006_remove_redundant_dispatches_field.py @@ -5,6 +5,7 @@ Create Date: 2022-03-25 14:28:34.584808 """ + import sqlalchemy as sa from alembic import op from sqlalchemy.dialects import postgresql diff --git a/bytes/bytes/database/migrations/versions/0007_add_raw_file_models.py b/bytes/bytes/database/migrations/versions/0007_add_raw_file_models.py index ffe55694791..7c2629ba958 100644 --- a/bytes/bytes/database/migrations/versions/0007_add_raw_file_models.py +++ b/bytes/bytes/database/migrations/versions/0007_add_raw_file_models.py @@ -5,6 +5,7 @@ Create Date: 2022-04-04 18:09:09.363168 """ + import sqlalchemy as sa from alembic import op from sqlalchemy.dialects import postgresql diff --git a/bytes/bytes/database/migrations/versions/0008_point_normalizer_to_raw_file.py b/bytes/bytes/database/migrations/versions/0008_point_normalizer_to_raw_file.py index 0bc5e96a1ba..cf888a60e95 100644 --- a/bytes/bytes/database/migrations/versions/0008_point_normalizer_to_raw_file.py +++ b/bytes/bytes/database/migrations/versions/0008_point_normalizer_to_raw_file.py @@ -5,6 +5,7 @@ Create Date: 2022-04-28 14:03:02.214129 """ + import sqlalchemy as sa from alembic import op from sqlalchemy.dialects import postgresql diff --git a/bytes/bytes/database/migrations/versions/0009_max_length_on_varchar_s.py b/bytes/bytes/database/migrations/versions/0009_max_length_on_varchar_s.py index 267f81a9360..10797ed59d7 100644 --- a/bytes/bytes/database/migrations/versions/0009_max_length_on_varchar_s.py +++ b/bytes/bytes/database/migrations/versions/0009_max_length_on_varchar_s.py @@ -5,6 +5,7 @@ Create Date: 2022-06-17 07:44:33.849746 """ + import sqlalchemy as sa from alembic import op diff --git a/bytes/bytes/database/migrations/versions/0010_longer_retrieval_link_string.py b/bytes/bytes/database/migrations/versions/0010_longer_retrieval_link_string.py index b20ea7051c1..d32c79f5c00 100644 --- a/bytes/bytes/database/migrations/versions/0010_longer_retrieval_link_string.py +++ b/bytes/bytes/database/migrations/versions/0010_longer_retrieval_link_string.py @@ -5,6 +5,7 @@ Create Date: 2022-06-17 07:44:33.849746 """ + import sqlalchemy as sa from alembic import op diff --git a/bytes/bytes/database/migrations/versions/0011_longer_normalizer_name_and_boefje_id.py b/bytes/bytes/database/migrations/versions/0011_longer_normalizer_name_and_boefje_id.py index c614518c703..41ce26a722c 100644 --- a/bytes/bytes/database/migrations/versions/0011_longer_normalizer_name_and_boefje_id.py +++ b/bytes/bytes/database/migrations/versions/0011_longer_normalizer_name_and_boefje_id.py @@ -5,6 +5,7 @@ Create Date: 2022-06-17 07:44:33.849746 """ + import sqlalchemy as sa from alembic import op diff --git a/bytes/bytes/database/migrations/versions/0011_rename_normalizer_name_to_normalizer_id.py b/bytes/bytes/database/migrations/versions/0011_rename_normalizer_name_to_normalizer_id.py index 9875a8f9cf5..430856c0efc 100644 --- a/bytes/bytes/database/migrations/versions/0011_rename_normalizer_name_to_normalizer_id.py +++ b/bytes/bytes/database/migrations/versions/0011_rename_normalizer_name_to_normalizer_id.py @@ -5,6 +5,7 @@ Create Date: 2022-10-25 09:13:21.807003 """ + from alembic import op # revision identifiers, used by Alembic. diff --git a/bytes/bytes/database/migrations/versions/09a2929108d9_add_signing_provider_model.py b/bytes/bytes/database/migrations/versions/09a2929108d9_add_signing_provider_model.py index fdcc0830481..213cf9449c5 100644 --- a/bytes/bytes/database/migrations/versions/09a2929108d9_add_signing_provider_model.py +++ b/bytes/bytes/database/migrations/versions/09a2929108d9_add_signing_provider_model.py @@ -5,6 +5,7 @@ Create Date: 2023-05-19 08:24:39.803682 """ + import sqlalchemy as sa from alembic import op diff --git a/bytes/bytes/database/migrations/versions/1dde0213e9fe_remove_all_hash_mime_types.py b/bytes/bytes/database/migrations/versions/1dde0213e9fe_remove_all_hash_mime_types.py index c77350ad000..4676e681e0f 100644 --- a/bytes/bytes/database/migrations/versions/1dde0213e9fe_remove_all_hash_mime_types.py +++ b/bytes/bytes/database/migrations/versions/1dde0213e9fe_remove_all_hash_mime_types.py @@ -5,6 +5,7 @@ Create Date: 2023-10-19 11:26:06.627048 """ + import sqlalchemy from alembic import op diff --git a/bytes/bytes/database/migrations/versions/65a39ab3e224_increase_organization_and_input_ooi_size.py b/bytes/bytes/database/migrations/versions/65a39ab3e224_increase_organization_and_input_ooi_size.py index 733a6d5b70c..c4fcaa0ff0b 100644 --- a/bytes/bytes/database/migrations/versions/65a39ab3e224_increase_organization_and_input_ooi_size.py +++ b/bytes/bytes/database/migrations/versions/65a39ab3e224_increase_organization_and_input_ooi_size.py @@ -5,6 +5,7 @@ Create Date: 2022-11-17 13:28:05.911897 """ + import sqlalchemy as sa from alembic import op diff --git a/bytes/bytes/database/migrations/versions/d216ad75177d_add_environment_and_runnable_hash_.py b/bytes/bytes/database/migrations/versions/d216ad75177d_add_environment_and_runnable_hash_.py index 8baf1a383d5..99a8a565d4f 100644 --- a/bytes/bytes/database/migrations/versions/d216ad75177d_add_environment_and_runnable_hash_.py +++ b/bytes/bytes/database/migrations/versions/d216ad75177d_add_environment_and_runnable_hash_.py @@ -5,6 +5,7 @@ Create Date: 2023-06-19 13:55:14.188026 """ + import sqlalchemy as sa from alembic import op diff --git a/bytes/bytes/database/migrations/versions/e09d8780e34b_nullable_input_ooi.py b/bytes/bytes/database/migrations/versions/e09d8780e34b_nullable_input_ooi.py index 1699506794f..809c024f075 100644 --- a/bytes/bytes/database/migrations/versions/e09d8780e34b_nullable_input_ooi.py +++ b/bytes/bytes/database/migrations/versions/e09d8780e34b_nullable_input_ooi.py @@ -5,6 +5,7 @@ Create Date: 2022-12-02 08:45:30.638883 """ + import sqlalchemy as sa from alembic import op diff --git a/bytes/bytes/database/migrations/versions/e2f76e95f1e7_.py b/bytes/bytes/database/migrations/versions/e2f76e95f1e7_.py index b8345385309..f3e8bdfb3b0 100644 --- a/bytes/bytes/database/migrations/versions/e2f76e95f1e7_.py +++ b/bytes/bytes/database/migrations/versions/e2f76e95f1e7_.py @@ -5,6 +5,7 @@ Create Date: 2022-11-10 19:19:13.732053 """ + # revision identifiers, used by Alembic. revision = "e2f76e95f1e7" down_revision = ("0011_2", "0011") diff --git a/bytes/bytes/database/migrations/versions/ebc7de8be4e3_increase_organization_id_length.py b/bytes/bytes/database/migrations/versions/ebc7de8be4e3_increase_organization_id_length.py index 035cd6ed435..1a07d5d97d8 100644 --- a/bytes/bytes/database/migrations/versions/ebc7de8be4e3_increase_organization_id_length.py +++ b/bytes/bytes/database/migrations/versions/ebc7de8be4e3_increase_organization_id_length.py @@ -5,6 +5,7 @@ Create Date: 2023-01-31 11:08:42.920579 """ + import sqlalchemy as sa from alembic import op diff --git a/bytes/bytes/database/migrations/versions/ec68d3eb14b1_remove_redundant_boefje_meta_foreign.py b/bytes/bytes/database/migrations/versions/ec68d3eb14b1_remove_redundant_boefje_meta_foreign.py index ca793d77048..2c0170c0ed3 100644 --- a/bytes/bytes/database/migrations/versions/ec68d3eb14b1_remove_redundant_boefje_meta_foreign.py +++ b/bytes/bytes/database/migrations/versions/ec68d3eb14b1_remove_redundant_boefje_meta_foreign.py @@ -5,6 +5,7 @@ Create Date: 2023-04-13 13:36:50.196441 """ + import sqlalchemy as sa from alembic import op from sqlalchemy.dialects import postgresql diff --git a/bytes/bytes/database/migrations/versions/fa64454868a9_add_index_on_boefjemeta_table_.py b/bytes/bytes/database/migrations/versions/fa64454868a9_add_index_on_boefjemeta_table_.py index 0537de66795..f4629068ae3 100644 --- a/bytes/bytes/database/migrations/versions/fa64454868a9_add_index_on_boefjemeta_table_.py +++ b/bytes/bytes/database/migrations/versions/fa64454868a9_add_index_on_boefjemeta_table_.py @@ -5,6 +5,7 @@ Create Date: 2023-03-29 08:23:08.521462 """ + from alembic import op # revision identifiers, used by Alembic. diff --git a/keiko/keiko/api.py b/keiko/keiko/api.py index 0f8b3759bc3..ec50fc17b07 100644 --- a/keiko/keiko/api.py +++ b/keiko/keiko/api.py @@ -1,4 +1,5 @@ """Keiko Web API.""" + import logging import uuid from pathlib import Path diff --git a/keiko/keiko/cli.py b/keiko/keiko/cli.py index d5121d47d11..3bc9a0bac84 100644 --- a/keiko/keiko/cli.py +++ b/keiko/keiko/cli.py @@ -1,4 +1,5 @@ """Keiko CLI module.""" + import uuid from typing import TextIO diff --git a/keiko/keiko/health.py b/keiko/keiko/health.py index c630fadccec..58191b0a746 100644 --- a/keiko/keiko/health.py +++ b/keiko/keiko/health.py @@ -1,4 +1,5 @@ """Keiko health module.""" + from typing import Any from pydantic import BaseModel, Field diff --git a/keiko/keiko/version.py b/keiko/keiko/version.py index 2994d469e22..7428817d299 100644 --- a/keiko/keiko/version.py +++ b/keiko/keiko/version.py @@ -1,4 +1,5 @@ """Version information for keiko.""" + from importlib.metadata import PackageNotFoundError, version try: diff --git a/keiko/setup.py b/keiko/setup.py index 11bb3360895..ad47e911d66 100644 --- a/keiko/setup.py +++ b/keiko/setup.py @@ -1,4 +1,5 @@ """Packaging script for keiko.""" + from setuptools import find_packages, setup from keiko.version import __version__ diff --git a/keiko/templates/bevindingenrapport/model.py b/keiko/templates/bevindingenrapport/model.py index 2e5518d2d8b..c958c88b571 100644 --- a/keiko/templates/bevindingenrapport/model.py +++ b/keiko/templates/bevindingenrapport/model.py @@ -1,6 +1,7 @@ """ DNS Report Datamodel """ + from datetime import datetime from pydantic import BaseModel, ConfigDict, Field diff --git a/keiko/templates/intel/model.py b/keiko/templates/intel/model.py index af04c09d214..ca2e5d72af8 100644 --- a/keiko/templates/intel/model.py +++ b/keiko/templates/intel/model.py @@ -5,5 +5,4 @@ from keiko.base_models import DataShapeBase -class DataShape(DataShapeBase): - ... +class DataShape(DataShapeBase): ... diff --git a/keiko/tests/fixtures/templates/template2/model.py b/keiko/tests/fixtures/templates/template2/model.py index ba417b4cfc8..f43dac30661 100644 --- a/keiko/tests/fixtures/templates/template2/model.py +++ b/keiko/tests/fixtures/templates/template2/model.py @@ -7,5 +7,4 @@ # pylint: disable=missing-class-docstring -class DataShape(DataShapeBase): - ... +class DataShape(DataShapeBase): ... diff --git a/mula/scheduler/alembic/versions/0001_initial_migration.py b/mula/scheduler/alembic/versions/0001_initial_migration.py index 458725bc511..f9104dfb932 100644 --- a/mula/scheduler/alembic/versions/0001_initial_migration.py +++ b/mula/scheduler/alembic/versions/0001_initial_migration.py @@ -3,6 +3,7 @@ Revises: Create Date: 2022-07-25 11:02:13.395259 """ + import sqlalchemy as sa from alembic import op diff --git a/mula/scheduler/alembic/versions/0002_update_tasks.py b/mula/scheduler/alembic/versions/0002_update_tasks.py index e54d7521546..4097dad5144 100644 --- a/mula/scheduler/alembic/versions/0002_update_tasks.py +++ b/mula/scheduler/alembic/versions/0002_update_tasks.py @@ -3,6 +3,7 @@ Revises: 0001 Create Date: 2022-11-02 10:33:34.403970 """ + import sqlalchemy as sa from alembic import op diff --git a/mula/scheduler/alembic/versions/0003_add_type_field_to_tasks.py b/mula/scheduler/alembic/versions/0003_add_type_field_to_tasks.py index 9a71942dccb..eb10f3d18f3 100644 --- a/mula/scheduler/alembic/versions/0003_add_type_field_to_tasks.py +++ b/mula/scheduler/alembic/versions/0003_add_type_field_to_tasks.py @@ -5,6 +5,7 @@ Create Date: 2022-12-29 12:40:55.366259 """ + import sqlalchemy as sa from alembic import op diff --git a/mula/scheduler/alembic/versions/0004_add_server_default.py b/mula/scheduler/alembic/versions/0004_add_server_default.py index aefc501b74f..2967a7b54a9 100644 --- a/mula/scheduler/alembic/versions/0004_add_server_default.py +++ b/mula/scheduler/alembic/versions/0004_add_server_default.py @@ -5,6 +5,7 @@ Create Date: 2023-02-14 10:37:05.230181 """ + import sqlalchemy as sa from alembic import op from sqlalchemy.dialects import postgresql diff --git a/mula/scheduler/alembic/versions/0005_size_limit_hash.py b/mula/scheduler/alembic/versions/0005_size_limit_hash.py index 8fe5b001e3c..8e52fb9024a 100644 --- a/mula/scheduler/alembic/versions/0005_size_limit_hash.py +++ b/mula/scheduler/alembic/versions/0005_size_limit_hash.py @@ -5,6 +5,7 @@ Create Date: 2023-04-24 10:51:02.820727 """ + import sqlalchemy as sa from alembic import op diff --git a/mula/scheduler/alembic/versions/0006_add_jsonb_fields_add_jsonb_fields.py b/mula/scheduler/alembic/versions/0006_add_jsonb_fields_add_jsonb_fields.py index b7de642b73c..7d075254d21 100644 --- a/mula/scheduler/alembic/versions/0006_add_jsonb_fields_add_jsonb_fields.py +++ b/mula/scheduler/alembic/versions/0006_add_jsonb_fields_add_jsonb_fields.py @@ -5,6 +5,7 @@ Create Date: 2023-05-03 11:48:01.679222 """ + import sqlalchemy as sa from alembic import op from sqlalchemy.dialects import postgresql diff --git a/mula/scheduler/alembic/versions/0007_add_cancelled_status_for_tasks.py b/mula/scheduler/alembic/versions/0007_add_cancelled_status_for_tasks.py index 491c9006177..fbc7f8d9bc4 100644 --- a/mula/scheduler/alembic/versions/0007_add_cancelled_status_for_tasks.py +++ b/mula/scheduler/alembic/versions/0007_add_cancelled_status_for_tasks.py @@ -5,6 +5,7 @@ Create Date: 2023-05-30 12:22:42.329666 """ + from alembic import op # revision identifiers, used by Alembic. diff --git a/octopoes/bits/runner.py b/octopoes/bits/runner.py index f19773cd6a6..4a9da52f2f9 100644 --- a/octopoes/bits/runner.py +++ b/octopoes/bits/runner.py @@ -12,8 +12,7 @@ class ModuleException(Exception): class Runnable(Protocol): - def run(self, *args, **kwargs) -> Any: - ... + def run(self, *args, **kwargs) -> Any: ... class BitRunner: diff --git a/octopoes/octopoes/core/service.py b/octopoes/octopoes/core/service.py index e0246586d7a..c0494f36d9d 100644 --- a/octopoes/octopoes/core/service.py +++ b/octopoes/octopoes/core/service.py @@ -73,12 +73,10 @@ def __init__( self.scan_profile_repository = scan_profile_repository @overload - def _populate_scan_profiles(self, oois: ValuesView[OOI], valid_time: datetime) -> ValuesView[OOI]: - ... + def _populate_scan_profiles(self, oois: ValuesView[OOI], valid_time: datetime) -> ValuesView[OOI]: ... @overload - def _populate_scan_profiles(self, oois: list[OOI], valid_time: datetime) -> list[OOI]: - ... + def _populate_scan_profiles(self, oois: list[OOI], valid_time: datetime) -> list[OOI]: ... def _populate_scan_profiles( self, oois: list[OOI] | ValuesView[OOI], valid_time: datetime diff --git a/octopoes/tests/test_scan_profile_repository.py b/octopoes/tests/test_scan_profile_repository.py index 4d437eb6965..8d998757694 100644 --- a/octopoes/tests/test_scan_profile_repository.py +++ b/octopoes/tests/test_scan_profile_repository.py @@ -8,8 +8,7 @@ @patch("octopoes.models.types.ALL_TYPES", ALL_OOI_TYPES) class ScanProfileRepositoryTest(TestCase): - def setUp(self) -> None: - ... + def setUp(self) -> None: ... def test_serialize_declared(self): scan_profile = DeclaredScanProfile( diff --git a/rocky/katalogus/views/plugin_enable_disable.py b/rocky/katalogus/views/plugin_enable_disable.py index 3b6e38e5363..8717c6d540b 100644 --- a/rocky/katalogus/views/plugin_enable_disable.py +++ b/rocky/katalogus/views/plugin_enable_disable.py @@ -74,8 +74,9 @@ def post(self, request, *args, **kwargs): ) else: member_clearance_level_text = ( - "Your clearance level is L{}. Contact your administrator to get a higher clearance level." - ).format(self.organization_member.acknowledged_clearance_level) + f"Your clearance level is L{self.organization_member.acknowledged_clearance_level}. Contact your " + f"administrator to get a higher clearance level." + ) if ( self.organization_member.trusted_clearance_level < 0