1111
1212CONFIG_PATHS_KEY = 'config_paths'
1313LEGACY_CONFIG_FILENAME = 'config.json'
14- DEFAULT_LOCAL_CONFIG_FILENAME = 'autograder.json'
14+ DEFAULT_CONFIG_FILENAME = 'autograder.json'
1515DEFAULT_GLOBAL_CONFIG_PATH = platformdirs .user_config_dir ('autograder.json' )
1616CSV_TO_LIST_DELIMITER = ','
1717MAP_KEY_VALUE_SEP = '='
@@ -99,8 +99,8 @@ def _parse_api_config(config, params, additional_required_keys, additional_optio
9999
100100 return data , extra
101101
102- # The local_config_search_limit input limits config search depth during testing,
103- # preventing detection of unrelated autograder.json files in higher directories.
102+ # The local_config_search_limit input limits config search depth.
103+ # This helps to prevent detection of autograder.json files in higher directories during testing .
104104def get_local_config_path (local_config_search_limit = None ):
105105 """
106106 Searches for a configuration file in a hierarchical order, starting with ./autograder.json,
@@ -110,8 +110,8 @@ def get_local_config_path(local_config_search_limit = None):
110110 """
111111
112112 # autograder.json file in current directory
113- if (os .path .isfile (DEFAULT_LOCAL_CONFIG_FILENAME )):
114- return os .path .abspath (DEFAULT_LOCAL_CONFIG_FILENAME )
113+ if (os .path .isfile (DEFAULT_CONFIG_FILENAME )):
114+ return os .path .abspath (DEFAULT_CONFIG_FILENAME )
115115
116116 # config.json file in current directory
117117 if (os .path .isfile (LEGACY_CONFIG_FILENAME )):
@@ -188,7 +188,7 @@ def get_argument_parser(
188188 + " Can be specified multiple times with later values overriding earlier ones."
189189 + " Config values can be specified in multiple places"
190190 + " (with later values overriding earlier values):"
191- + " First './%s'," % (DEFAULT_LOCAL_CONFIG_FILENAME )
191+ + " First './%s'," % (DEFAULT_CONFIG_FILENAME )
192192 + " then '%s'," % (DEFAULT_GLOBAL_CONFIG_PATH )
193193 + " now any files specified using --config in the order they were specified,"
194194 + " and finally any variables specified directly on the command line (like --user)." )
@@ -224,12 +224,12 @@ def _load_configs_and_sources(config_path, config, sources, type_of_config):
224224
225225def _get_ancestor_config_file_path (
226226 current_directory ,
227- config_file = DEFAULT_LOCAL_CONFIG_FILENAME ,
227+ config_file = DEFAULT_CONFIG_FILENAME ,
228228 local_config_search_limit = None ):
229229 """
230230 Search through the parent directories (until root) for a configuration file.
231231 Stops at the first occurrence of the specified config file
232- (default: DEFAULT_LOCAL_CONFIG_FILENAME ) along the path to root.
232+ (default: DEFAULT_CONFIG_FILENAME ) along the path to root.
233233 Returns the path if a configuration file is found.
234234 Otherwise, returns None.
235235 """
0 commit comments