Skip to content

Commit 7169603

Browse files
committed
Third pass done.
1 parent 47abd6b commit 7169603

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

autograder/api/config.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def get_local_config_path(local_config_root_cutoff = None):
110110
111111
If no configuration file is found, returns None.
112112
The cutoff limits config search depth.
113-
This helps to prevent detection of config files in higher directories during testing.
113+
This helps to prevent detection of a config file in higher directories during testing.
114114
"""
115115

116116
# The case where DEFAULT_CONFIG_FILENAME file in current directory.
@@ -224,7 +224,7 @@ def _load_config_file(config_path, config, sources, source_label):
224224
with open(config_path, 'r') as file:
225225
for (key, value) in json.load(file).items():
226226
config[key] = value
227-
sources[key] = f"{source_label}::{os.path.abspath(config_path)}"
227+
sources[key] = f"{source_label}{CONFIG_TYPE_DELIMITER}{os.path.abspath(config_path)}"
228228

229229
def _get_ancestor_config_file_path(
230230
current_directory,
@@ -238,7 +238,7 @@ def _get_ancestor_config_file_path(
238238
"""
239239

240240
current_directory = os.path.abspath(current_directory)
241-
if local_config_root_cutoff is not None:
241+
if (local_config_root_cutoff is not None):
242242
local_config_root_cutoff = os.path.abspath(local_config_root_cutoff)
243243

244244
for _ in range(DEPTH_LIMIT):

autograder/cli/config/list.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
DESCRIPTION = "List your current configuration options."
66

77
def run(args):
8-
config, sources = autograder.api.config.get_tiered_config(
8+
(config, sources) = autograder.api.config.get_tiered_config(
99
cli_arguments = args,
1010
skip_keys = [
1111
'show_origin', 'verbose',

tests/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class BaseTest(unittest.TestCase):
88
A base class for unit tests.
99
"""
1010

11-
# TestCase variable to show full diffs in assertion errors
11+
# TestCase variable to show full diffs in assertion errors.
1212
maxDiff = None
1313

1414
def assertListEqual(self, a, b):

tests/test_config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@ def _evaluate_test_config(
216216
"""
217217

218218
temp_dir = autograder.util.dir.get_temp_dir(prefix = 'autograder-test-config-')
219-
global_config = os.path.join(temp_dir)
220219

220+
global_config = os.path.join(temp_dir)
221221
if (global_config_path is not None):
222222
global_config = os.path.join(temp_dir, global_config_path)
223223

@@ -235,7 +235,7 @@ def _evaluate_test_config(
235235
os.chdir(initial_work_directory)
236236

237237
try:
238-
actual_configs, actual_sources = autograder.api.config.get_tiered_config(
238+
(actual_configs, actual_sources) = autograder.api.config.get_tiered_config(
239239
cli_arguments = cli_args,
240240
global_config_path = global_config,
241241
local_config_root_cutoff = temp_dir,

0 commit comments

Comments
 (0)