Skip to content
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

Merged
merged 2 commits into from
Dec 30, 2017

Conversation

tsnoam
Copy link
Member

@tsnoam tsnoam commented Dec 30, 2017

No description provided.

 - Use string `format` instead of dict comprehension.
 - Better documentation to signify the semantics difference between
   `name` and `full_name`.
@jsmnbom
Copy link
Member

jsmnbom commented Dec 30, 2017

Maybe note in docs that the username returned starts with '@'?

@tsnoam
Copy link
Member Author

tsnoam commented Dec 30, 2017

@bomjacob Good idea. On it.

@Eldinnie
Copy link
Member

@tsnoam I would remove the note.

@codecov
Copy link

codecov bot commented Dec 30, 2017

Codecov Report

Merging #956 into master will decrease coverage by <.01%.
The diff coverage is 100%.

@@            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
Impacted Files Coverage Δ
telegram/user.py 86.36% <100%> (-0.6%) ⬇️

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.
Copy link
Member

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.
Copy link
Member

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.

@jsmnbom
Copy link
Member

jsmnbom commented Dec 30, 2017

LGTM :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants