error if same target and branch (#3)

error if same target and branch
This commit is contained in:
David Lord 2025-01-14 13:16:16 -08:00 committed by GitHub
parent b0b6e11dcc
commit 353ba6a098
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 2 deletions

View file

@ -3,6 +3,7 @@
Unreleased
- Submit is disabled by default.
- Error if target and work branch are the same.
## Version 0.1.0

View file

@ -41,7 +41,11 @@ class Script[RepoType: Repo]:
"""
def __init__(self, *, submit: bool = False) -> None:
""" """
if self.target == self.branch:
raise ValueError(
"Work branch name must be different than target branch name."
)
source_file = inspect.getsourcefile(self.__class__)
if source_file is None:

2
uv.lock generated
View file

@ -335,7 +335,7 @@ wheels = [
[[package]]
name = "modify-repos"
version = "0.1.0"
version = "0.1.1.dev0"
source = { editable = "." }
dependencies = [
{ name = "click" },