Skip to content

Commit bd62da0

Browse files
committed
Merge remote-tracking branch 'origin/main' into fix-linter-flake8-comprehensions
2 parents 192d825 + a7fb3af commit bd62da0

File tree

66 files changed

+100
-125
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+100
-125
lines changed

newrelic/api/database_trace.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ def _nr_database_trace_wrapper_(wrapped, instance, args, kwargs):
249249

250250
trace = DatabaseTrace(_sql, dbapi2_module, parent=parent, source=wrapped)
251251

252-
if wrapper: # pylint: disable=W0125,W0126
252+
if wrapper:
253253
return wrapper(wrapped, trace)(*args, **kwargs)
254254

255255
with trace:

newrelic/api/datastore_trace.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ def _nr_datastore_trace_wrapper_(wrapped, instance, args, kwargs):
226226
_product, _target, _operation, _host, _port_path_or_id, _database_name, parent=parent, source=wrapped
227227
)
228228

229-
if wrapper: # pylint: disable=W0125,W0126
229+
if wrapper:
230230
return wrapper(wrapped, trace)(*args, **kwargs)
231231

232232
with trace:

newrelic/api/external_trace.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def dynamic_wrapper(wrapped, instance, args, kwargs):
9292

9393
trace = ExternalTrace(library, _url, _method, parent=parent, source=wrapped)
9494

95-
if wrapper: # pylint: disable=W0125,W0126
95+
if wrapper:
9696
return wrapper(wrapped, trace)(*args, **kwargs)
9797

9898
with trace:
@@ -109,7 +109,7 @@ def literal_wrapper(wrapped, instance, args, kwargs):
109109

110110
trace = ExternalTrace(library, url, method, parent=parent, source=wrapped)
111111

112-
if wrapper: # pylint: disable=W0125,W0126
112+
if wrapper:
113113
return wrapper(wrapped, trace)(*args, **kwargs)
114114

115115
with trace:

newrelic/api/function_trace.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def dynamic_wrapper(wrapped, instance, args, kwargs):
131131

132132
trace = FunctionTrace(_name, _group, _label, _params, terminal, rollup, parent=parent, source=wrapped)
133133

134-
if wrapper: # pylint: disable=W0125,W0126
134+
if wrapper:
135135
return wrapper(wrapped, trace)(*args, **kwargs)
136136

137137
with trace:
@@ -150,7 +150,7 @@ def literal_wrapper(wrapped, instance, args, kwargs):
150150

151151
trace = FunctionTrace(_name, group, label, params, terminal, rollup, parent=parent, source=wrapped)
152152

153-
if wrapper: # pylint: disable=W0125,W0126
153+
if wrapper:
154154
return wrapper(wrapped, trace)(*args, **kwargs)
155155

156156
with trace:

newrelic/api/graphql_trace.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def _nr_graphql_trace_wrapper_(wrapped, instance, args, kwargs):
112112

113113
trace = GraphQLOperationTrace(parent=parent, source=wrapped)
114114

115-
if wrapper: # pylint: disable=W0125,W0126
115+
if wrapper:
116116
return wrapper(wrapped, trace)(*args, **kwargs)
117117

118118
with trace:
@@ -202,7 +202,7 @@ def _nr_graphql_trace_wrapper_(wrapped, instance, args, kwargs):
202202

203203
trace = GraphQLResolverTrace(parent=parent, source=wrapped)
204204

205-
if wrapper: # pylint: disable=W0125,W0126
205+
if wrapper:
206206
return wrapper(wrapped, trace)(*args, **kwargs)
207207

208208
with trace:

newrelic/api/memcache_trace.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def _nr_wrapper_memcache_trace_(wrapped, instance, args, kwargs):
7171

7272
trace = MemcacheTrace(_command, parent=parent, source=wrapped)
7373

74-
if wrapper: # pylint: disable=W0125,W0126
74+
if wrapper:
7575
return wrapper(wrapped, trace)(*args, **kwargs)
7676

7777
with trace:

newrelic/api/message_trace.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def _nr_message_trace_wrapper_(wrapped, instance, args, kwargs):
145145
source=wrapped,
146146
)
147147

148-
if wrapper: # pylint: disable=W0125,W0126
148+
if wrapper:
149149
return wrapper(wrapped, trace)(*args, **kwargs)
150150

151151
with trace:

newrelic/api/transaction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def complete_root(self):
119119
self.exited = True
120120

121121
@staticmethod
122-
def complete_trace(): # pylint: disable=arguments-differ
122+
def complete_trace():
123123
pass
124124

125125
@property

newrelic/api/web_transaction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ def browser_timing_header(self, nonce=None):
468468

469469
except UnicodeError:
470470
if not WebTransaction.unicode_error_reported:
471-
_logger.error("ASCII encoding of js-agent-header failed.", header)
471+
_logger.error("ASCII encoding of js-agent-header failed: %s", header)
472472
WebTransaction.unicode_error_reported = True
473473

474474
header = ""

newrelic/common/agent_http.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@
1818
import zlib
1919
from pprint import pprint
2020

21-
import newrelic.packages.urllib3 as urllib3
2221
from newrelic import version
2322
from newrelic.common import certs
2423
from newrelic.common.encoding_utils import json_decode, json_encode, obfuscate_license_key
2524
from newrelic.common.object_names import callable_name
2625
from newrelic.common.object_wrapper import patch_function_wrapper
2726
from newrelic.core.internal_metrics import internal_count_metric, internal_metric
2827
from newrelic.network.exceptions import NetworkInterfaceException
28+
from newrelic.packages import urllib3
2929

3030
try:
3131
from ssl import get_default_verify_paths
@@ -239,7 +239,7 @@ def __init__(
239239
default_content_encoding_header="Identity",
240240
):
241241
self._host = host
242-
port = self._port = port
242+
self._port = port
243243
self._compression_threshold = compression_threshold
244244
self._compression_level = compression_level
245245
self._compression_method = compression_method

0 commit comments

Comments
 (0)