File tree Expand file tree Collapse file tree
sdks/python/apache_beam/yaml Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1411,11 +1411,8 @@ def __init__(self, search_paths=()):
14111411 self .search_paths = list (search_paths )
14121412
14131413 def get_source (self , environment , path ):
1414- candidates = []
1415- if FileSystems .get_scheme (path ) is not None or path .startswith ('/' ):
1416- candidates .append (path )
1417- else :
1418- candidates .append (path )
1414+ candidates = [path ]
1415+ if FileSystems .get_scheme (path ) is None and not path .startswith ('/' ):
14191416 for search_path in self .search_paths :
14201417 candidates .append (FileSystems .join (search_path , path ))
14211418
@@ -1435,9 +1432,8 @@ def expand_jinja(
14351432 jinja_template : str ,
14361433 jinja_variables : Mapping [str , Any ],
14371434 search_paths : Iterable [str ] = ()) -> str :
1438- import apache_beam
14391435 beam_root_dir = os .path .dirname (
1440- os .path .dirname (os .path .abspath (apache_beam .__file__ )))
1436+ os .path .dirname (os .path .abspath (beam .__file__ )))
14411437
14421438 all_search_paths = list (search_paths )
14431439 if beam_root_dir not in all_search_paths :
You can’t perform that action at this time.
0 commit comments