From b28c156e78c712b44424d2926de8881c3cfd0c60 Mon Sep 17 00:00:00 2001 From: Evgenii Alekseev Date: Fri, 20 Nov 2026 00:54:12 +0200 Subject: [PATCH] type: remove annotations import, because they are no longer needed in python 3.14+ --- CONTRIBUTING.md | 3 --- .../src/ahriman/application/application/workers/updater.py | 2 -- ahriman-core/src/ahriman/core/report/report.py | 2 -- ahriman-core/src/ahriman/core/spawn.py | 2 -- ahriman-core/src/ahriman/core/status/client.py | 2 -- ahriman-core/src/ahriman/core/tree.py | 2 -- ahriman-core/src/ahriman/core/upload/upload.py | 2 -- ahriman-core/src/ahriman/models/auth_settings.py | 2 -- ahriman-core/src/ahriman/models/filesystem_package.py | 2 -- ahriman-core/src/ahriman/models/package.py | 2 -- ahriman-core/src/ahriman/models/package_source.py | 2 -- ahriman-core/src/ahriman/models/report_settings.py | 2 -- ahriman-core/src/ahriman/models/result.py | 2 -- ahriman-core/src/ahriman/models/sign_settings.py | 2 -- ahriman-core/src/ahriman/models/smtp_ssl_settings.py | 2 -- ahriman-core/src/ahriman/models/upload_settings.py | 2 -- ahriman-core/src/ahriman/models/user_access.py | 2 -- ahriman-web/src/ahriman/core/auth/auth.py | 2 -- 18 files changed, 37 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c681b5cd..43ce540c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -147,9 +147,6 @@ Again, the most checks can be performed by `tox` command, though some additional * Import order must be the following: ```python - # optional imports from future module - from __future__ import annotations - # Module import for those which are installed into environment (no matter standard library or not)... import os # ...one per line... diff --git a/ahriman-core/src/ahriman/application/application/workers/updater.py b/ahriman-core/src/ahriman/application/application/workers/updater.py index 644fb997..297fc406 100644 --- a/ahriman-core/src/ahriman/application/application/workers/updater.py +++ b/ahriman-core/src/ahriman/application/application/workers/updater.py @@ -17,8 +17,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . # -from __future__ import annotations - from collections.abc import Iterable from ahriman.core.configuration import Configuration diff --git a/ahriman-core/src/ahriman/core/report/report.py b/ahriman-core/src/ahriman/core/report/report.py index e6412648..3b80f360 100644 --- a/ahriman-core/src/ahriman/core/report/report.py +++ b/ahriman-core/src/ahriman/core/report/report.py @@ -17,8 +17,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . # -from __future__ import annotations - from ahriman.core.configuration import Configuration from ahriman.core.exceptions import ReportError from ahriman.core.log import LazyLogging diff --git a/ahriman-core/src/ahriman/core/spawn.py b/ahriman-core/src/ahriman/core/spawn.py index 39c28a2e..93a6b42d 100644 --- a/ahriman-core/src/ahriman/core/spawn.py +++ b/ahriman-core/src/ahriman/core/spawn.py @@ -17,8 +17,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . # -from __future__ import annotations - import argparse import uuid diff --git a/ahriman-core/src/ahriman/core/status/client.py b/ahriman-core/src/ahriman/core/status/client.py index aa9228e6..7b01b0de 100644 --- a/ahriman-core/src/ahriman/core/status/client.py +++ b/ahriman-core/src/ahriman/core/status/client.py @@ -18,8 +18,6 @@ # along with this program. If not, see . # # pylint: disable=too-many-public-methods -from __future__ import annotations - from ahriman.core.configuration import Configuration from ahriman.core.database import SQLite from ahriman.models.build_status import BuildStatus, BuildStatusEnum diff --git a/ahriman-core/src/ahriman/core/tree.py b/ahriman-core/src/ahriman/core/tree.py index f662607d..297acf64 100644 --- a/ahriman-core/src/ahriman/core/tree.py +++ b/ahriman-core/src/ahriman/core/tree.py @@ -17,8 +17,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . # -from __future__ import annotations - from collections.abc import Iterable from functools import partial diff --git a/ahriman-core/src/ahriman/core/upload/upload.py b/ahriman-core/src/ahriman/core/upload/upload.py index 44cc950c..c8324aad 100644 --- a/ahriman-core/src/ahriman/core/upload/upload.py +++ b/ahriman-core/src/ahriman/core/upload/upload.py @@ -17,8 +17,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . # -from __future__ import annotations - from pathlib import Path from ahriman.core.configuration import Configuration diff --git a/ahriman-core/src/ahriman/models/auth_settings.py b/ahriman-core/src/ahriman/models/auth_settings.py index 89ad5c34..c5064713 100644 --- a/ahriman-core/src/ahriman/models/auth_settings.py +++ b/ahriman-core/src/ahriman/models/auth_settings.py @@ -17,8 +17,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . # -from __future__ import annotations - from enum import StrEnum diff --git a/ahriman-core/src/ahriman/models/filesystem_package.py b/ahriman-core/src/ahriman/models/filesystem_package.py index e4abd218..77df22cc 100644 --- a/ahriman-core/src/ahriman/models/filesystem_package.py +++ b/ahriman-core/src/ahriman/models/filesystem_package.py @@ -17,8 +17,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . # -from __future__ import annotations - from collections.abc import Iterable from dataclasses import dataclass, field from pathlib import Path diff --git a/ahriman-core/src/ahriman/models/package.py b/ahriman-core/src/ahriman/models/package.py index 20f04433..2309d28b 100644 --- a/ahriman-core/src/ahriman/models/package.py +++ b/ahriman-core/src/ahriman/models/package.py @@ -17,8 +17,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . # -from __future__ import annotations - from collections.abc import Iterable from dataclasses import dataclass from pathlib import Path diff --git a/ahriman-core/src/ahriman/models/package_source.py b/ahriman-core/src/ahriman/models/package_source.py index 0315d821..9ee56eae 100644 --- a/ahriman-core/src/ahriman/models/package_source.py +++ b/ahriman-core/src/ahriman/models/package_source.py @@ -17,8 +17,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . # -from __future__ import annotations - from enum import StrEnum from pathlib import Path from urllib.parse import urlparse diff --git a/ahriman-core/src/ahriman/models/report_settings.py b/ahriman-core/src/ahriman/models/report_settings.py index 8e69c8dd..5ef94069 100644 --- a/ahriman-core/src/ahriman/models/report_settings.py +++ b/ahriman-core/src/ahriman/models/report_settings.py @@ -17,8 +17,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . # -from __future__ import annotations - from enum import StrEnum diff --git a/ahriman-core/src/ahriman/models/result.py b/ahriman-core/src/ahriman/models/result.py index c19b535b..8697dbda 100644 --- a/ahriman-core/src/ahriman/models/result.py +++ b/ahriman-core/src/ahriman/models/result.py @@ -17,8 +17,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . # -from __future__ import annotations - from collections.abc import Callable, Iterable from typing import Any, ClassVar, Self diff --git a/ahriman-core/src/ahriman/models/sign_settings.py b/ahriman-core/src/ahriman/models/sign_settings.py index 6865537d..abaa1384 100644 --- a/ahriman-core/src/ahriman/models/sign_settings.py +++ b/ahriman-core/src/ahriman/models/sign_settings.py @@ -17,8 +17,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . # -from __future__ import annotations - from enum import StrEnum diff --git a/ahriman-core/src/ahriman/models/smtp_ssl_settings.py b/ahriman-core/src/ahriman/models/smtp_ssl_settings.py index 7e75bbee..799eaef4 100644 --- a/ahriman-core/src/ahriman/models/smtp_ssl_settings.py +++ b/ahriman-core/src/ahriman/models/smtp_ssl_settings.py @@ -17,8 +17,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . # -from __future__ import annotations - from enum import StrEnum diff --git a/ahriman-core/src/ahriman/models/upload_settings.py b/ahriman-core/src/ahriman/models/upload_settings.py index ccaa7188..590ef16d 100644 --- a/ahriman-core/src/ahriman/models/upload_settings.py +++ b/ahriman-core/src/ahriman/models/upload_settings.py @@ -17,8 +17,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . # -from __future__ import annotations - from enum import StrEnum diff --git a/ahriman-core/src/ahriman/models/user_access.py b/ahriman-core/src/ahriman/models/user_access.py index 0f8fd709..a2139012 100644 --- a/ahriman-core/src/ahriman/models/user_access.py +++ b/ahriman-core/src/ahriman/models/user_access.py @@ -17,8 +17,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . # -from __future__ import annotations - from enum import StrEnum diff --git a/ahriman-web/src/ahriman/core/auth/auth.py b/ahriman-web/src/ahriman/core/auth/auth.py index de4ca0a5..d013be99 100644 --- a/ahriman-web/src/ahriman/core/auth/auth.py +++ b/ahriman-web/src/ahriman/core/auth/auth.py @@ -17,8 +17,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . # -from __future__ import annotations - from ahriman.core.configuration import Configuration from ahriman.core.database import SQLite from ahriman.core.log import LazyLogging