Skip to content

Commit

Permalink
[Mega-Linter] Apply linters fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
umaannamalai authored and github-actions[bot] committed Jul 31, 2023
1 parent d95d477 commit 53f8400
Showing 1 changed file with 23 additions and 4 deletions.
27 changes: 23 additions & 4 deletions newrelic/api/datastore_trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,14 @@ def __repr__(self):
return "<%s object at 0x%x %s>" % (
self.__class__.__name__,
id(self),
dict(product=self.product, target=self.target, operation=self.operation, host=self.host, port_path_or_id=self.port_path_or_id, database_name=self.database_name),
dict(
product=self.product,
target=self.target,
operation=self.operation,
host=self.host,
port_path_or_id=self.port_path_or_id,
database_name=self.database_name,
),
)

def finalize_data(self, transaction, exc=None, value=None, tb=None):
Expand Down Expand Up @@ -222,7 +229,9 @@ def _nr_datastore_trace_wrapper_(wrapped, instance, args, kwargs):
else:
_database_name = database_name

trace = DatastoreTrace(_product, _target, _operation, _host, _port_path_or_id, _database_name, parent=parent, source=wrapped)
trace = DatastoreTrace(
_product, _target, _operation, _host, _port_path_or_id, _database_name, parent=parent, source=wrapped
)

if wrapper: # pylint: disable=W0125,W0126
return wrapper(wrapped, trace)(*args, **kwargs)
Expand Down Expand Up @@ -267,7 +276,15 @@ def datastore_trace(product, target, operation, host, port_path_or_id, database_
... time.sleep(*args, **kwargs)
"""
return functools.partial(DatastoreTraceWrapper, product=product, target=target, operation=operation, host=host, port_path_or_id=port_path_or_id, database_name=database_name)
return functools.partial(
DatastoreTraceWrapper,
product=product,
target=target,
operation=operation,
host=host,
port_path_or_id=port_path_or_id,
database_name=database_name,
)


def wrap_datastore_trace(module, object_path, product, target, operation, host, port_path_or_id, database_name):
Expand Down Expand Up @@ -307,4 +324,6 @@ def wrap_datastore_trace(module, object_path, product, target, operation, host,
... 'sleep')
"""
wrap_object(module, object_path, DatastoreTraceWrapper, (product, target, operation, host, port_path_or_id, database_name))
wrap_object(
module, object_path, DatastoreTraceWrapper, (product, target, operation, host, port_path_or_id, database_name)
)

0 comments on commit 53f8400

Please sign in to comment.