Skip to content

Commit

Permalink
fix typing in versioningconfig.py (#1370)
Browse files Browse the repository at this point in the history
Signed-off-by: Bala.FA <bala@minio.io>
  • Loading branch information
balamurugana committed Dec 11, 2023
1 parent db31dda commit 99f8c41
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions minio/versioningconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
OFF = "Off"
SUSPENDED = "Suspended"

K = TypeVar("K", bound="VersioningConfig")
A = TypeVar("A", bound="VersioningConfig")


class VersioningConfig:
Expand Down Expand Up @@ -56,13 +56,13 @@ def mfa_delete(self) -> str | None:
return self._mfa_delete

@classmethod
def fromxml(cls: Type[K], element: ET.Element) -> K:
def fromxml(cls: Type[A], element: ET.Element) -> A:
"""Create new object with values from XML element."""
status = findtext(element, "Status")
mfa_delete = findtext(element, "MFADelete")
return cls(status, mfa_delete)

def toxml(self, element: ET.Element) -> ET.Element:
def toxml(self, element: ET.Element | None) -> ET.Element:
"""Convert to XML."""
element = Element("VersioningConfiguration")
if self._status:
Expand Down

0 comments on commit 99f8c41

Please sign in to comment.