Skip to content

Commit

Permalink
Move the cached dictionary to 3.7 section
Browse files Browse the repository at this point in the history
  • Loading branch information
ocelotl committed Mar 13, 2023
1 parent efcea04 commit 653bd1a
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@
from sys import version_info
from typing import Dict, Tuple, Union

# This is a cache to avoid going through creating a dictionary for all entry
# points for 3.7 every time the entry points function is called.
result_entry_points_37 = {}

# FIXME remove this when support for 3.7 is dropped.
if version_info.minor == 7:
# pylint: disable=import-error
Expand All @@ -30,6 +26,10 @@
)
from importlib_metadata import version

# This is a cache to avoid going through creating a dictionary for all
# entry points for 3.7 every time the entry points function is called.
result_entry_points_37 = {}

def entry_points(
group: str = None, name: str = None
) -> Union[Tuple[EntryPoint], Dict[str, Tuple[EntryPoint]]]:
Expand Down

0 comments on commit 653bd1a

Please sign in to comment.