Skip to content

Commit a6c8ed1

Browse files
authored
Merge branch 'main' into fix-issue-2485-instrumentation-scope-name-2
2 parents 8357f41 + 01a670e commit a6c8ed1

File tree

6 files changed

+12
-6
lines changed

6 files changed

+12
-6
lines changed

Diff for: dev-requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pylint==3.0.2
1+
pylint==3.2.1
22
flake8==6.1.0
33
isort==5.12.0
44
black==24.3.0

Diff for: exporter/opentelemetry-exporter-prometheus/src/opentelemetry/exporter/prometheus/__init__.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,7 @@ def collect(self) -> Iterable[PrometheusMetric]:
209209
)
210210

211211
if metric_family_id_metric_family:
212-
for metric_family in metric_family_id_metric_family.values():
213-
yield metric_family
212+
yield from metric_family_id_metric_family.values()
214213

215214
# pylint: disable=too-many-locals,too-many-branches
216215
def _translate_to_prometheus(

Diff for: opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/metric_reader_storage.py

+1
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ def collect(self) -> Optional[MetricsData]:
210210
metrics.append(
211211
Metric(
212212
# pylint: disable=protected-access
213+
# pylint: disable=possibly-used-before-assignment
213214
name=view_instrument_match._name,
214215
description=view_instrument_match._description,
215216
unit=view_instrument_match._instrument.unit,

Diff for: opentelemetry-sdk/src/opentelemetry/sdk/util/__init__.pyi

+5-2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ def get_dict_as_key(
3333
labels: Mapping[str, AttributeValue]
3434
) -> AttributesAsKey: ...
3535

36+
# pylint: disable=no-self-use
3637
class BoundedList(Sequence[_T]):
3738
"""An append only list with a fixed max size.
3839
@@ -51,7 +52,9 @@ class BoundedList(Sequence[_T]):
5152
def append(self, item: _T): ...
5253
def extend(self, seq: Sequence[_T]): ...
5354
@classmethod
54-
def from_seq(cls, maxlen: int, seq: Iterable[_T]) -> BoundedList[_T]: ...
55+
def from_seq(
56+
cls, maxlen: int, seq: Iterable[_T]
57+
) -> BoundedList[_T]: ... # pylint: disable=undefined-variable
5558

5659
class BoundedDict(MutableMapping[_KT, _VT]):
5760
"""An ordered dict with a fixed max capacity.
@@ -70,4 +73,4 @@ class BoundedDict(MutableMapping[_KT, _VT]):
7073
@classmethod
7174
def from_map(
7275
cls, maxlen: int, mapping: Mapping[_KT, _VT]
73-
) -> BoundedDict[_KT, _VT]: ...
76+
) -> BoundedDict[_KT, _VT]: ... # pylint: disable=undefined-variable

Diff for: opentelemetry-sdk/tests/metrics/exponential_histogram/test_exponent_mapping.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,9 @@ def test_exponent_index_min(self):
389389

390390
self.assertEqual(
391391
exponent_mapping.map_to_index(
392-
nextafter(MIN_NORMAL_VALUE, inf)
392+
nextafter( # pylint: disable=possibly-used-before-assignment
393+
MIN_NORMAL_VALUE, inf
394+
)
393395
),
394396
MIN_NORMAL_EXPONENT >> -scale,
395397
)

Diff for: opentelemetry-sdk/tests/test_util.py

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
from opentelemetry.sdk.util import BoundedList
1818

1919

20+
# pylint: disable=unsubscriptable-object
2021
class TestBoundedList(unittest.TestCase):
2122
base = [52, 36, 53, 29, 54, 99, 56, 48, 22, 35, 21, 65, 10, 95, 42, 60]
2223

0 commit comments

Comments
 (0)