Add multi-line docstring rule to python.ru.md#123
Open
ilyatikhonyuk wants to merge 2 commits into
Open
Conversation
Docstrings are always multi-line: nothing on the line after the opening triple quotes, closing quotes on their own line. Codifies the team agreement previously enforced only in review comments. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Per review: the section sat between the PEP8-deviations list and the "инструкции по настройке" phrase, leaving the phrase dangling. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Что изменилось
В
python.ru.mdдобавлено правило оформления докстрингов:"""на той же строке ничего не пишется, текст начинается со следующей строки;"""— на отдельной строке.Добавлены: пункт в список «Отличия от PEP8», отдельный раздел «Докстринги» с примером «плохо/хорошо» и пометка, что текущий набор инструментов (black/isort/pylint) это правило не проверяет — оно соблюдается на ревью.
Зачем
Договорённость команды уже действует, но нигде не записана — она передаётся через комментарии в ревью, каждый раз заново. Из-за этого:
codestyle, читают правила именно из этого файла (python.ru.md) на каждом прогоне — пока правила здесь нет, они генерируют однострочные докстринги, и их приходится править руками.После мерджа правило подхватится агентами автоматически, без изменений в скиллах.
Что сознательно не сделано
Автоматическая проверка (pydocstyle/ruff, правила семейства D2xx) не добавлена: это новый инструмент в конвейере и CI всех репозиториев — отдельное решение. Если команда захочет, оформим отдельным PR.
🤖 Generated with Claude Code