Skip to content

Commit

Permalink
fix: linter issues based on superlinter rules!
Browse files Browse the repository at this point in the history
  • Loading branch information
amindadgar committed Jan 25, 2024
1 parent 52348ce commit 7fda168
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def remove_empty_str(data: list[str]):
return data


def check_no_content_only_links(content: str, link_pattern: str = r"\[URL\d\]") -> str:
def check_no_content_only_links(content: str, link_pattern: str = r"\[URL\d\]") -> bool:
"""
check if there's just links in the function and there's no content written
Expand All @@ -26,7 +26,7 @@ def check_no_content_only_links(content: str, link_pattern: str = r"\[URL\d\]")
the message content
link_pattern : str
the pattern of link
default pattern is for links which is `[URL\d]`
default pattern is for links which is "`[URL\d]`"
Returns
--------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import logging
from typing import Any

from hivemind_etl_helpers.src.db.discord.utils.content_parser import (
remove_empty_str,
check_no_content_only_links,
remove_none_from_list,
)
from hivemind_etl_helpers.src.db.discord.utils.id_transform import convert_role_id
from hivemind_etl_helpers.src.db.discord.utils.merge_user_ids_fetch_names import (
merge_user_ids_and_fetch_names,
Expand All @@ -14,11 +19,6 @@
from hivemind_etl_helpers.src.db.discord.utils.prepare_reactions_id import (
prepare_raction_ids,
)
from hivemind_etl_helpers.src.db.discord.utils.content_parser import (
remove_empty_str,
check_no_content_only_links,
remove_none_from_list,
)
from llama_index import Document


Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import unittest

from hivemind_etl_helpers.src.db.discord.utils.content_parser import (
check_no_content_only_links,
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import unittest

from hivemind_etl_helpers.src.db.discord.utils.content_parser import (
remove_empty_str,
)
from hivemind_etl_helpers.src.db.discord.utils.content_parser import remove_empty_str


class TestRemoveEmptyStr(unittest.TestCase):
Expand Down

0 comments on commit 7fda168

Please sign in to comment.