Use Ruff and fix all its warnings

This commit is contained in:
2023-11-02 00:08:42 +01:00
parent df59c33f9b
commit 2165dd5b7b
19 changed files with 347 additions and 203 deletions

View File

@ -16,7 +16,7 @@ ENV PYTHONUNBUFFERED 1
# Update the system and install curl, it is needed for downloading Poetry.
RUN apt-get update && apt-get install curl ffmpeg -y --no-install-recommends
# 1. Create user so we don't run as root
# 1. Create user so we don't run as root
# 2. Create directories that the bot needs that are owned by the user.
# /Uploads is used to store the uploaded files.
# /home/botuser/discord-embed is where the Python code is stored.
@ -45,4 +45,4 @@ VOLUME ["/Uploads"]
# Run the server on all interfaces and on port 5000.
# You should run a reverse proxy like nginx infront of this.
EXPOSE 5000
CMD ["poetry", "run", "uvicorn", "discord_embed.main:app", "--host", "0.0.0.0", "--port", "5000"]
CMD ["poetry", "run", "uvicorn", "discord_embed.main:app", "--host", "0.0.0.0", "--port", "5000"]