Skip to content

Commit

Permalink
Use entry_points directly instead of as dict
Browse files Browse the repository at this point in the history
This is necessary to silence a python 3.12 deprecation warning.
  • Loading branch information
lukasjuhrich authored and gentooboontoo committed Nov 17, 2023
1 parent 30d72b9 commit ad9dee3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pygal/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@

from pygal.graph.map import BaseMap

for entry in entry_points().get('pygal.maps', ()):
for entry in entry_points(group="pygal.maps"):
try:
module = entry.load()
except Exception:
Expand Down
2 changes: 1 addition & 1 deletion pygal/test/test_maps.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from importlib.metadata import entry_points

# Load plugins tests
for entry in entry_points().get('pygal.test.test_maps', ()):
for entry in entry_points(group="pygal.test.test_maps"):
module = entry.load()
for k, v in module.__dict__.items():
if k.startswith('test_'):
Expand Down

0 comments on commit ad9dee3

Please sign in to comment.