Skip to content

Class docstrings aligned with API and format unified - #2621

Merged
Badiboy merged 7 commits into
eternnoir:masterfrom
Badiboy:master
Aug 22, 2026
Merged

Class docstrings aligned with API and format unified#2621
Badiboy merged 7 commits into
eternnoir:masterfrom
Badiboy:master

Conversation

@Badiboy

@Badiboy Badiboy commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Description

Class docstrings aligned with API and format unified.
Some classes adopted to API signatures.

@Badiboy
Badiboy requested a lite review from Copilot August 21, 2026 10:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@Badiboy

Badiboy commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator Author

@coder2020official ONLY docstrings here, no parameters update itself YET )

  1. All texts strictly aligned with API.
  2. All descriptions are single-lined.
  3. All spaces aligned.

ReplyKeyboardMarkup - keyboard added

InlineKeyboardMarkup - keyboard changed to inline_keyboard.

Poll - poll_id changed to id
@Badiboy
Badiboy requested a lite review from Copilot August 21, 2026 16:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.

Comment thread telebot/types.py
:param supergroup_chat_created: Optional. Service message: the supergroup has been created. This field can't be
received in a message coming through updates, because bot can't be a member of a supergroup when it is created. It can
only be found in reply_to_message if someone replies to a very first message in a directly created supergroup.
:param supergroup_chat_created: Optional. Service message: the supergroup has been created. This field can't be received in a message coming through updates, because bot can't be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather break long descriptions down into multiple lines

@Badiboy Badiboy Aug 21, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather break long descriptions down into multiple lines

I did this for two reasons.

1 - Docstrings are used for manuals and hints. Both align long strings like this:
image
Inside library code nobody read them. So there is no need to place long stings into multiple strings manually.

2 - Multilne descriptions are very hard to verify/align automatically due to hard structure of the API/classes.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uhh idk it just looks nicer on the inside. I must've done it for a reason. maybe it was because I kept getting warnings when I generated docs? (pytba.readthedocs.io/en/latest/)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uhh idk it just looks nicer on the inside. I must've done it for a reason. maybe it was because I kept getting warnings when I generated docs? (pytba.readthedocs.io/en/latest/)

image Looks also fine, isn't it?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'll look fine just billions of warnings when building docs... Are you sure you can't split descriptions into multiple lines?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be honest, docs warning looks like a quite weak reason for multilining descriptions...

@coder2020official

Copy link
Copy Markdown
Collaborator

Most of these docstrings were automatically generated back in 2023?

@Badiboy

Badiboy commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator Author

Most of these docstrings were automatically generated back in 2023?

What that means? All texts are aligned with the current API docs.

@Badiboy

Badiboy commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator Author

Next update will be soon - lot of (~150) parameters descriptions will be automatically updated to current API.

@Badiboy

Badiboy commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator Author

Next update will be soon - lot of (~150) parameters descriptions will be automatically updated to current API.

57a5bff

That's what is the main target for previous alignment )

@Badiboy

Badiboy commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator Author

@coder2020official I'm done here.
It needs to be finished so I'll continue with parameters itself. Most of them are missed type hints and optional/not optional. Plus 4 classes with errors.

@Badiboy

Badiboy commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator Author

@coder2020official Thank you. I see you do not like it too much, thus thank you twice.
Hope the future results will compensate this.

@Badiboy
Badiboy merged commit 7434041 into eternnoir:master Aug 22, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants