Reading this, I wouldn't think so; it seems to imply that nothing should be defined in that file and then imported elsewhere. Yet, pydocstyle will give me such errors as D100: Missing docstring in public module in __main__.py, which I found surprising. I'm not entirely certain which behavior is correct, though.
Looking at git blame for the relevant code, it seems to have not been touched since 2020-09-05, whereas __main__.py was added in Python 3.10 on 2021-10-04, so maybe pydocstyle isn't treating this specially simply because this feature didn't exist at the time the relevant code was written.
Reading this, I wouldn't think so; it seems to imply that nothing should be defined in that file and then imported elsewhere. Yet,
pydocstyle
will give me such errors asD100: Missing docstring in public module
in__main__.py
, which I found surprising. I'm not entirely certain which behavior is correct, though.Looking at
git blame
for the relevant code, it seems to have not been touched since 2020-09-05, whereas__main__.py
was added in Python 3.10 on 2021-10-04, so maybepydocstyle
isn't treating this specially simply because this feature didn't exist at the time the relevant code was written.