File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -192,13 +192,18 @@ def process(
192
192
193
193
# Collect our own config
194
194
config = pyproject (package ).get ("tool" , {}).get ("repo-review" , {})
195
- select_checks = select if select else set (config .get ("select" , ()))
196
- skip_checks = ignore if ignore else set (config .get ("ignore" , ()))
195
+ select_checks = select if select else frozenset (config .get ("select" , ()))
196
+ skip_checks = ignore if ignore else frozenset (config .get ("ignore" , ()))
197
197
198
198
# Make a graph of the check's interdependencies
199
- graph : dict [str , set [str ]] = {
200
- n : getattr (t , "requires" , set ()) for n , t in tasks .items ()
199
+ graph : dict [str , Set [str ]] = {
200
+ n : getattr (t , "requires" , frozenset ()) for n , t in tasks .items ()
201
201
}
202
+ for name , s in graph .items ():
203
+ if not isinstance (s , Set ):
204
+ msg = f"requires must be a set, got { s !r} for { name !r} " # type: ignore[unreachable]
205
+ raise TypeError (msg )
206
+
202
207
# Keep track of which checks have been completed
203
208
completed : dict [str , str | None ] = {}
204
209
You can’t perform that action at this time.
0 commit comments