Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ocelotl committed Sep 16, 2021
1 parent 01f2557 commit ccd3c86
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 15 deletions.
3 changes: 1 addition & 2 deletions opentelemetry-api/src/opentelemetry/metrics/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
from abc import ABC, abstractmethod
from logging import getLogger
from os import environ
from typing import Optional, cast
from threading import RLock
from typing import Optional, cast

from opentelemetry.environment_variables import OTEL_PYTHON_METER_PROVIDER
from opentelemetry.metrics.instrument import (
Expand All @@ -43,7 +43,6 @@


class MeterProvider(ABC):

def __init__(self):
super().__init__()
self._lock = RLock()
Expand Down
14 changes: 4 additions & 10 deletions opentelemetry-api/src/opentelemetry/metrics/instrument.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
from abc import ABC, abstractmethod
from logging import getLogger
from re import compile as compile_
from types import GeneratorType
from threading import RLock
from types import GeneratorType

from opentelemetry.metrics.measurement import Measurement

Expand Down Expand Up @@ -167,9 +167,7 @@ def observe(self):

class DefaultObservableCounter(ObservableCounter):
def __init__(self, name, callback, unit="", description=""):
super().__init__(
name, callback, unit=unit, description=description
)
super().__init__(name, callback, unit=unit, description=description)


class ObservableUpDownCounter(_NonMonotonic, Asynchronous):
Expand All @@ -178,9 +176,7 @@ class ObservableUpDownCounter(_NonMonotonic, Asynchronous):

class DefaultObservableUpDownCounter(ObservableUpDownCounter):
def __init__(self, name, callback, unit="", description=""):
super().__init__(
name, callback, unit=unit, description=description
)
super().__init__(name, callback, unit=unit, description=description)


class Histogram(_Grouping, Synchronous):
Expand All @@ -205,6 +201,4 @@ class ObservableGauge(_Grouping, Asynchronous):

class DefaultObservableGauge(ObservableGauge):
def __init__(self, name, callback, unit="", description=""):
super().__init__(
name, callback, unit=unit, description=description
)
super().__init__(name, callback, unit=unit, description=description)
2 changes: 1 addition & 1 deletion opentelemetry-api/tests/metrics/test_instruments.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
)
from opentelemetry.metrics.measurement import Measurement


# FIXME Test that the instrument methods can be called concurrently safely.


class ChildInstrument(Instrument):
def __init__(self, name, *args, unit="", description="", **kwargs):
super().__init__(
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-api/tests/metrics/test_meter.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@

from opentelemetry.metrics import Meter


# FIXME Test that the meter methods can be called concurrently safely.


class ChildMeter(Meter):
def create_counter(self, name, unit="", description=""):
super().create_counter(name, unit=unit, description=description)
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-api/tests/metrics/test_meter_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@
DefaultUpDownCounter,
)


# FIXME Test that the instrument methods can be called concurrently safely.


@fixture
def reset_meter_provider():
original_meter_provider_value = metrics._METER_PROVIDER
Expand Down

0 comments on commit ccd3c86

Please sign in to comment.