Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ocelotl committed Nov 18, 2022
1 parent 123255d commit dc33ffe
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ def _instrument(self, **kwargs):
None
"""
tracer_provider = kwargs.get("tracer_provider")
# pylint: disable=attribute-defined-outside-init
self._tracer = trace.get_tracer(__name__, __version__, tracer_provider)
self.capture_parameters = kwargs.get("capture_parameters", False)
if TORTOISE_SQLITE_SUPPORT:
Expand Down Expand Up @@ -187,7 +188,7 @@ def _uninstrument(self, **kwargs):
unwrap(
tortoise.backends.mysql.client.MySQLClient, "execute_script"
)
if self.TORTOISE_POSTGRES_SUPPORT:
if TORTOISE_POSTGRES_SUPPORT:
unwrap(
tortoise.backends.asyncpg.client.AsyncpgDBClient,
"execute_query",
Expand Down Expand Up @@ -289,7 +290,7 @@ async def _do_execute(self, func, instance, args, kwargs):
async def _from_queryset(self, func, modelcls, args, kwargs):

exception = None
name = "pydantic.{0}".format(func.__name__)
name = f"pydantic.{func.__name__}"

with self._tracer.start_as_current_span(
name, kind=SpanKind.INTERNAL
Expand Down

0 comments on commit dc33ffe

Please sign in to comment.