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
[Documentation] Add valuable information to attribute docstrings of telegram classes #3109
Comments
I did like to participate in contribute in making the above changes as a beginner in open source. |
You're very welcome to contribute! please leave a short comment about which classes you want to cover in a pull request :) |
is this still available for a beginner? |
You're very welcome to contribute! There haven't been any PRs regarding this so far. please leave a short comment about which classes you want to cover in a pull request :) |
i shall go for the |
Collision avoidance: I'll start at the bottom and take care of the _web family of classes. Happy Hacktober! 🍻 |
Thanks for the notice @penguinpee . But can you clarify which classes exactly you mean? There are no classes in the |
I was referring to the classes in |
- copied mostly from args to attributes - fixed language - fixed and improved formatting - contribution to python-telegram-bot#3109
I'm willing to do more to make this a worthwhile Hacktober contribution. |
I did the Chat class and unified the docstrings of args & attributes in the PR. |
Tackling the poll class for a start. |
List of classes: ("NCN" = "No changes needed")
|
The docs of Telegram classes are currently written such that the docstring of the arguments are more informative than the docstring of the respective attributes. E.g. for
Chat.has_private_forwards
, "Returned only inget_chat()
" is only present in the argument docstrings, not in the attribute docstring. ForMessage.text
, the length limitation is only documented for the argument, not the attribute.This logic makes sense for classes that are to be instantiated by the user (like
BotCommand
orInputMedia*
), but for classes that are rarely instantiated by the user likeChat
andMessage
this makes it sometimes hard to find valuable information.I suggest to revisit the documentation of the Telegram classes and either unify the docstrings of args & attributes or at least check which information would be worth adding to the attributes as well.
Contributions in this direction are very welcome! They also don't have to cover all Telegram classes at once - instead this can be done step by step. If you want to cover (parts of) this, please leave a comment below, so that we can avoid duplicate work.
PRs for this should be made against the
doc-fixes
branch. Please also check out the contribution guide, especially the part on how to build the documentation locally.Classes are listed below for convenience.
The text was updated successfully, but these errors were encountered: