Skip to content

Commit

Permalink
Remove args
Browse files Browse the repository at this point in the history
  • Loading branch information
ocelotl committed May 2, 2022
1 parent 41581d3 commit 7eb6134
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@ def _translate_data(
)

def export(
self, metrics: Sequence[Metric], *args, **kwargs
self, metrics: Sequence[Metric], **kwargs
) -> MetricExportResult:
return self._export(metrics)

def shutdown(self, *args, **kwargs):
def shutdown(self, **kwargs):
pass
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,12 @@ def __init__(self, prefix: str = "") -> None:
REGISTRY.register(self._collector)
self._collector._callback = self.collect

def _receive_metrics(
self, metrics: Iterable[Metric], *args, **kwargs
) -> None:
def _receive_metrics(self, metrics: Iterable[Metric], **kwargs) -> None:
if metrics is None:
return
self._collector.add_metrics_data(metrics)

def shutdown(self, *args, **kwargs) -> bool:
def shutdown(self, **kwargs) -> bool:
REGISTRY.unregister(self._collector)
return True

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,12 @@

class MeasurementConsumer(ABC):
@abstractmethod
def consume_measurement(
self, measurement: Measurement, *args, **kwargs
) -> None:
def consume_measurement(self, measurement: Measurement, **kwargs) -> None:
pass

@abstractmethod
def register_asynchronous_instrument(
self, instrument: "_Asynchronous", *args, **kwargs
self, instrument: "_Asynchronous", **kwargs
):
pass

Expand All @@ -48,7 +46,6 @@ def collect(
self,
metric_reader: MetricReader,
instrument_type_temporality: Dict[type, AggregationTemporality],
*args,
**kwargs
) -> Iterable[Metric]:
pass
Expand All @@ -67,14 +64,12 @@ def __init__(self, sdk_config: SdkConfiguration) -> None:
}
self._async_instruments: List["_Asynchronous"] = []

def consume_measurement(
self, measurement: Measurement, *args, **kwargs
) -> None:
def consume_measurement(self, measurement: Measurement, **kwargs) -> None:
for reader_storage in self._reader_storages.values():
reader_storage.consume_measurement(measurement)

def register_asynchronous_instrument(
self, instrument: "_Asynchronous", *args, **kwargs
self, instrument: "_Asynchronous", **kwargs
) -> None:
with self._lock:
self._async_instruments.append(instrument)
Expand All @@ -83,7 +78,6 @@ def collect(
self,
metric_reader: MetricReader,
instrument_type_temporality: Dict[type, AggregationTemporality],
*args,
**kwargs
) -> Iterable[Metric]:
with self._lock:
Expand Down

0 comments on commit 7eb6134

Please sign in to comment.