File tree 1 file changed +2
-18
lines changed
1 file changed +2
-18
lines changed Original file line number Diff line number Diff line change @@ -31,31 +31,15 @@ class ConfigFileCompleter(argcomplete.completers.FilesCompleter):
31
31
32
32
def __init__ (
33
33
self ,
34
- allowednames : t .Sequence [str ] = (
35
- "yml" ,
36
- "yaml" ,
37
- "json" ,
38
- ),
34
+ allowednames : t .Sequence [str ] = ("yml" , "yaml" , "json" ),
39
35
directories : bool = False ,
40
36
** kwargs : object
41
37
):
42
- # assert not isinstance(allowednames, (str, bytes))
43
- #
44
- # self.allowednames = [x.lstrip("*").lstrip(".") for x in allowednames]
45
- # self.directories = directories
46
- # # Does not work, unknown why
47
38
super ().__init__ (allowednames = allowednames , directories = directories , ** kwargs )
48
39
49
40
def __call__ (self , prefix : str , ** kwargs ):
50
41
completion : t .List [str ] = super ().__call__ (prefix , ** kwargs )
51
-
52
- completion .extend (
53
- [
54
- # os.path.join(config_dir, c).replace(str(pathlib.Path.home()), "~")
55
- pathlib .Path (c ).stem
56
- for c in config .in_dir (config_dir )
57
- ]
58
- )
42
+ completion .extend ([pathlib .Path (c ).stem for c in config .in_dir (config_dir )])
59
43
60
44
return completion
61
45
You can’t perform that action at this time.
0 commit comments