Fix CI: Update Type declarations

This commit is contained in:
erik 2023-04-19 15:25:35 +02:00
parent 578ac29ebb
commit 10e7deb74b

View file

@ -1,4 +1,5 @@
from enum import Enum
from typing import Optional
from pathlib import Path
from .common import (
filter_none,
@ -21,8 +22,8 @@ class Version():
def __init__(self, id: Path, version_list: list):
self.id = id
self.version_list = version_list
self.version_string = None
self.is_snapshot = None
self.version_string: Optional[str | None] = None
self.is_snapshot: Optional[bool | None] = None
def increment(self, release_type: ReleaseType):
self.is_snapshot = False
@ -68,8 +69,8 @@ class ReleaseConfig(Validateable):
main_branch: str,
config_file: str,
devops: Devops,
release_version: str = None,
bump_version: str = None
release_version: Optional[str | None] = None,
bump_version: Optional[str | None] = None
):
self.main_branch = main_branch
self.config_file = config_file
@ -78,7 +79,7 @@ class ReleaseConfig(Validateable):
self.devops = devops
class Release():
def __init__(self, release_type: ReleaseType, version: Version, current_branch: str):
def __init__(self, release_type: ReleaseType | None, version: Version, current_branch: str):
self.release_type = release_type
self.version = version
self.current_branch = current_branch