Skip to content

Commit

Permalink
v0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
wwakabobik committed Nov 24, 2023
1 parent e2da642 commit cbff3dd
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions examples/image_generation/image_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
from pprint import pprint
from urllib.parse import unquote

import asyncio
import aiofiles
import aiohttp
import asyncio
from ablt_python_api import ABLTApi_async as ABLTApi
from leonardo_api import LeonardoAsync as Leonardo
from openai_python_api.dalle import DALLE
Expand Down Expand Up @@ -98,7 +98,7 @@ def find_and_clear(log_file):
:rtype: str
"""
for _ in range(12):
with open(log_file, "r+") as file:
with open(log_file, "r+", encoding="utf-8") as file:
lines = file.readlines()
for line in reversed(lines):
match = re.search(r"Found an attachment: (.*)", line)
Expand Down Expand Up @@ -131,7 +131,7 @@ async def save_image_from_url(url, file_path):
return None


async def generate_image():
async def generate_image(): # pylint: disable=too-many-locals
"""
Generate image.
Expand Down
2 changes: 1 addition & 1 deletion examples/llm_api_comparison/wrapped_llm_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def main():
save_to_csv(file_name="llm_wrapped.csv", model_name=model, question=prompt, metrics=response)
error_counter = 5
break
except Exception as error:
except Exception as error: # pylint: disable=broad-except
if error_counter == 0:
print("Broken API? Skipping...")
break
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ extend-ignore = """
I004,
WPS110,
WPS420,
C812
C812,
"""

[tool.pylint]
Expand Down
2 changes: 1 addition & 1 deletion utils/discord_interactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import aiohttp


class DiscordInteractions:
class DiscordInteractions: # pylint: disable=too-few-public-methods
"""Discord interactions to python API."""

def __init__(self, token, **kwargs):
Expand Down
2 changes: 1 addition & 1 deletion utils/discord_watcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from utils.logger_config import setup_logger


class DiscordWatcher(commands.Bot, ABC):
class DiscordWatcher(commands.Bot, ABC): # pylint: disable=too-many-ancestors
"""Discord bot watcher for getting messages (images, urls, embeds) from a specific user."""

def __init__(self, watch_user_id=None, **options):
Expand Down

0 comments on commit cbff3dd

Please sign in to comment.