Skip to content

Commit 841c15c

Browse files
committed
Added AccountBadge to docs
1 parent 8c840a5 commit 841c15c

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

docs/api.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,13 @@ Auxiliary Classes
167167
Auxiliary classes are used to hold certain data in a standardized way, in some cases, introducing additional methods
168168
and properties for their use.
169169

170+
AccountBadge
171+
------------------
172+
.. autoclass:: AccountBadge
173+
:members:
174+
:inherited-members:
175+
176+
170177
AccountInformation
171178
------------------
172179
.. autoclass:: AccountInformation

tibiapy/character.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ class Character(abc.BaseCharacter):
137137
The date when the character will be deleted if it is scheduled for deletion.
138138
former_names: :class:`list` of :class:`str`
139139
Previous names of the character.
140-
title: :class:`str`
141-
The character's selected title.
140+
title: :class:`str`, optional
141+
The character's selected title, if any.
142142
unlocked_titles: :class:`int`
143143
The number of titles the character has unlocked.
144144
sex: :class:`Sex`
@@ -210,8 +210,8 @@ class Character(abc.BaseCharacter):
210210
def __init__(self, name=None, world=None, vocation=None, level=0, sex=None, **kwargs):
211211
self.name = name # type: str
212212
self.former_names = kwargs.get("former_names", []) # type: List[str]
213-
self.title = kwargs.get("title") # type: str
214-
self.unlocked_titles = kwargs.get("unlocked_titles", 0)
213+
self.title = kwargs.get("title") # type: Optional[str]
214+
self.unlocked_titles = int(kwargs.get("unlocked_titles", 0))
215215
self.sex = try_enum(Sex, sex)
216216
self.vocation = try_enum(Vocation, vocation)
217217
self.level = int(level)

0 commit comments

Comments
 (0)