From 2c721890557ac7caaca3e5521031db9758114f1c Mon Sep 17 00:00:00 2001 From: Tony Rewin Date: Thu, 28 Sep 2023 15:51:28 +0300 Subject: [PATCH] lintbump --- .pre-commit-config.yaml | 8 ++++---- Dockerfile | 8 ++++---- resolvers/zine/profile.py | 1 + 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index af489f3a..fc2116ab 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -23,20 +23,20 @@ repos: - id: trailing-whitespace - repo: https://github.com/timothycrosley/isort - rev: 5.5.3 + rev: 5.12.0 hooks: - id: isort - repo: https://github.com/ambv/black - rev: 20.8b1 + rev: 23.9.1 hooks: - id: black args: - --line-length=100 - --skip-string-normalization - - repo: https://gitlab.com/pycqa/flake8 - rev: 3.8.3 + - repo: https://github.com/PyCQA/flake8 + rev: 6.1.0 hooks: - id: flake8 args: diff --git a/Dockerfile b/Dockerfile index 49405943..4dead0d4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,9 @@ -FROM python:3.10 +FROM python:slim +WORKDIR /app EXPOSE 8080 ADD nginx.conf.sigil ./ -RUN /usr/local/bin/python -m pip install --upgrade pip -WORKDIR /usr/src/app -COPY requirements.txt ./ +COPY requirements.txt . +RUN apt update && apt install -y git RUN pip install -r requirements.txt COPY . . diff --git a/resolvers/zine/profile.py b/resolvers/zine/profile.py index 98041b2c..aba7b17e 100644 --- a/resolvers/zine/profile.py +++ b/resolvers/zine/profile.py @@ -130,6 +130,7 @@ async def get_followed_authors(_, _info, slug) -> List[User]: return await followed_authors(user_id) + # 2. Now, we can use the user_id to get the followed authors async def followed_authors(user_id): q = select(User)