Skip to content
Closed
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 mypy-relaxed.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
; disallow_any_explicit = True
disallow_any_generics = True
disallow_subclassing_any = True
disallow_untyped_calls = True
; disallow_untyped_calls = True
; disallow_untyped_defs = True
disallow_incomplete_defs = True
check_untyped_defs = True
Expand Down
3 changes: 1 addition & 2 deletions opentelemetry-api/src/opentelemetry/trace/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,13 +245,12 @@ def __exit__(
exc_type: typing.Optional[typing.Type[BaseException]],
exc_val: typing.Optional[BaseException],
exc_tb: typing.Optional[python_types.TracebackType],
) -> typing.Optional[bool]:
) -> None:
"""Ends context manager and calls `end` on the `Span`.

Returns False.
"""
self.end()
return False


class TraceOptions(int):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,5 +100,5 @@ def test_get_current_context(self):

def test_use_context(self):
expected = object()
with self.manager.use_context(expected) as output:
with self.manager.use_context(expected) as output: # type: ignore
self.assertIs(output, expected)
2 changes: 1 addition & 1 deletion opentelemetry-api/tests/metrics/test_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def setUp(self):

def test_record_batch(self):
counter = metrics.Counter()
self.meter.record_batch(("values"), ((counter, 1)))
self.meter.record_batch(("values"), ((counter, 1),))

def test_create_metric(self):
metric = self.meter.create_metric("", "", "", float, metrics.Counter)
Expand Down