From 8082f7f012bec9346569b3951f2994e554ef363c Mon Sep 17 00:00:00 2001 From: Adrien Date: Sun, 11 Feb 2024 19:56:18 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7=20Remove=20the=20deps=20installati?= =?UTF-8?q?on=20and=20disable=20mypy=20caching?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/.woodpecker/.lint.yaml | 7 +++---- backend/api/models/stop.py | 20 ++++++++++++++++++++ 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/backend/.woodpecker/.lint.yaml b/backend/.woodpecker/.lint.yaml index e9260ef..a0f633c 100644 --- a/backend/.woodpecker/.lint.yaml +++ b/backend/.woodpecker/.lint.yaml @@ -11,9 +11,8 @@ steps: commands: | cd backend wget -O - -q https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh | sh -s latest - apk add gcc pip install poetry - poetry install --with=linters + poetry install --only=linters ruff --output-format sarif . | ./bin/reviewdog -f sarif -reporter gitea-pr-review - name: mypy @@ -24,5 +23,5 @@ steps: cd backend wget -O - -q https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh | sh -s latest pip install poetry - poetry install --with=linters - mypy . | ./bin/reviewdog -f mypy -reporter gitea-pr-review + poetry install --only=linters + mypy --no-incremental . | ./bin/reviewdog -f mypy -reporter gitea-pr-review diff --git a/backend/api/models/stop.py b/backend/api/models/stop.py index 05e05e2..43c0a8d 100644 --- a/backend/api/models/stop.py +++ b/backend/api/models/stop.py @@ -35,6 +35,26 @@ if TYPE_CHECKING: logger = getLogger(__name__) +# import cProfile +# import io +# import pstats +# import contextlib + + +# @contextlib.contextmanager +# def profiled(): +# pr = cProfile.Profile() +# pr.enable() +# yield +# pr.disable() +# s = io.StringIO() +# ps = pstats.Stats(pr, stream=s).sort_stats("cumulative") +# ps.print_stats() +# # uncomment this to see who's calling what +# # ps.print_callers() +# print(s.getvalue()) + + class StopAreaStopAssociations(Base): id = mapped_column(BigInteger, primary_key=True)