Skip to content

Commit

Permalink
linting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
angrybat committed Dec 28, 2023
1 parent fcb1421 commit 9c6d2d6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions minio/commonconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

from abc import ABCMeta
from datetime import datetime
from typing import Optional, Type, TypeVar, cast
from typing import Type, TypeVar, cast
from xml.etree import ElementTree as ET

from .error import MinioException
Expand Down Expand Up @@ -84,9 +84,9 @@ def fromxml(cls: Type[A], element: ET.Element) -> A:
return obj

@classmethod
def from_user_tags_text(cls: Type[A], string: Optional[str]) -> A:
def object_from_user_tags_text(cls: Type[A], string: str | None) -> A:
"""Create new object from the text returned in the UserTags key"""
tags = Tags.new_object_tags()
tags = cls(True)
if string:
for key_value in string.split("&"):
key, value = key_value.split("=")
Expand Down
2 changes: 1 addition & 1 deletion minio/datatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ def fromxml(
object_name = unquote_plus(object_name)

tags_text = findtext(element, "UserTags")
tags = Tags.from_user_tags_text(tags_text)
tags = Tags.object_from_user_tags_text(tags_text)

return cls(
bucket_name,
Expand Down

0 comments on commit 9c6d2d6

Please sign in to comment.