-
-
Notifications
You must be signed in to change notification settings - Fork 248
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
D103 linter warnings from script.py.mako templates #1567
Comments
This will silence the commonly used pydocstyle D103 warnings from flake8 or ruff check: http://www.pydocstyle.org/en/stable/error_codes.html#grouping https://docs.astral.sh/ruff/rules/undocumented-public-function/ Closes sqlalchemy#1567
hi - I disagree with these linter rules and I would disable them. you can change your own script.py.mako to resolve. feel free to send a pull request otherwise I would close this. |
I agree not everyone will use these rules, and they can be disabled on a file by file basis if the rest of the project does. However, the PR is simple and small, and will mean less work for those alembic users which do run with the docstring linter rules enabled. |
I'm personally -1 here. The suggested doc strings in the PR don't add anything in my point of view. Up to you mike, but I would close this and not merge the PR |
I think it's harmless to have a basic docstring in the upgrade/downgrade method. I think a little bit of putting a more complete description in the docstring as to how the code gets there and that it should be edited etc. but then I dont konw that I want a huge paragraph being spit out there. |
Describe the bug
Scripts created under
<project>/alembic/versions/<name>.py
from the Mako template fail the pydocstyle D103 style check, e.g. via flake8 or ruff check:Expected behavior
The templates would include minimal docstrings for the
upgrade
anddowngrade
functions.To Reproduce
Followed the tutorial, having enabled ruff check in
alembic.ini
and then run this with a trailing dot in the message to avoid D400 or D415.Or without using this via the configuration, follow that with:
Error
Versions.
Additional context
PR to follow.
Have a nice day!
The text was updated successfully, but these errors were encountered: