Skip to content

Commit

Permalink
fix type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
owais committed May 26, 2021
1 parent e00338d commit 0fafe94
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def export(self) -> None:
self.flush_condition.notify()

def _drain_queue(self):
""" "Export all elements until queue is empty.
"""Export all elements until queue is empty.
Can only be called from the worker thread context because it invokes
`export` that is not thread safe.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,12 @@

from abc import ABC, abstractmethod
from logging import getLogger
from typing import Collection
from typing import Collection, Optional

from opentelemetry.instrumentation.dependencies import get_dependency_conflicts
from opentelemetry.instrumentation.dependencies import (
DependencyConflict,
get_dependency_conflicts,
)

_LOG = getLogger(__name__)

Expand Down Expand Up @@ -72,7 +75,7 @@ def _instrument(self, **kwargs):
def _uninstrument(self, **kwargs):
"""Uninstrument the library"""

def _check_dependency_conflicts(self) -> bool:
def _check_dependency_conflicts(self) -> Optional[DependencyConflict]:
dependencies = self.instrumentation_dependencies()
return get_dependency_conflicts(dependencies)

Expand Down

0 comments on commit 0fafe94

Please sign in to comment.