OPT add linting workflow #3

Merged
peter merged 5 commits from opt/add_lint_workflow into main 2026-01-31 17:44:27 +01:00
2 changed files with 5 additions and 8 deletions
Showing only changes of commit 2ee0d0f439 - Show all commits

View File

@ -27,8 +27,9 @@ schiphol = "src.main:main"
requires = ["setuptools>=61.0"] requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta" build-backend = "setuptools.build_meta"
[tool.setuptools] [tool.setuptools.packages.find]
packages = ["src"] where = ["."]
include = ["src*"]
[tool.ruff] [tool.ruff]
line-length = 100 line-length = 100

View File

@ -47,9 +47,7 @@ async def start():
total_flights = 0 total_flights = 0
while next_url: while next_url:
with tracer.start_as_current_span( with tracer.start_as_current_span("fetch_page", attributes={"http.url": next_url}):
"fetch_page", attributes={"http.url": next_url}
):
response = session.get(next_url) response = session.get(next_url)
response.raise_for_status() response.raise_for_status()
data = response.json() data = response.json()
@ -82,9 +80,7 @@ async def start():
next_url = link.split(";")[0].strip().strip("<>") next_url = link.split(";")[0].strip().strip("<>")
break break
logger.info( logger.info(f"Published {total_flights} flights to Kafka topic '{kafka_settings.topic}'")
f"Published {total_flights} flights to Kafka topic '{kafka_settings.topic}'"
)
await stream_engine.stop() await stream_engine.stop()