Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
shalevr committed Jan 15, 2023
1 parent 0975434 commit 073a31a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ class SQLAlchemyInstrumentor(BaseInstrumentor):
See `BaseInstrumentor`
"""

engines = []

def instrumentation_dependencies(self) -> Collection[str]:
return _instruments

Expand Down Expand Up @@ -159,7 +161,6 @@ def _instrument(self, **kwargs):
_wrap_create_async_engine(tracer_provider, enable_commenter),
)

self.engines = []
if kwargs.get("engine") is not None:
self.engines.append(
EngineTracer(
Expand All @@ -170,7 +171,7 @@ def _instrument(self, **kwargs):
)
)
return self.engines[0]
elif kwargs.get("engines") is not None and isinstance(
if kwargs.get("engines") is not None and isinstance(
kwargs.get("engines"), Sequence
):
self.engines = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
import os
import re

from sqlalchemy.event import (
from sqlalchemy.event import ( # pylint: disable=no-name-in-module
listen,
remove,
) # pylint: disable=no-name-in-module
)

from opentelemetry import trace
from opentelemetry.instrumentation.sqlalchemy.package import (
Expand Down

0 comments on commit 073a31a

Please sign in to comment.