File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11from __future__ import annotations
22
3+ import glob
34import os
45import typing as t
56from pathlib import Path
@@ -27,7 +28,9 @@ def load_configs(
2728 config = config or "config"
2829
2930 absolute_paths = [
30- Path (t .cast (t .Union [str , Path ], path )).absolute () for path in ensure_list (paths )
31+ Path (t .cast (t .Union [str , Path ], p )).absolute ()
32+ for path in ensure_list (paths )
33+ for p in (glob .glob (str (path )) or [str (path )])
3134 ]
3235
3336 if not isinstance (config , str ):
Original file line number Diff line number Diff line change @@ -997,3 +997,10 @@ def post_statement(evaluator):
997997
998998 context = Context (paths = tmp_path , config = Config ())
999999 context .plan (auto_apply = True , no_prompts = True )
1000+
1001+
1002+ def test_wildcard (copy_to_temp_path : t .Callable ):
1003+ parent_path = copy_to_temp_path ("examples/multi" )[0 ]
1004+
1005+ context = Context (paths = f"{ parent_path } /*" )
1006+ assert len (context .models ) == 4
You can’t perform that action at this time.
0 commit comments