Thanks to visit codestin.com
Credit goes to github.com

Skip to content

bump pylint to 3.2.1 #4209

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pylint==3.0.2
pylint==3.2.1
flake8==6.1.0
isort==5.12.0
black==24.3.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,7 @@ def collect(self) -> Iterable[PrometheusMetric]:
)

if metric_family_id_metric_family:
for metric_family in metric_family_id_metric_family.values():
yield metric_family
yield from metric_family_id_metric_family.values()

# pylint: disable=too-many-locals,too-many-branches
def _translate_to_prometheus(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ def collect(self) -> Optional[MetricsData]:
metrics.append(
Metric(
# pylint: disable=protected-access
# pylint: disable=possibly-used-before-assignment
name=view_instrument_match._name,
description=view_instrument_match._description,
unit=view_instrument_match._instrument.unit,
Expand Down
7 changes: 5 additions & 2 deletions opentelemetry-sdk/src/opentelemetry/sdk/util/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def get_dict_as_key(
labels: Mapping[str, AttributeValue]
) -> AttributesAsKey: ...

# pylint: disable=no-self-use
class BoundedList(Sequence[_T]):
"""An append only list with a fixed max size.

Expand All @@ -51,7 +52,9 @@ class BoundedList(Sequence[_T]):
def append(self, item: _T): ...
def extend(self, seq: Sequence[_T]): ...
@classmethod
def from_seq(cls, maxlen: int, seq: Iterable[_T]) -> BoundedList[_T]: ...
def from_seq(
cls, maxlen: int, seq: Iterable[_T]
) -> BoundedList[_T]: ... # pylint: disable=undefined-variable

class BoundedDict(MutableMapping[_KT, _VT]):
"""An ordered dict with a fixed max capacity.
Expand All @@ -70,4 +73,4 @@ class BoundedDict(MutableMapping[_KT, _VT]):
@classmethod
def from_map(
cls, maxlen: int, mapping: Mapping[_KT, _VT]
) -> BoundedDict[_KT, _VT]: ...
) -> BoundedDict[_KT, _VT]: ... # pylint: disable=undefined-variable
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,9 @@ def test_exponent_index_min(self):

self.assertEqual(
exponent_mapping.map_to_index(
nextafter(MIN_NORMAL_VALUE, inf)
nextafter( # pylint: disable=possibly-used-before-assignment
MIN_NORMAL_VALUE, inf
)
),
MIN_NORMAL_EXPONENT >> -scale,
)
1 change: 1 addition & 0 deletions opentelemetry-sdk/tests/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from opentelemetry.sdk.util import BoundedList


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

Expand Down
Loading