@@ -41,23 +41,25 @@ class Config:
41
41
repo_dict_map : list ["Repo" ]
42
42
repos : list ["Repo" ] = dataclasses .field (init = False , default_factory = list )
43
43
44
- def __post_init__ (self ):
44
+ def __post_init__ (self ) -> None :
45
45
for repo in self .repo_dict_map :
46
46
if isinstance (repo , dict ):
47
- self .repos .append (create_project (** repo )) # type:ignore
47
+ self .repos .append (create_project (** repo ))
48
48
49
- def filter_repos (self , ** kwargs ) -> list ["Repo" ]:
49
+ def filter_repos (self , ** kwargs : object ) -> list ["Repo" ]:
50
50
return QueryList (self .repos ).filter (** kwargs )
51
51
52
52
@classmethod
53
- def from_yaml_file (cls , file_path : pathlib .Path , cwd = pathlib .Path .cwd ()):
53
+ def from_yaml_file (
54
+ cls , file_path : pathlib .Path , cwd : pathlib .Path = pathlib .Path .cwd ()
55
+ ) -> "Config" :
54
56
# load yaml
55
57
raw_config = yaml .load (open (file_path ).read (), Loader = yaml .Loader )
56
58
repos : list [ConfigDict ] = []
57
59
for directory , repo_map in raw_config .items ():
58
60
assert isinstance (repo_map , dict )
59
61
for repo , repo_data in repo_map .items ():
60
- conf : dict = {}
62
+ conf : dict [ str , t . Any ] = {}
61
63
62
64
if isinstance (repo_data , str ):
63
65
conf ["url" ] = repo_data
0 commit comments