From e2bdde2b8b900e15d827a355fafdab2e91a46846 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 21 Jun 2023 03:52:49 +0200 Subject: [PATCH] Continued: - move fba.blacklist to fba.helpers package --- fba/commands.py | 2 +- fba/fba.py | 3 ++- fba/federation.py | 2 +- fba/{ => helpers}/blacklist.py | 0 fba/models/blocks.py | 3 ++- fba/models/instances.py | 2 +- fba/networks/lemmy.py | 2 +- fba/networks/mastodon.py | 2 +- fba/networks/misskey.py | 2 +- fba/networks/pleroma.py | 2 +- 10 files changed, 11 insertions(+), 9 deletions(-) rename fba/{ => helpers}/blacklist.py (100%) diff --git a/fba/commands.py b/fba/commands.py index f276a1f..4dca5fd 100644 --- a/fba/commands.py +++ b/fba/commands.py @@ -26,12 +26,12 @@ import markdown import reqto import validators -from fba import blacklist from fba import config from fba import federation from fba import fba from fba import network +from fba.helpers import blacklist from fba.helpers import cookies from fba.helpers import locking from fba.helpers import tidyup diff --git a/fba/fba.py b/fba/fba.py index 335028c..db37abf 100644 --- a/fba/fba.py +++ b/fba/fba.py @@ -21,10 +21,11 @@ from urllib.parse import urlparse import requests import validators -from fba import blacklist from fba import federation from fba import network +from fba.helpers import blacklist + from fba.models import instances # Connect to database diff --git a/fba/federation.py b/fba/federation.py index 1d15450..397e63b 100644 --- a/fba/federation.py +++ b/fba/federation.py @@ -18,11 +18,11 @@ from urllib.parse import urlparse import bs4 import validators -from fba import blacklist from fba import config from fba import csrf from fba import network +from fba.helpers import blacklist from fba.helpers import tidyup from fba.helpers import version diff --git a/fba/blacklist.py b/fba/helpers/blacklist.py similarity index 100% rename from fba/blacklist.py rename to fba/helpers/blacklist.py diff --git a/fba/models/blocks.py b/fba/models/blocks.py index 2111164..0858d52 100644 --- a/fba/models/blocks.py +++ b/fba/models/blocks.py @@ -17,8 +17,9 @@ import time import validators -from fba import blacklist from fba import fba + +from fba.helpers import blacklist from fba.helpers import tidyup def update_reason(reason: str, blocker: str, blocked: str, block_level: str): diff --git a/fba/models/instances.py b/fba/models/instances.py index 0ed262e..836a1ef 100644 --- a/fba/models/instances.py +++ b/fba/models/instances.py @@ -20,12 +20,12 @@ import time import requests import validators -from fba import blacklist from fba import config from fba import fba from fba import federation from fba import network +from fba.helpers import blacklist from fba.helpers import cache from fba.models import error_log diff --git a/fba/networks/lemmy.py b/fba/networks/lemmy.py index e05c2cc..541dd55 100644 --- a/fba/networks/lemmy.py +++ b/fba/networks/lemmy.py @@ -19,13 +19,13 @@ import inspect import bs4 import validators -from fba import blacklist from fba import config from fba import csrf from fba import fba from fba import federation from fba import network +from fba.helpers import blacklist from fba.helpers import tidyup from fba.models import blocks diff --git a/fba/networks/mastodon.py b/fba/networks/mastodon.py index 61971af..9aeec1b 100644 --- a/fba/networks/mastodon.py +++ b/fba/networks/mastodon.py @@ -19,12 +19,12 @@ import inspect import bs4 import validators -from fba import blacklist from fba import config from fba import csrf from fba import fba from fba import network +from fba.helpers import blacklist from fba.helpers import tidyup from fba.models import blocks diff --git a/fba/networks/misskey.py b/fba/networks/misskey.py index 152d971..3b93b54 100644 --- a/fba/networks/misskey.py +++ b/fba/networks/misskey.py @@ -16,11 +16,11 @@ import json -from fba import blacklist from fba import config from fba import csrf from fba import network +from fba.helpers import blacklist from fba.helpers import dicts from fba.helpers import tidyup diff --git a/fba/networks/pleroma.py b/fba/networks/pleroma.py index 546d7c5..75dfd2b 100644 --- a/fba/networks/pleroma.py +++ b/fba/networks/pleroma.py @@ -19,12 +19,12 @@ import inspect import bs4 import validators -from fba import blacklist from fba import config from fba import fba from fba import federation from fba import network +from fba.helpers import blacklist from fba.helpers import tidyup from fba.models import blocks -- 2.39.5