Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
ocelotl committed Mar 13, 2023
1 parent e605387 commit 001a70d
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions opentelemetry-api/src/opentelemetry/util/_importlib_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# type: ignore
# type: # ignore

from sys import version_info
from typing import Dict, Tuple, Union
from typing import Dict, Tuple, Union, overload

# FIXME remove this when support for 3.7 is dropped.
if version_info.minor == 7:
Expand All @@ -30,10 +30,17 @@
# entry points for 3.7 every time the entry points function is called.
result_entry_points_37 = {}

@overload
def entry_points(
group: str = None, name: str = None
) -> Union[Tuple[EntryPoint], Dict[str, Tuple[EntryPoint]]]:
group: None, name: None
) -> Dict[str, Tuple[EntryPoint, ...]]:
...

@overload
def entry_points(group: str, name: str) -> Tuple[EntryPoint, ...]:
...

def entry_points(group, name):
if group is None and name is None:

if not result_entry_points_37:
Expand Down

0 comments on commit 001a70d

Please sign in to comment.