Skip to content

Commit 7236111

Browse files
committed
Corrected some inaccuracies.
1 parent 938df68 commit 7236111

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

autograder/api/config.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
CONFIG_PATHS_KEY = 'config_paths'
1313
LEGACY_CONFIG_FILENAME = 'config.json'
14-
DEFAULT_LOCAL_CONFIG_FILENAME = 'autograder.json'
14+
DEFAULT_CONFIG_FILENAME = 'autograder.json'
1515
DEFAULT_GLOBAL_CONFIG_PATH = platformdirs.user_config_dir('autograder.json')
1616
CSV_TO_LIST_DELIMITER = ','
1717
MAP_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.
104104
def 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

225225
def _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

Comments
 (0)