Skip to content

Commit

Permalink
fix: only use EntryPoints and keep type ignores
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey committed Feb 6, 2022
1 parent d2a882b commit 572ab5c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"pyyaml>=0.2.5",
"py-geth>=3.6.0",
"requests>=2.25.1,<3.0",
"importlib-metadata",
"importlib-metadata>=4.10.1,<5.0",
"singledispatchmethod ; python_version<'3.8'",
"IPython>=7.31.1",
"pytest>=6.0,<7.0",
Expand Down
9 changes: 1 addition & 8 deletions src/ape/_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,7 @@ def _suggest_cmd(usage_error):
def commands(self) -> Dict:
group_name = "ape_cli_subcommands"
if not self._commands:
try:
entry_points = metadata.entry_points(group=group_name) # type: ignore
except TypeError:
entry_points = metadata.entry_points()
entry_points = (
entry_points[group_name] if group_name in entry_points else [] # type: ignore
)

entry_points = metadata.entry_points(group=group_name) # type: ignore
if not entry_points:
raise Abort("Missing registered cli subcommands")

Expand Down

0 comments on commit 572ab5c

Please sign in to comment.