Исправлены ошибки в документации и улучшено описание аргументов#137
Исправлены ошибки в документации и улучшено описание аргументов#137Olegt0rr wants to merge 11 commits intolove-apples:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
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.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
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.
# Conflicts: # maxapi/filters/middleware.py # maxapi/types/message.py # maxapi/types/updates/message_callback.py
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
… для marker и count
Документация при сборке сыпала ошибками (900+ шт.)
Убрано дублирование аннотаций - в каждом докстринге был дополнительно прописан тип, а mkdocs сам берёт типы из сигнатуры. Лучше иметь один источник истины, а отказаться от проверки типов в сигнатуре мы не можем (тогда mypy не будет делать проверку)
Пруф