-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix documentation & coding style of User.name & User.full_name #956
Conversation
- Use string `format` instead of dict comprehension. - Better documentation to signify the semantics difference between `name` and `full_name`.
Maybe note in docs that the username returned starts with '@'? |
@bomjacob Good idea. On it. |
@tsnoam I would remove the note. |
Codecov Report
@@ Coverage Diff @@
## master #956 +/- ##
==========================================
- Coverage 91.69% 91.68% -0.01%
==========================================
Files 103 103
Lines 4044 4042 -2
Branches 639 638 -1
==========================================
- Hits 3708 3706 -2
Misses 197 197
Partials 139 139
|
telegram/user.py
Outdated
if present :attr:`first_name` and :attr:`last_name`. | ||
:obj:`str`: The user's :attr:`username` if available, otherwise returns :attr:`full_name`. | ||
|
||
NOTE: This is a convenience property, not part of the official Telegram Bot API. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove these notes please. We have them nowhere in the docs and it has no added value imo.
telegram/user.py
Outdated
:obj:`str`: The users :attr:`first_name` and if present :attr:`last_name`. | ||
:obj:`str`: The user's :attr:`first_name`, followed by (if present) :attr:`last_name`. | ||
|
||
NOTE: This is a convenience property, not part of the official Telegram Bot API. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove these notes please. We have them nowhere in the docs and it has no added value imo.
LGTM :) |
No description provided.