[Sip-CI] Update Type Hints

This commit is contained in:
erik 2023-04-28 13:50:15 +02:00 committed by Michael Jerger
parent 62b6465d01
commit 35a5a69844

View file

@ -25,7 +25,7 @@ class Version():
self.version_string: Optional[str | None] = None
self.is_snapshot: Optional[bool | None] = None
def increment(self, release_type: ReleaseType):
def increment(self, release_type: ReleaseType | None):
self.is_snapshot = False
match release_type:
case ReleaseType.BUMP:
@ -51,7 +51,7 @@ class Version():
self.version_string += "-SNAPSHOT"
return self.version_string
def create_release_version(self, release_type: ReleaseType):
def create_release_version(self, release_type: ReleaseType | None):
release_version = Version(self.id, self.version_list.copy())
release_version.is_snapshot = self.is_snapshot
release_version.increment(release_type)
@ -98,9 +98,9 @@ class Release(Validateable):
self.devops = devops
self.main_branch = main_branch
self.config_file = config_file
self.release_context = None
self.release_context: ReleaseContext | None = None
def set_release_context(self, set_release_context: ReleaseContext) -> None:
def set_release_context(self, set_release_context: ReleaseContext):
self.release_context = set_release_context
def release_version(self):