Skip to content

Commit 96bcdb9

Browse files
refactor: remove unnecessary help function
1 parent 425a6b6 commit 96bcdb9

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

grader_service/handlers/config.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@
33
from grader_service.registry import VersionSpecifier, register_handler
44

55

6-
def _get_trait_default_from_class(cls, trait_name):
7-
traits = cls.class_traits()
8-
return traits[trait_name].default()
9-
10-
116
def _get_effective_executor_value(app_cfg, executor_class, trait_name):
127
"""
138
Return the configured value for trait_name if present in app_cfg,
@@ -25,7 +20,7 @@ def _get_effective_executor_value(app_cfg, executor_class, trait_name):
2520
return user_node.get(trait_name)
2621

2722
# 2) fallback to the trait's default from the class metadata
28-
return _get_trait_default_from_class(executor_class, trait_name)
23+
return executor_class.class_traits()[trait_name].default()
2924

3025

3126
@register_handler(path=r"\/api\/config\/?", version_specifier=VersionSpecifier.ALL)
@@ -34,7 +29,6 @@ class ConfigHandler(GraderBaseHandler):
3429
Handler class for requests to /config
3530
"""
3631

37-
# todo: ask if this is correct
3832
@authorize([Scope.tutor, Scope.instructor])
3933
async def get(self):
4034
app_cfg = self.application.config

0 commit comments

Comments
 (0)