From 123db56a8199b1fe3e0fbfbd832fd622c66f36bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Ricks?= Date: Thu, 18 Jan 2024 15:06:20 +0100 Subject: [PATCH] Fix: Fix `versioning_scheme` type of `Project` constructor `versioning_scheme` might be an instance of `VersioningScheme` but most of the time the class is passed instead. --- pontos/version/project.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pontos/version/project.py b/pontos/version/project.py index ad93fbb5f..1e9dce404 100644 --- a/pontos/version/project.py +++ b/pontos/version/project.py @@ -4,7 +4,7 @@ # -from typing import List, Literal, Union +from typing import List, Literal, Type, Union from ._errors import ProjectError from ._version import Version, VersionUpdate @@ -27,7 +27,9 @@ class Project: project = Project(PEP440VersioningScheme) """ - def __init__(self, versioning_scheme: VersioningScheme) -> None: + def __init__( + self, versioning_scheme: Union[VersioningScheme, Type[VersioningScheme]] + ) -> None: """ Creates a new project instance