[mod] drop: from __future__ import annotations

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
Markus Heiser 2025-08-24 15:16:46 +02:00 committed by Markus Heiser
parent 57b9673efb
commit f24d85bc4b
67 changed files with 15 additions and 68 deletions

View file

@ -4,7 +4,7 @@
Implementations used for bot detection.
"""
from __future__ import annotations
__all__ = ["init", "dump_request", "get_network", "too_many_requests", "ProxyFix"]

View file

@ -1,6 +1,6 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# pylint: disable=missing-module-docstring, invalid-name
from __future__ import annotations
import typing as t
__all__ = ["log_error_only_once", "dump_request", "get_network", "logger", "too_many_requests"]

View file

@ -6,7 +6,7 @@ The :py:class:`Config` class implements a configuration that is based on
structured dictionaries. The configuration schema is defined in a dictionary
structure and the configuration data is given in a dictionary structure.
"""
from __future__ import annotations
import typing
import copy

View file

@ -13,7 +13,7 @@ Accept_ header ..
"""
from __future__ import annotations
from ipaddress import (
IPv4Network,
IPv6Network,

View file

@ -14,7 +14,7 @@ bot if the Accept-Encoding_ header ..
"""
from __future__ import annotations
from ipaddress import (
IPv4Network,
IPv6Network,

View file

@ -11,7 +11,7 @@ if the Accept-Language_ header is unset.
"""
from __future__ import annotations
from ipaddress import (
IPv4Network,
IPv6Network,

View file

@ -11,7 +11,7 @@ the Connection_ header is set to ``close``.
"""
from __future__ import annotations
from ipaddress import (
IPv4Network,
IPv6Network,

View file

@ -22,7 +22,7 @@ Metadata`_. A request is filtered out in case of:
"""
# pylint: disable=unused-argument
from __future__ import annotations
from ipaddress import (
IPv4Network,
IPv6Network,

View file

@ -12,7 +12,7 @@ the User-Agent_ header is unset or matches the regular expression
"""
from __future__ import annotations
import re
from ipaddress import (
IPv4Network,

View file

@ -36,7 +36,7 @@ dropped.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For
"""
from __future__ import annotations
from ipaddress import (
IPv4Network,
IPv6Network,

View file

@ -25,7 +25,7 @@ The ``ip_lists`` method implements :py:obj:`block-list <block_ip>` and
"""
# pylint: disable=unused-argument
from __future__ import annotations
from typing import Tuple
from ipaddress import (
ip_network,

View file

@ -34,7 +34,7 @@ And in the HTML template from flask a stylesheet link is needed (the value of
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For
"""
from __future__ import annotations
from ipaddress import (
IPv4Network,
IPv6Network,

View file

@ -3,7 +3,7 @@
(:py:obj:`flask.request.remote_addr`) behind a proxy chain."""
# pylint: disable=too-many-branches
from __future__ import annotations
import typing as t
from collections import abc

View file

@ -1,7 +1,6 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
"""Providing a Valkey database for the botdetection methods."""
from __future__ import annotations
import valkey