Skip to content

Исправлены ошибки в документации и улучшено описание аргументов#137

Open
Olegt0rr wants to merge 11 commits intolove-apples:mainfrom
Olegt0rr:bugfix/docs-errors
Open

Исправлены ошибки в документации и улучшено описание аргументов#137
Olegt0rr wants to merge 11 commits intolove-apples:mainfrom
Olegt0rr:bugfix/docs-errors

Conversation

@Olegt0rr
Copy link
Copy Markdown
Collaborator

@Olegt0rr Olegt0rr commented Apr 26, 2026

Документация при сборке сыпала ошибками (900+ шт.)

Убрано дублирование аннотаций - в каждом докстринге был дополнительно прописан тип, а mkdocs сам берёт типы из сигнатуры. Лучше иметь один источник истины, а отказаться от проверки типов в сигнатуре мы не можем (тогда mypy не будет делать проверку)

Пруф

Screenshot 2026-04-27 at 08 57 26 Screenshot 2026-04-27 at 08 57 01

Copilot AI review requested due to automatic review settings April 26, 2026 22:20
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

PR направлен на устранение массовых ошибок сборки документации (mkdocstrings) за счёт корректировок docstring’ов и настроек генерации страниц пакетов.

Changes:

  • Исправлены/упрощены описания аргументов и атрибутов в docstring’ах (в т.ч. для attachments, sleep_after_input_media, Link(*parts, url=...)).
  • Для ряда страниц-пакетов в docs/**/index.md отключён вывод members (через members: false), чтобы снизить шум/ошибки генерации.
  • Скорректированы фильтры исключений в страницах docs/exceptions/*.

Reviewed changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
maxapi/utils/formatting.py Уточнение описания аргументов Link в соответствии с *parts.
maxapi/types/updates/message_callback.py Упрощение описания attachments в модели для callback.
maxapi/types/message.py Упрощение docstring’ов для MessageBody и методов отправки/редактирования.
maxapi/methods/send_message.py Упрощение описания attachments в docstring класса метода отправки.
maxapi/bot.py Упрощение описания attachments в docstring методов send_message/edit_message.
docs/utils/index.md Отключение вывода members на странице пакета.
docs/types/updates/update.md Отключение вывода members на странице модуля/пакета updates.
docs/types/updates/index.md Отключение вывода members на странице пакета.
docs/types/index.md Отключение вывода members на странице пакета.
docs/types/attachments/index.md Отключение вывода members на странице пакета.
docs/types/attachments/buttons/index.md Отключение вывода members на странице пакета.
docs/methods/types/index.md Отключение вывода members на странице пакета.
docs/methods/index.md Отключение вывода members на странице пакета.
docs/filters/index.md Отключение вывода members на странице пакета.
docs/exceptions/max.md Доп. исключения добавлены в exclude-фильтры.
docs/exceptions/dispatcher.md Доп. исключения добавлены в exclude-фильтры.
docs/enums/index.md Отключение вывода members на странице пакета.
docs/context/index.md Отключение вывода members на странице пакета.
docs/connection/index.md Отключение вывода members на странице пакета.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread maxapi/methods/send_message.py
Comment thread maxapi/bot.py
Comment thread maxapi/bot.py
Comment thread maxapi/types/updates/message_callback.py Outdated
Comment thread maxapi/types/message.py Outdated
Olegt0rr and others added 2 commits April 27, 2026 01:25
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 21 out of 21 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread maxapi/types/updates/message_callback.py Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 113 out of 113 changed files in this pull request and generated 8 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread maxapi/connection/base.py Outdated
Comment thread maxapi/types/updates/message_removed.py
Comment thread maxapi/types/updates/user_added.py
Comment thread maxapi/types/updates/user_removed.py
Comment thread maxapi/methods/types/getted_subscriptions.py
Comment thread maxapi/bot.py Outdated
Comment thread maxapi/filters/command.py Outdated
Comment thread maxapi/filters/command.py Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 113 out of 113 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread maxapi/methods/types/getted_subscriptions.py Outdated
Comment thread maxapi/types/updates/message_chat_created.py Outdated
Comment thread maxapi/types/updates/bot_started.py Outdated
Comment thread maxapi/types/updates/bot_stopped.py Outdated
Comment thread maxapi/methods/send_callback.py Outdated
@Olegt0rr Olegt0rr marked this pull request as draft April 27, 2026 15:44
# Conflicts:
#	maxapi/filters/middleware.py
#	maxapi/types/message.py
#	maxapi/types/updates/message_callback.py
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 113 out of 113 changed files in this pull request and generated 8 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread maxapi/types/message.py
Comment thread docs/exceptions/max.md Outdated
Comment thread docs/exceptions/dispatcher.md Outdated
Comment thread maxapi/types/updates/user_added.py
Comment thread maxapi/types/updates/user_added.py
Comment thread maxapi/types/updates/user_removed.py
Comment thread maxapi/types/updates/message_callback.py
Comment thread maxapi/types/updates/message_callback.py Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 112 out of 112 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

maxapi/types/updates/message_callback.py:42

  • attachments описан как «по умолчанию пустой список», но поле при этом аннотировано как list[...] | None. С default_factory=list значение по умолчанию фактически [], поэтому Optional-аннотация выглядит неоднозначно. Для ясности лучше либо сделать тип не-Optional, либо явно описать, что None допустим, но значение по умолчанию — пустой список.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread maxapi/types/updates/user_removed.py Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 112 out of 112 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Olegt0rr Olegt0rr marked this pull request as ready for review April 28, 2026 11:48
@Olegt0rr Olegt0rr requested a review from love-apples April 28, 2026 18:26
@Olegt0rr Olegt0rr added the documentation Improvements or additions to documentation label Apr 28, 2026
@Olegt0rr Olegt0rr self-assigned this Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants