Skip to content

Commit a0f5a93

Browse files
committed
fix: don't call Protocol's __init__
From Python 3.9.7 onwards the `__init__` function of `typing.Protocol` instances should not be called. It will throw: > TypeError: Protocols cannot be instantiated
1 parent 92a1dd5 commit a0f5a93

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

hopic/versioning.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ class SemVer(Version):
120120
default_tag_name = "{version.major}.{version.minor}.{version.patch}{version.prerelease_separator}{version.prerelease}"
121121

122122
def __init__(self, major: int, minor: int, patch: int, prerelease: Tuple[str, ...], build: Tuple[str, ...]):
123-
super().__init__()
124123
self.major = major
125124
self.minor = minor
126125
self.patch = patch
@@ -333,7 +332,6 @@ class CarusoVer(Version):
333332
default_tag_name = "{version.major}.{version.minor}.{version.patch}{version.prerelease_separator}{version.prerelease}+PI{version.increment}.{version.fix}"
334333

335334
def __init__(self, major: int, minor: int, patch: int, prerelease: Tuple[str, ...], increment: int, fix: int):
336-
super().__init__()
337335
self.major = major
338336
self.minor = minor
339337
self.patch = patch

0 commit comments

Comments
 (0)