3232
3333def populate_config ():
3434 """Update the spack-manager config in memory"""
35- global config_yaml
35+ global config_yaml # noqa: F824
3636 if os .path .isfile (config_path ):
3737 with open (config_path , "r" ) as f :
3838 config_yaml = syaml .load (f )
@@ -43,7 +43,7 @@ def populate_config():
4343
4444
4545def write_config ():
46- global config_yaml
46+ global config_yaml # noqa: F824
4747 with fs .write_tmp_and_move (os .path .realpath (config_path )) as f :
4848 syaml .dump (config_yaml , f )
4949 populate_config ()
@@ -54,7 +54,7 @@ class MissingProjectException(Exception):
5454
5555
5656def add_project (path ):
57- global config_yaml
57+ global config_yaml # noqa: F824
5858 if path not in config_yaml ["spack-manager" ]["projects" ]:
5959 config_yaml ["spack-manager" ]["projects" ].insert (0 , path )
6060 write_config ()
@@ -63,7 +63,7 @@ def add_project(path):
6363
6464
6565def remove_project_via_path (path ):
66- global config_yaml
66+ global config_yaml # noqa: F824
6767 if path in config_yaml ["spack-manager" ]["projects" ]:
6868 config_yaml ["spack-manager" ]["projects" ].remove (path )
6969 write_config ()
@@ -72,7 +72,7 @@ def remove_project_via_path(path):
7272
7373
7474def remove_project_via_index (index ):
75- global config_yaml
75+ global config_yaml # noqa: F824
7676 if len (config_yaml ["spack-manager" ]["projects" ]) > abs (index ):
7777 config_yaml ["spack-manager" ]["projects" ].pop (index )
7878 write_config ()
0 commit comments