Skip to content

Commit

Permalink
Fix: Fix versioning_scheme type of Project constructor
Browse files Browse the repository at this point in the history
`versioning_scheme` might be an instance of `VersioningScheme` but most
of the time the class is passed instead.
  • Loading branch information
bjoernricks authored and greenbonebot committed Jan 18, 2024
1 parent 38479f9 commit 123db56
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pontos/version/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 123db56

Please sign in to comment.