From d71fb13df2bd85b95079913a409d39ea6ee96618 Mon Sep 17 00:00:00 2001 From: jovnc <95868357+jovnc@users.noreply.github.com> Date: Sun, 4 Jan 2026 22:50:37 +0800 Subject: [PATCH] Create new repo_type to handle undo-init exercise --- src/git_autograder/exercise.py | 2 +- src/git_autograder/exercise_config.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/git_autograder/exercise.py b/src/git_autograder/exercise.py index 38a2808..58a3d4c 100644 --- a/src/git_autograder/exercise.py +++ b/src/git_autograder/exercise.py @@ -66,7 +66,7 @@ def __init__( # is the purpose of handling the exception where we can display an error on # their end. self.repo: GitAutograderRepoBase - if self.config.exercise_repo.repo_type == "ignore": + if self.config.exercise_repo.repo_type == "ignore" or self.config.exercise_repo.repo_type == "local-ignore": self.repo = NullGitAutograderRepo() else: self.repo = GitAutograderRepo( diff --git a/src/git_autograder/exercise_config.py b/src/git_autograder/exercise_config.py index e96a261..1ac7272 100644 --- a/src/git_autograder/exercise_config.py +++ b/src/git_autograder/exercise_config.py @@ -8,7 +8,7 @@ class ExerciseConfig: @dataclass class ExerciseRepoConfig: - repo_type: Literal["local", "remote", "ignore"] + repo_type: Literal["local", "remote", "ignore", "local-ignore"] repo_name: str repo_title: Optional[str] create_fork: Optional[bool]