4343
4444
4545class Instrument (ABC ):
46+ """Abstract class that serves as base for all instruments."""
47+
4648 @abstractmethod
4749 def __init__ (self , name , unit = "" , description = "" ):
4850 pass
@@ -120,6 +122,8 @@ def add(self, amount, attributes=None):
120122
121123
122124class NoOpCounter (Counter ):
125+ """No-op implementation of `Counter`."""
126+
123127 def __init__ (self , name , unit = "" , description = "" ):
124128 super ().__init__ (name , unit = unit , description = description )
125129
@@ -145,6 +149,8 @@ def add(self, amount, attributes=None):
145149
146150
147151class NoOpUpDownCounter (UpDownCounter ):
152+ """No-op implementation of `UpDownCounter`."""
153+
148154 def __init__ (self , name , unit = "" , description = "" ):
149155 super ().__init__ (name , unit = unit , description = description )
150156
@@ -170,6 +176,8 @@ class ObservableCounter(_Monotonic, Asynchronous):
170176
171177
172178class NoOpObservableCounter (ObservableCounter ):
179+ """No-op implementation of `ObservableCounter`."""
180+
173181 def __init__ (self , name , callbacks = None , unit = "" , description = "" ):
174182 super ().__init__ (name , callbacks , unit = unit , description = description )
175183
@@ -193,6 +201,8 @@ class ObservableUpDownCounter(_NonMonotonic, Asynchronous):
193201
194202
195203class NoOpObservableUpDownCounter (ObservableUpDownCounter ):
204+ """No-op implementation of `ObservableUpDownCounter`."""
205+
196206 def __init__ (self , name , callbacks = None , unit = "" , description = "" ):
197207 super ().__init__ (name , callbacks , unit = unit , description = description )
198208
@@ -221,6 +231,8 @@ def record(self, amount, attributes=None):
221231
222232
223233class NoOpHistogram (Histogram ):
234+ """No-op implementation of `Histogram`."""
235+
224236 def __init__ (self , name , unit = "" , description = "" ):
225237 super ().__init__ (name , unit = unit , description = description )
226238
@@ -247,6 +259,8 @@ class ObservableGauge(_Grouping, Asynchronous):
247259
248260
249261class NoOpObservableGauge (ObservableGauge ):
262+ """No-op implementation of `ObservableGauge`."""
263+
250264 def __init__ (self , name , callbacks = None , unit = "" , description = "" ):
251265 super ().__init__ (name , callbacks , unit = unit , description = description )
252266
0 commit comments