Skip to content

Commit 51f9bbb

Browse files
[MegaLinter] Apply linters fixes
1 parent c1765f0 commit 51f9bbb

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

newrelic/core/external_node.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def trace_node(self, stats, root, connections):
172172
def span_event(self, settings, base_attrs=None, parent_guid=None, attr_class=dict):
173173
self.agent_attributes["http.url"] = self.http_url
174174

175-
i_attrs = base_attrs and base_attrs.copy() or attr_class()
175+
i_attrs = (base_attrs and base_attrs.copy()) or attr_class()
176176
i_attrs["category"] = "http"
177177
i_attrs["span.kind"] = "client"
178178
i_attrs["component"] = self.library

newrelic/core/function_node.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def trace_node(self, stats, root, connections):
115115
)
116116

117117
def span_event(self, settings, base_attrs=None, parent_guid=None, attr_class=dict):
118-
i_attrs = base_attrs and base_attrs.copy() or attr_class()
118+
i_attrs = (base_attrs and base_attrs.copy()) or attr_class()
119119
i_attrs["name"] = f"{self.group}/{self.name}"
120120

121121
return super().span_event(settings, base_attrs=i_attrs, parent_guid=parent_guid, attr_class=attr_class)

newrelic/core/loop_node.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def trace_node(self, stats, root, connections):
8080
)
8181

8282
def span_event(self, settings, base_attrs=None, parent_guid=None, attr_class=dict):
83-
i_attrs = base_attrs and base_attrs.copy() or attr_class()
83+
i_attrs = (base_attrs and base_attrs.copy()) or attr_class()
8484
i_attrs["name"] = f"EventLoop/Wait/{self.name}"
8585

8686
return super().span_event(settings, base_attrs=i_attrs, parent_guid=parent_guid, attr_class=attr_class)

newrelic/core/node_mixin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def db_instance(self):
111111
def span_event(self, settings, base_attrs=None, parent_guid=None, attr_class=dict):
112112
a_attrs = self.agent_attributes
113113
a_attrs["db.instance"] = self.db_instance
114-
i_attrs = base_attrs and base_attrs.copy() or attr_class()
114+
i_attrs = (base_attrs and base_attrs.copy()) or attr_class()
115115

116116
i_attrs["category"] = "datastore"
117117
i_attrs["span.kind"] = "client"

newrelic/core/root_node.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
class RootNode(_RootNode, GenericNodeMixin):
4040
def span_event(self, settings, base_attrs=None, parent_guid=None, attr_class=dict):
41-
i_attrs = base_attrs and base_attrs.copy() or attr_class()
41+
i_attrs = (base_attrs and base_attrs.copy()) or attr_class()
4242
i_attrs["transaction.name"] = self.path
4343
i_attrs["nr.entryPoint"] = True
4444
if self.trusted_parent_span:

0 commit comments

Comments
 (0)