Skip to content

Commit f217ed1

Browse files
committed
lint fix
1 parent 364f9de commit f217ed1

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

aws-opentelemetry-distro/src/amazon/opentelemetry/distro/otlp_sigv4_exporter.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ def _export(self, serialized_data: bytes):
6767

6868
return super()._export(serialized_data)
6969

70-
def _validate_exporter_endpoint(self, endpoint: str) -> Optional[str]:
70+
@staticmethod
71+
def _validate_exporter_endpoint(endpoint: str) -> Optional[str]:
7172
if not endpoint:
7273
return None
7374

@@ -83,12 +84,11 @@ def _validate_exporter_endpoint(self, endpoint: str) -> Optional[str]:
8384

8485
return None
8586

86-
else:
87-
_logger.error(
88-
f"Invalid XRay traces endpoint: {endpoint}."
89-
"The traces endpoint follows the pattern https://xray.[AWSRegion].amazonaws.com/v1/traces. "
90-
"For example, for the US West (Oregon) (us-west-2) Region, the endpoint will be "
91-
"https://xray.us-west-2.amazonaws.com/v1/traces."
92-
)
87+
_logger.error(
88+
f"Invalid XRay traces endpoint: {endpoint}."
89+
"The traces endpoint follows the pattern https://xray.[AWSRegion].amazonaws.com/v1/traces. "
90+
"For example, for the US West (Oregon) (us-west-2) Region, the endpoint will be "
91+
"https://xray.us-west-2.amazonaws.com/v1/traces."
92+
)
9393

9494
return None

aws-opentelemetry-distro/tests/amazon/opentelemetry/distro/test_otlp_sigv4_exporter.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,8 @@ def validate_exporter_extends_http_span_exporter(self, exporter, endpoint):
264264
)
265265
self.assertEqual(exporter._session.headers.get("User-Agent"), USER_AGENT)
266266

267-
def create_span(self, name="test_span", kind=SpanKind.INTERNAL):
267+
@staticmethod
268+
def create_span(name="test_span", kind=SpanKind.INTERNAL):
268269
span = _Span(
269270
name=name,
270271
context=SpanContext(

0 commit comments

Comments
 (0)