From b088a91ee3b992b28b8fd20f24895b3949924961 Mon Sep 17 00:00:00 2001 From: Andre Anjos <andre.dos.anjos@gmail.com> Date: Sun, 11 Sep 2022 14:27:46 +0200 Subject: [PATCH] [expose,tests] Fix style --- expose/config.py | 7 ++++--- tests/test_click.py | 4 +--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/expose/config.py b/expose/config.py index cb60da6..b248089 100644 --- a/expose/config.py +++ b/expose/config.py @@ -3,12 +3,12 @@ """Functionality to implement python-based config file parsing and loading. """ -import re -import sys import logging import os.path import pathlib import pkgutil +import re +import sys import types import typing @@ -119,7 +119,8 @@ def _retrieve_entry_points(group: str) -> typing.Iterable[EntryPoint]: """ if sys.version_info[:2] < (3, 10): - return entry_points()[group] # Python 3.8 and 3.9 + all_entry_points = entry_points() + return all_entry_points.get(group, []) # Python 3.8 and 3.9 return entry_points(group=group) # Python 3.10 and above diff --git a/tests/test_click.py b/tests/test_click.py index 22cecc0..dbc9cf3 100644 --- a/tests/test_click.py +++ b/tests/test_click.py @@ -163,9 +163,7 @@ def test_config_dump(tmp_path, datadir): def test_config_dump2(tmp_path, datadir): - @click.command( - cls=ConfigCommand, entry_point_group="expose.test.config" - ) + @click.command(cls=ConfigCommand, entry_point_group="expose.test.config") @click.option( "--database", "-d", -- GitLab