aboutsummaryrefslogtreecommitdiff
path: root/src/hydrilla/proxy
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2022-10-11 11:17:56 +0200
committerWojtek Kosior <koszko@koszko.org>2022-10-11 13:12:15 +0200
commit634cef218e9979053da3367c79de6d740633c61a (patch)
tree317ebb413ad98067c142004c0da79f2cbb160457 /src/hydrilla/proxy
parent94e140e685baae38e8977fe90a3304bbc041ae66 (diff)
downloadhaketilo-hydrilla-634cef218e9979053da3367c79de6d740633c61a.tar.gz
haketilo-hydrilla-634cef218e9979053da3367c79de6d740633c61a.zip
[builder][server][proxy] remove "from __future__ import annotations"
Diffstat (limited to 'src/hydrilla/proxy')
-rw-r--r--src/hydrilla/proxy/addon.py3
-rw-r--r--src/hydrilla/proxy/csp.py3
-rw-r--r--src/hydrilla/proxy/http_messages.py3
-rw-r--r--src/hydrilla/proxy/policies/base.py3
-rw-r--r--src/hydrilla/proxy/policies/misc.py3
-rw-r--r--src/hydrilla/proxy/policies/payload.py3
-rw-r--r--src/hydrilla/proxy/policies/payload_resource.py3
-rw-r--r--src/hydrilla/proxy/policies/rule.py3
-rw-r--r--src/hydrilla/proxy/policies/web_ui.py3
-rw-r--r--src/hydrilla/proxy/simple_dependency_satisfying.py3
-rw-r--r--src/hydrilla/proxy/state.py7
-rw-r--r--src/hydrilla/proxy/state_impl/_operations/load_packages.py3
-rw-r--r--src/hydrilla/proxy/state_impl/_operations/prune_orphans.py3
-rw-r--r--src/hydrilla/proxy/state_impl/_operations/pull_missing_files.py3
-rw-r--r--src/hydrilla/proxy/state_impl/_operations/recompute_dependencies.py3
-rw-r--r--src/hydrilla/proxy/state_impl/base.py3
-rw-r--r--src/hydrilla/proxy/state_impl/concrete_state.py3
-rw-r--r--src/hydrilla/proxy/state_impl/items.py3
-rw-r--r--src/hydrilla/proxy/state_impl/payloads.py3
-rw-r--r--src/hydrilla/proxy/state_impl/repos.py3
-rw-r--r--src/hydrilla/proxy/state_impl/rules.py3
-rw-r--r--src/hydrilla/proxy/web_ui/items.py3
-rw-r--r--src/hydrilla/proxy/web_ui/items_import.py3
-rw-r--r--src/hydrilla/proxy/web_ui/prompts.py3
-rw-r--r--src/hydrilla/proxy/web_ui/repos.py3
-rw-r--r--src/hydrilla/proxy/web_ui/root.py3
-rw-r--r--src/hydrilla/proxy/web_ui/rules.py3
27 files changed, 2 insertions, 83 deletions
diff --git a/src/hydrilla/proxy/addon.py b/src/hydrilla/proxy/addon.py
index b8ad819..328d4a1 100644
--- a/src/hydrilla/proxy/addon.py
+++ b/src/hydrilla/proxy/addon.py
@@ -30,9 +30,6 @@ This module contains the definition of a mitmproxy addon that gets instantiated
from addon script.
"""
-# Enable using with Python 3.7.
-from __future__ import annotations
-
import sys
import re
import typing as t
diff --git a/src/hydrilla/proxy/csp.py b/src/hydrilla/proxy/csp.py
index d4f2e4e..8eb914f 100644
--- a/src/hydrilla/proxy/csp.py
+++ b/src/hydrilla/proxy/csp.py
@@ -29,9 +29,6 @@
.....
"""
-# Enable using with Python 3.7.
-from __future__ import annotations
-
import re
import typing as t
import dataclasses as dc
diff --git a/src/hydrilla/proxy/http_messages.py b/src/hydrilla/proxy/http_messages.py
index 53d10db..78baf81 100644
--- a/src/hydrilla/proxy/http_messages.py
+++ b/src/hydrilla/proxy/http_messages.py
@@ -29,9 +29,6 @@
.....
"""
-# Enable using with Python 3.7.
-from __future__ import annotations
-
import dataclasses as dc
import typing as t
import sys
diff --git a/src/hydrilla/proxy/policies/base.py b/src/hydrilla/proxy/policies/base.py
index c02ea0b..b3d3172 100644
--- a/src/hydrilla/proxy/policies/base.py
+++ b/src/hydrilla/proxy/policies/base.py
@@ -29,9 +29,6 @@
.....
"""
-# Enable using with Python 3.7.
-from __future__ import annotations
-
import dataclasses as dc
import typing as t
import enum
diff --git a/src/hydrilla/proxy/policies/misc.py b/src/hydrilla/proxy/policies/misc.py
index bc3b08f..6d1e032 100644
--- a/src/hydrilla/proxy/policies/misc.py
+++ b/src/hydrilla/proxy/policies/misc.py
@@ -29,9 +29,6 @@
.....
"""
-# Enable using with Python 3.7.
-from __future__ import annotations
-
import dataclasses as dc
import typing as t
import enum
diff --git a/src/hydrilla/proxy/policies/payload.py b/src/hydrilla/proxy/policies/payload.py
index 7eef184..d3e8e30 100644
--- a/src/hydrilla/proxy/policies/payload.py
+++ b/src/hydrilla/proxy/policies/payload.py
@@ -29,9 +29,6 @@
.....
"""
-# Enable using with Python 3.7.
-from __future__ import annotations
-
import dataclasses as dc
import typing as t
import re
diff --git a/src/hydrilla/proxy/policies/payload_resource.py b/src/hydrilla/proxy/policies/payload_resource.py
index 7fdc7ac..d53f1f7 100644
--- a/src/hydrilla/proxy/policies/payload_resource.py
+++ b/src/hydrilla/proxy/policies/payload_resource.py
@@ -54,9 +54,6 @@ consider accesses to non-enabled mappings' resources a security breach
and block them by responding with 403 Not Found.
"""
-# Enable using with Python 3.7.
-from __future__ import annotations
-
import dataclasses as dc
import typing as t
import json
diff --git a/src/hydrilla/proxy/policies/rule.py b/src/hydrilla/proxy/policies/rule.py
index 833d287..b742a64 100644
--- a/src/hydrilla/proxy/policies/rule.py
+++ b/src/hydrilla/proxy/policies/rule.py
@@ -29,9 +29,6 @@
.....
"""
-# Enable using with Python 3.7.
-from __future__ import annotations
-
import dataclasses as dc
import typing as t
diff --git a/src/hydrilla/proxy/policies/web_ui.py b/src/hydrilla/proxy/policies/web_ui.py
index 9f6c0f5..9d31696 100644
--- a/src/hydrilla/proxy/policies/web_ui.py
+++ b/src/hydrilla/proxy/policies/web_ui.py
@@ -29,9 +29,6 @@
.....
"""
-# Enable using with Python 3.7.
-from __future__ import annotations
-
import dataclasses as dc
import typing as t
diff --git a/src/hydrilla/proxy/simple_dependency_satisfying.py b/src/hydrilla/proxy/simple_dependency_satisfying.py
index d03c86e..ffe4d62 100644
--- a/src/hydrilla/proxy/simple_dependency_satisfying.py
+++ b/src/hydrilla/proxy/simple_dependency_satisfying.py
@@ -33,9 +33,6 @@ The approach taken here is a very simplified one. Hopefully, this will at some
point be replaced by a solution based on some SAT solver.
"""
-# Enable using with Python 3.7.
-from __future__ import annotations
-
import dataclasses as dc
import typing as t
import functools as ft
diff --git a/src/hydrilla/proxy/state.py b/src/hydrilla/proxy/state.py
index 4142f7f..5e09367 100644
--- a/src/hydrilla/proxy/state.py
+++ b/src/hydrilla/proxy/state.py
@@ -31,9 +31,6 @@ This module defines API for keeping track of all settings, rules, mappings and
resources.
"""
-# Enable using with Python 3.7.
-from __future__ import annotations
-
import dataclasses as dc
import typing as t
@@ -79,7 +76,7 @@ class FrozenStatus(Enum):
NOT_FROZEN = 'N'
@staticmethod
- def make(letter: t.Optional[str]) -> t.Optional[FrozenStatus]:
+ def make(letter: t.Optional[str]) -> t.Optional['FrozenStatus']:
if letter is None:
return None
@@ -419,7 +416,7 @@ class ResourceVersionRef(Ref, item_infos.CorrespondsToResourceDCMixin):
...
@abstractmethod
- def get_dependency(self, identifier: str) -> ResourceVersionRef:
+ def get_dependency(self, identifier: str) -> 'ResourceVersionRef':
...
@abstractmethod
diff --git a/src/hydrilla/proxy/state_impl/_operations/load_packages.py b/src/hydrilla/proxy/state_impl/_operations/load_packages.py
index af9557a..288ee5b 100644
--- a/src/hydrilla/proxy/state_impl/_operations/load_packages.py
+++ b/src/hydrilla/proxy/state_impl/_operations/load_packages.py
@@ -29,9 +29,6 @@
....
"""
-# Enable using with Python 3.7.
-from __future__ import annotations
-
import io
import mimetypes
import sqlite3
diff --git a/src/hydrilla/proxy/state_impl/_operations/prune_orphans.py b/src/hydrilla/proxy/state_impl/_operations/prune_orphans.py
index 5eb8cf7..7bb5eb5 100644
--- a/src/hydrilla/proxy/state_impl/_operations/prune_orphans.py
+++ b/src/hydrilla/proxy/state_impl/_operations/prune_orphans.py
@@ -29,9 +29,6 @@
....
"""
-# Enable using with Python 3.7.
-from __future__ import annotations
-
import sqlite3
from pathlib import Path
diff --git a/src/hydrilla/proxy/state_impl/_operations/pull_missing_files.py b/src/hydrilla/proxy/state_impl/_operations/pull_missing_files.py
index 7c20522..b4bc1ac 100644
--- a/src/hydrilla/proxy/state_impl/_operations/pull_missing_files.py
+++ b/src/hydrilla/proxy/state_impl/_operations/pull_missing_files.py
@@ -29,9 +29,6 @@
....
"""
-# Enable using with Python 3.7.
-from __future__ import annotations
-
import sqlite3
import hashlib
diff --git a/src/hydrilla/proxy/state_impl/_operations/recompute_dependencies.py b/src/hydrilla/proxy/state_impl/_operations/recompute_dependencies.py
index 4cc4e7a..399e20e 100644
--- a/src/hydrilla/proxy/state_impl/_operations/recompute_dependencies.py
+++ b/src/hydrilla/proxy/state_impl/_operations/recompute_dependencies.py
@@ -29,9 +29,6 @@
....
"""
-# Enable using with Python 3.7.
-from __future__ import annotations
-
import sqlite3
import typing as t
diff --git a/src/hydrilla/proxy/state_impl/base.py b/src/hydrilla/proxy/state_impl/base.py
index d99feab..357ae88 100644
--- a/src/hydrilla/proxy/state_impl/base.py
+++ b/src/hydrilla/proxy/state_impl/base.py
@@ -31,9 +31,6 @@ This module defines fields that will later be part of a concrete HaketiloState
subtype.
"""
-# Enable using with Python 3.7.
-from __future__ import annotations
-
import sqlite3
import threading
import secrets
diff --git a/src/hydrilla/proxy/state_impl/concrete_state.py b/src/hydrilla/proxy/state_impl/concrete_state.py
index f189aa2..d7998d6 100644
--- a/src/hydrilla/proxy/state_impl/concrete_state.py
+++ b/src/hydrilla/proxy/state_impl/concrete_state.py
@@ -30,9 +30,6 @@ This module contains logic for keeping track of all settings, rules, mappings
and resources.
"""
-# Enable using with Python 3.7.
-from __future__ import annotations
-
import sqlite3
import secrets
import typing as t
diff --git a/src/hydrilla/proxy/state_impl/items.py b/src/hydrilla/proxy/state_impl/items.py
index 6a41300..9fa12ab 100644
--- a/src/hydrilla/proxy/state_impl/items.py
+++ b/src/hydrilla/proxy/state_impl/items.py
@@ -31,9 +31,6 @@ This module provides an interface to interact with mappings, and resources
inside Haketilo.
"""
-# Enable using with Python 3.7.
-from __future__ import annotations
-
import sqlite3
import typing as t
import dataclasses as dc
diff --git a/src/hydrilla/proxy/state_impl/payloads.py b/src/hydrilla/proxy/state_impl/payloads.py
index ebc7152..383217c 100644
--- a/src/hydrilla/proxy/state_impl/payloads.py
+++ b/src/hydrilla/proxy/state_impl/payloads.py
@@ -29,9 +29,6 @@
This module provides an interface to interact with payloads inside Haketilo.
"""
-# Enable using with Python 3.7.
-from __future__ import annotations
-
import sqlite3
import dataclasses as dc
import typing as t
diff --git a/src/hydrilla/proxy/state_impl/repos.py b/src/hydrilla/proxy/state_impl/repos.py
index 85117c8..7e38a90 100644
--- a/src/hydrilla/proxy/state_impl/repos.py
+++ b/src/hydrilla/proxy/state_impl/repos.py
@@ -30,9 +30,6 @@ This module provides an interface to interact with repositories configured
inside Haketilo.
"""
-# Enable using with Python 3.7.
-from __future__ import annotations
-
import re
import json
import tempfile
diff --git a/src/hydrilla/proxy/state_impl/rules.py b/src/hydrilla/proxy/state_impl/rules.py
index 0cdcf2c..2fed2c1 100644
--- a/src/hydrilla/proxy/state_impl/rules.py
+++ b/src/hydrilla/proxy/state_impl/rules.py
@@ -30,9 +30,6 @@ This module provides an interface to interact with script allowing/blocking
rules configured inside Haketilo.
"""
-# Enable using with Python 3.7.
-from __future__ import annotations
-
import sqlite3
import typing as t
import dataclasses as dc
diff --git a/src/hydrilla/proxy/web_ui/items.py b/src/hydrilla/proxy/web_ui/items.py
index 01b201d..808fb6d 100644
--- a/src/hydrilla/proxy/web_ui/items.py
+++ b/src/hydrilla/proxy/web_ui/items.py
@@ -29,9 +29,6 @@
.....
"""
-# Enable using with Python 3.7.
-from __future__ import annotations
-
import typing as t
from urllib.parse import unquote
diff --git a/src/hydrilla/proxy/web_ui/items_import.py b/src/hydrilla/proxy/web_ui/items_import.py
index b335237..a5b5f18 100644
--- a/src/hydrilla/proxy/web_ui/items_import.py
+++ b/src/hydrilla/proxy/web_ui/items_import.py
@@ -29,9 +29,6 @@
.....
"""
-# Enable using with Python 3.7.
-from __future__ import annotations
-
import tempfile
import zipfile
import re
diff --git a/src/hydrilla/proxy/web_ui/prompts.py b/src/hydrilla/proxy/web_ui/prompts.py
index 699409d..b5e052d 100644
--- a/src/hydrilla/proxy/web_ui/prompts.py
+++ b/src/hydrilla/proxy/web_ui/prompts.py
@@ -26,9 +26,6 @@
# code in a proprietary program, I am not going to enforce this in
# court.
-# Enable using with Python 3.7.
-from __future__ import annotations
-
import typing as t
from urllib.parse import urlencode
diff --git a/src/hydrilla/proxy/web_ui/repos.py b/src/hydrilla/proxy/web_ui/repos.py
index f5006c5..bdccd76 100644
--- a/src/hydrilla/proxy/web_ui/repos.py
+++ b/src/hydrilla/proxy/web_ui/repos.py
@@ -29,9 +29,6 @@
.....
"""
-# Enable using with Python 3.7.
-from __future__ import annotations
-
import typing as t
import flask
diff --git a/src/hydrilla/proxy/web_ui/root.py b/src/hydrilla/proxy/web_ui/root.py
index 14b44ff..18ea18e 100644
--- a/src/hydrilla/proxy/web_ui/root.py
+++ b/src/hydrilla/proxy/web_ui/root.py
@@ -29,9 +29,6 @@
.....
"""
-# Enable using with Python 3.7.
-from __future__ import annotations
-
import typing as t
from threading import Lock
diff --git a/src/hydrilla/proxy/web_ui/rules.py b/src/hydrilla/proxy/web_ui/rules.py
index 3ceb294..56753a3 100644
--- a/src/hydrilla/proxy/web_ui/rules.py
+++ b/src/hydrilla/proxy/web_ui/rules.py
@@ -25,9 +25,6 @@
# code in a proprietary program, I am not going to enforce this in
# court.
-# Enable using with Python 3.7.
-from __future__ import annotations
-
import typing as t
import flask