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)