Skip to content

Send a phone call from AI agent, in an API call. Or, directly call the bot from the configured phone number!

Python

chore: Remove dead code

Clémence Lesné57e8c5d89adb
diff --git a/Makefile b/Makefile
index ad78ae9..8c3a187 100644
--- a/Makefile
+++ b/Makefile
@@ -60,7 +60,7 @@ test:
@echo "➡️ Running deptry..."
python3 -m deptry \
--ignore-notebooks \
- --per-rule-ignores "DEP002=aiohttp|gunicorn|uvicorn" \
+ --per-rule-ignores "DEP002=aiohttp" \
.
@echo "➡️ Running Pytest..."
diff --git a/helpers/config.py b/helpers/config.py
index 6c8777e..3ab858c 100644
--- a/helpers/config.py
+++ b/helpers/config.py
@@ -33,7 +33,7 @@ else:
if not path:
raise ConfigNotFound(f'Cannot find config file "{_CONFIG_FILE}"')
try:
- with open(path, "r", encoding="utf-8") as f:
+ with open(path, encoding="utf-8") as f:
CONFIG = RootModel.model_validate(yaml.safe_load(f))
except ValidationError as e:
raise ConfigBadFormat(f"Config values are not valid: {e.errors()}")
diff --git a/helpers/logging.py b/helpers/logging.py
index 497f249..d781159 100644
--- a/helpers/logging.py
+++ b/helpers/logging.py
@@ -3,7 +3,6 @@ from helpers.config import CONFIG
from logging import getLogger, basicConfig
from opentelemetry import trace
from opentelemetry.instrumentation.aiohttp_client import AioHttpClientInstrumentor
-from opentelemetry.instrumentation.httpx import HTTPXClientInstrumentor
from os import getenv
@@ -19,7 +18,6 @@ configure_azure_monitor(
connection_string=getenv("APPLICATIONINSIGHTS_CONNECTION_STRING"),
) # Configure Azure Application Insights exporter
AioHttpClientInstrumentor().instrument() # Instrument aiohttp
-HTTPXClientInstrumentor().instrument() # Instrument httpx
tracer = trace.get_tracer(
instrumenting_library_version=CONFIG.version,
instrumenting_module_name=f"com.github.clemlesne.{APP_NAME}",