Skip to content

Fix documentation & coding style of User.name & User.full_name - #956

Merged
tsnoam merged 2 commits into
masterfrom
user-prop-fix-semantics
Dec 30, 2017
Merged

Fix documentation & coding style of User.name & User.full_name#956
tsnoam merged 2 commits into
masterfrom
user-prop-fix-semantics

Conversation

@tsnoam

@tsnoam tsnoam commented Dec 30, 2017

Copy link
Copy Markdown
Member

No description provided.

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

jsmnbom commented Dec 30, 2017

Copy link
Copy Markdown
Member

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

@tsnoam

tsnoam commented Dec 30, 2017

Copy link
Copy Markdown
Member Author

@bomjacob Good idea. On it.

@Eldinnie

Copy link
Copy Markdown
Member

@tsnoam I would remove the note.

@codecov

codecov Bot commented Dec 30, 2017

Copy link
Copy Markdown

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%) ⬇️

Comment thread 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
Copy Markdown
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.

Comment thread 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
Copy Markdown
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

jsmnbom commented Dec 30, 2017

Copy link
Copy Markdown
Member

LGTM :)

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

Labels

📋 pending-merge work status: pending-merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants