Replies: 2 comments 3 replies
-
Thanks for opening the discussion! I can definitely see the argument here, but I'm not sure if we'd want to exclude "main" specifically or expose some kind of configuration knob here. I don't think we'd want a separate rule entirely. To me, this seems like a good use case for noqa, or per-file-ignores if all of the scripts are in a single directory. Another option that I've used in the past is just to call the main function |
Beta Was this translation helpful? Give feedback.
-
Oh I see what you mean, I overlooked the top-level docstring part. I think a configuration option could be a reasonable solution, but I'll be curious to see what @MichaReiser thinks when he's back from PTO. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
This was an unresolved feature request in pydocstyle regarding undocumented-public-function (D103).
If a public module/script has a top-level docstring, it's probably redundant to document the
main
function.Like the original reporter, I don't want to ignore D103, or add
# noqa: D103
to everydef main():
of every file.I guess ruff wouldn't change a rule inherited from another tool, but is it possible to have a variant of this rule that excludes
main
functions? So I could ignore D103 and select (for example) D103A.Beta Was this translation helpful? Give feedback.
All reactions