Skip to content

Commit

Permalink
Merge "IMPR: use str() buildin instead of soecial function call __str__"
Browse files Browse the repository at this point in the history
  • Loading branch information
jenkins-bot authored and Gerrit Code Review committed Dec 9, 2024
2 parents 8403a9d + 4d29308 commit b47a64a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pywikibot/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def __init__(self, code: str, info: str, **kwargs: Any) -> None:
self.code = code
self.info = info
self.other = kwargs
self.unicode = self.__str__()
self.unicode = str(self)

def __repr__(self) -> str:
"""Return internal representation."""
Expand Down
2 changes: 1 addition & 1 deletion pywikibot/site/_basesite.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def __str__(self) -> str:
@property
def sitename(self):
"""String representing this Site's name and code."""
return self.__str__()
return str(self)

def __repr__(self) -> str:
"""Return internal representation."""
Expand Down

0 comments on commit b47a64a

Please sign in to comment.