File tree Expand file tree Collapse file tree 1 file changed +2
-18
lines changed Expand file tree Collapse file tree 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):
3131
3232 def __init__ (
3333 self ,
34- allowednames : t .Sequence [str ] = (
35- "yml" ,
36- "yaml" ,
37- "json" ,
38- ),
34+ allowednames : t .Sequence [str ] = ("yml" , "yaml" , "json" ),
3935 directories : bool = False ,
4036 ** kwargs : object
4137 ):
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
4738 super ().__init__ (allowednames = allowednames , directories = directories , ** kwargs )
4839
4940 def __call__ (self , prefix : str , ** kwargs ):
5041 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 )])
5943
6044 return completion
6145
You can’t perform that action at this time.
0 commit comments