From ff5c8ba548731d41c7d11fffa187849a2e83b3c7 Mon Sep 17 00:00:00 2001 From: Peter Date: Mon, 29 Dec 2025 17:00:39 +0100 Subject: [PATCH] OPT add linting workflow --- pyproject.toml | 5 +++-- src/main.py | 8 ++------ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 670185a..c410960 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,8 +27,9 @@ schiphol = "src.main:main" requires = ["setuptools>=61.0"] build-backend = "setuptools.build_meta" -[tool.setuptools] -packages = ["src"] +[tool.setuptools.packages.find] +where = ["."] +include = ["src*"] [tool.ruff] line-length = 100 diff --git a/src/main.py b/src/main.py index 9986c6c..57aa278 100644 --- a/src/main.py +++ b/src/main.py @@ -47,9 +47,7 @@ async def start(): total_flights = 0 while next_url: - with tracer.start_as_current_span( - "fetch_page", attributes={"http.url": next_url} - ): + with tracer.start_as_current_span("fetch_page", attributes={"http.url": next_url}): response = session.get(next_url) response.raise_for_status() data = response.json() @@ -82,9 +80,7 @@ async def start(): next_url = link.split(";")[0].strip().strip("<>") break - logger.info( - f"Published {total_flights} flights to Kafka topic '{kafka_settings.topic}'" - ) + logger.info(f"Published {total_flights} flights to Kafka topic '{kafka_settings.topic}'") await stream_engine.stop()