Skip to content

Commit cb800f0

Browse files
authored
Bump mypy to 1.9.0 (#3795)
1 parent 05497a5 commit cb800f0

File tree

6 files changed

+6
-22
lines changed

6 files changed

+6
-22
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1515
([#3633](https://github.com/open-telemetry/opentelemetry-python/pull/3633))
1616
- Fix python 3.12 deprecation warning
1717
([#3751](https://github.com/open-telemetry/opentelemetry-python/pull/3751))
18-
- bump mypy to 0.982
19-
([#3776](https://github.com/open-telemetry/opentelemetry-python/pull/3776))
2018
- Add support for OTEL_SDK_DISABLED environment variable
2119
([#3648](https://github.com/open-telemetry/opentelemetry-python/pull/3648))
2220
- Fix ValueError message for PeriodicExportingMetricsReader
@@ -27,6 +25,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2725
([#3778](https://github.com/open-telemetry/opentelemetry-python/pull/3778))
2826
- Fix license field in pyproject.toml files
2927
([#3803](https://github.com/open-telemetry/opentelemetry-python/pull/3803))
28+
- Bump mypy to 1.9.0
29+
([#3795](https://github.com/open-telemetry/opentelemetry-python/pull/3795))
3030

3131
## Version 1.23.0/0.44b0 (2024-02-23)
3232

dev-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ flake8==6.1.0
33
isort==5.12.0
44
black==22.3.0
55
httpretty==1.1.4
6-
mypy==0.982
6+
mypy==1.9.0
77
sphinx==7.1.2
88
sphinx-rtd-theme==2.0.0rc4
99
sphinx-autodoc-typehints==1.25.2

opentelemetry-api/src/opentelemetry/_logs/_internal/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@ def get_logger(
193193
schema_url: Optional[str] = None,
194194
) -> Logger:
195195
"""Returns a NoOpLogger."""
196-
super().get_logger(name, version=version, schema_url=schema_url)
197196
return NoOpLogger(name, version=version, schema_url=schema_url)
198197

199198

opentelemetry-api/src/opentelemetry/metrics/_internal/__init__.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ def get_meter(
141141
schema_url: Optional[str] = None,
142142
) -> "Meter":
143143
"""Returns a NoOpMeter."""
144-
super().get_meter(name, version=version, schema_url=schema_url)
145144
return NoOpMeter(name, version=version, schema_url=schema_url)
146145

147146

@@ -599,7 +598,6 @@ def create_counter(
599598
description: str = "",
600599
) -> Counter:
601600
"""Returns a no-op Counter."""
602-
super().create_counter(name, unit=unit, description=description)
603601
if self._is_instrument_registered(
604602
name, NoOpCounter, unit, description
605603
)[0]:
@@ -620,7 +618,6 @@ def create_gauge(
620618
description: str = "",
621619
) -> Gauge:
622620
"""Returns a no-op Gauge."""
623-
super().create_gauge(name, unit=unit, description=description)
624621
if self._is_instrument_registered(name, NoOpGauge, unit, description)[
625622
0
626623
]:
@@ -641,9 +638,6 @@ def create_up_down_counter(
641638
description: str = "",
642639
) -> UpDownCounter:
643640
"""Returns a no-op UpDownCounter."""
644-
super().create_up_down_counter(
645-
name, unit=unit, description=description
646-
)
647641
if self._is_instrument_registered(
648642
name, NoOpUpDownCounter, unit, description
649643
)[0]:
@@ -665,9 +659,6 @@ def create_observable_counter(
665659
description: str = "",
666660
) -> ObservableCounter:
667661
"""Returns a no-op ObservableCounter."""
668-
super().create_observable_counter(
669-
name, callbacks, unit=unit, description=description
670-
)
671662
if self._is_instrument_registered(
672663
name, NoOpObservableCounter, unit, description
673664
)[0]:
@@ -693,7 +684,6 @@ def create_histogram(
693684
description: str = "",
694685
) -> Histogram:
695686
"""Returns a no-op Histogram."""
696-
super().create_histogram(name, unit=unit, description=description)
697687
if self._is_instrument_registered(
698688
name, NoOpHistogram, unit, description
699689
)[0]:
@@ -715,9 +705,6 @@ def create_observable_gauge(
715705
description: str = "",
716706
) -> ObservableGauge:
717707
"""Returns a no-op ObservableGauge."""
718-
super().create_observable_gauge(
719-
name, callbacks, unit=unit, description=description
720-
)
721708
if self._is_instrument_registered(
722709
name, NoOpObservableGauge, unit, description
723710
)[0]:
@@ -744,9 +731,6 @@ def create_observable_up_down_counter(
744731
description: str = "",
745732
) -> ObservableUpDownCounter:
746733
"""Returns a no-op ObservableUpDownCounter."""
747-
super().create_observable_up_down_counter(
748-
name, callbacks, unit=unit, description=description
749-
)
750734
if self._is_instrument_registered(
751735
name, NoOpObservableUpDownCounter, unit, description
752736
)[0]:

opentelemetry-api/src/opentelemetry/util/_decorator.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,5 @@ def _agnosticcontextmanager(
7878
def helper(*args: Pargs, **kwargs: Pkwargs) -> _AgnosticContextManager[R]:
7979
return _AgnosticContextManager(func, args, kwargs)
8080

81-
return helper
81+
# Ignoring the type to keep the original signature of the function
82+
return helper # type: ignore[return-value]

opentelemetry-api/src/opentelemetry/util/_providers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
def _load_provider(
3131
provider_environment_variable: str, provider: str
32-
) -> Provider:
32+
) -> Provider: # type: ignore[type-var]
3333

3434
try:
3535

0 commit comments

Comments
 (0)