File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 11import logging
22import pathlib
3- from importlib .metadata import distribution as __dist
43import typing
4+ from importlib .metadata import distribution as __dist
55
66import click
77
@@ -17,7 +17,7 @@ def register_commands(
1717 group : click .Group ,
1818 source : typing .Union [str , pathlib .Path ],
1919) -> None :
20- path = pathlib .Path (source )
20+ path = pathlib .Path (source ). resolve ()
2121 _log .debug (f"Started registering commands in { path .resolve ()} " )
2222
2323 commands = fetch_commands_for_group (path )
@@ -31,7 +31,9 @@ def register_commands(
3131 group .add_command (command )
3232
3333
34- def fetch_commands_for_group (source : pathlib .Path ) -> typing .List [typing .Union [click .Command , click .Group ]]:
34+ def fetch_commands_for_group (
35+ source : pathlib .Path ,
36+ ) -> typing .List [typing .Union [click .Command , click .Group ]]:
3537 """Return a list of click's commands or groups.
3638
3739 Parameters
@@ -53,7 +55,6 @@ def fetch_commands_for_group(source: pathlib.Path) -> typing.List[typing.Union[c
5355 entities .append (command )
5456
5557 if file .is_dir ():
56-
5758 _log .debug (f"Found directory { file .resolve ()} , looping inside..." )
5859
5960 if (file / "__init__.py" ).exists ():
Original file line number Diff line number Diff line change 22import importlib .util
33import logging
44import pathlib
5+ import typing
56from shutil import ExecError
67from typing import Literal , overload
7- import typing
88
99import click
1010
You can’t perform that action at this time.
0 commit comments