Skip to content

Commit 3f51f34

Browse files
authored
Fix "opentelemetry.instrumentation.sqlalchemy" has no attribute "SQLAlchemyInstrumentor" [attr-defined] (#95)
Fixed opentelemetry mypy error.
1 parent 705821d commit 3f51f34

File tree

1 file changed

+3
-1
lines changed
  • fastapi_template/template/{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/web

1 file changed

+3
-1
lines changed

fastapi_template/template/{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/web/lifetime.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@
4747
from opentelemetry.instrumentation.asyncpg import AsyncPGInstrumentor # type: ignore
4848
{%- endif %}
4949
{%- if cookiecutter.orm == "sqlalchemy" %}
50-
from opentelemetry.instrumentation.sqlalchemy import SQLAlchemyInstrumentor # type: ignore
50+
from opentelemetry.instrumentation.sqlalchemy import ( # type: ignore
51+
SQLAlchemyInstrumentor,
52+
)
5153
{%- endif %}
5254

5355
{%- endif %}

0 commit comments

Comments
 (0)