mirror of
https://github.com/searxng/searxng.git
synced 2025-09-03 16:58:34 +02:00
[mod] drop: from __future__ import annotations
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
57b9673efb
commit
f24d85bc4b
67 changed files with 15 additions and 68 deletions
|
@ -4,7 +4,7 @@
|
|||
Implementations used for bot detection.
|
||||
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
__all__ = ["init", "dump_request", "get_network", "too_many_requests", "ProxyFix"]
|
||||
|
||||
|
|
|
@ -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"]
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -13,7 +13,7 @@ Accept_ header ..
|
|||
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from ipaddress import (
|
||||
IPv4Network,
|
||||
IPv6Network,
|
||||
|
|
|
@ -14,7 +14,7 @@ bot if the Accept-Encoding_ header ..
|
|||
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from ipaddress import (
|
||||
IPv4Network,
|
||||
IPv6Network,
|
||||
|
|
|
@ -11,7 +11,7 @@ if the Accept-Language_ header is unset.
|
|||
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from ipaddress import (
|
||||
IPv4Network,
|
||||
IPv6Network,
|
||||
|
|
|
@ -11,7 +11,7 @@ the Connection_ header is set to ``close``.
|
|||
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from ipaddress import (
|
||||
IPv4Network,
|
||||
IPv6Network,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue