Skip to content

Commit ccdd224

Browse files
committed
Fix lint issues
1 parent 478d1f3 commit ccdd224

File tree

5 files changed

+12
-13
lines changed

5 files changed

+12
-13
lines changed

exporter/opentelemetry-exporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/_log_exporter/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,15 +138,15 @@ def _export(self, serialized_data: bytes, timeout_sec: float):
138138
url=self._endpoint,
139139
data=data,
140140
verify=self._certificate_file,
141-
timeout=timeout_sec
141+
timeout=timeout_sec,
142142
cert=self._client_cert,
143143
)
144144
except ConnectionError:
145145
resp = self._session.post(
146146
url=self._endpoint,
147147
data=data,
148148
verify=self._certificate_file,
149-
timeout=timeout_sec
149+
timeout=timeout_sec,
150150
cert=self._client_cert,
151151
)
152152
return resp

opentelemetry-sdk/src/opentelemetry/sdk/_logs/_internal/export/__init__.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,6 @@ def shutdown(self):
9292
Called when the SDK is shut down.
9393
"""
9494

95-
@abc.abstractmethod
96-
def force_flush(self, timeout_millis: int = 30000) -> bool:
97-
"""Hint to ensure that the export of any spans the exporter has received
98-
prior to the call to ForceFlush SHOULD be completed as soon as possible, preferably
99-
before returning from this method.
100-
"""
101-
10295

10396
class ConsoleLogExporter(LogExporter):
10497
"""Implementation of :class:`LogExporter` that prints log records to the
@@ -127,7 +120,6 @@ def export(self, batch: Sequence[LogData]):
127120
def shutdown(self):
128121
pass
129122

130-
131123
class SimpleLogRecordProcessor(LogRecordProcessor):
132124
"""This is an implementation of LogRecordProcessor which passes
133125
received logs in the export-friendly LogData representation to the

opentelemetry-sdk/src/opentelemetry/sdk/trace/export/__init__.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ class SpanExportResult(Enum):
5757
FAILURE = 1
5858

5959

60-
6160
class SpanExporter(abc.ABC):
6261
"""Interface for exporting spans.
6362
@@ -91,7 +90,6 @@ def shutdown(self) -> None:
9190
Called when the SDK is shut down.
9291
"""
9392

94-
@abc.abstractmethod
9593
def force_flush(self, timeout_millis: int = 30000) -> bool:
9694
"""Hint to ensure that the export of any spans the exporter has received
9795
prior to the call to ForceFlush SHOULD be completed as soon as possible, preferably
@@ -517,11 +515,15 @@ def __init__(
517515
self.formatter = formatter
518516
self.service_name = service_name
519517

518+
# pylint: disable=arguments-differ
520519
def export(self, spans: typing.Sequence[ReadableSpan]) -> SpanExportResult:
521520
for span in spans:
522521
self.out.write(self.formatter(span))
523522
self.out.flush()
524523
return SpanExportResult.SUCCESS
525524

526-
def force_flush(self, timeout_millis: int = 30000) -> bool:
525+
def force_flush(self, timeout_millis: int = 30000):
527526
return True
527+
528+
def shutdown(self):
529+
pass

opentelemetry-sdk/src/opentelemetry/sdk/trace/export/in_memory_span_exporter.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ def get_finished_spans(self) -> typing.Tuple[ReadableSpan, ...]:
4242
with self._lock:
4343
return tuple(self._finished_spans)
4444

45+
# pylint: disable=arguments-differ
4546
def export(self, spans: typing.Sequence[ReadableSpan]) -> SpanExportResult:
4647
"""Stores a list of spans in memory."""
4748
if self._stopped:

opentelemetry-sdk/tests/trace/export/test_export.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ def __init__(
6060
self.export_timeout = export_timeout_millis / 1e3
6161
self.export_event = export_event
6262

63+
# pylint: disable=arguments-differ
6364
def export(self, spans: trace.Span) -> export.SpanExportResult:
6465
if (
6566
self.max_export_batch_size is not None
@@ -75,6 +76,9 @@ def export(self, spans: trace.Span) -> export.SpanExportResult:
7576
def shutdown(self):
7677
self.is_shutdown = True
7778

79+
def force_flush(self, timeout_millis: int = 30000) -> bool:
80+
return True
81+
7882

7983
class TestSimpleSpanProcessor(unittest.TestCase):
8084
def test_simple_span_processor(self):

0 commit comments

Comments
 (0)