Skip to content
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

Fix or work around stricter pydoctor warnings about __all__ and __doc__ #10080

Closed
twisted-trac opened this issue Jan 19, 2021 · 2 comments
Closed

Comments

@twisted-trac
Copy link

mthuurne's avatar @mthuurne reported
Trac ID trac#10080
Type defect
Created 2021-01-19 01:52:22Z

These warnings will appear when using the next pydoctor release:

src/twisted/test/proto_helpers.py:13: Cannot parse value assigned to "__all__"
src/twisted/application/twist/_options.py:79: Unable to figure out value for __doc__ assignment, maybe too complex
src/twisted/application/twist/_options.py:104: Unable to figure out value for __doc__ assignment, maybe too complex
src/twisted/application/twist/_options.py:147: Unable to figure out value for __doc__ assignment, maybe too complex

The warning about __all__ happens because the __all__ value from the new module is re-used in the deprecated module. I think this is incorrect: if the new module adds names to __all__, those new names should not show up in the deprecated module. So my suggestion is to assign an explicit list to __all__ containing only the deprecated names.

The __doc__ assignments warned about are not regular docstrings. Instead, they're help texts for twisted.python.Options. Therefore we should probably hide those docstrings or at least the runtime modifications of them from pydoctor, which can be done by wrapping the modifications into a function.

Searchable metadata
trac-id__10080 10080
type__defect defect
reporter__mthuurne mthuurne
priority__normal normal
milestone__None None
branch__ 
branch_author__ 
status__closed closed
resolution__fixed fixed
component__core core
keywords__review review
time__1611021142805487 1611021142805487
changetime__1611338696302846 1611338696302846
version__None None
owner__Maarten_ter_Huurne__maarten_____ Maarten ter Huurne <maarten@...>

@twisted-trac
Copy link
Author

mthuurne's avatar @mthuurne commented

PR: #1505

@twisted-trac
Copy link
Author

mthuurne's avatar @mthuurne set owner to @mthuurne
@mthuurne set status to closed

In changeset 09b9685

#!CommitTicketReference repository="" revision="09b96850c2ebcb635f448ed3f9bbf5f157be3693"
Merge pull request #1505 from twisted/10080-cleanup-doc-all

Author: mthuurne
Reviewer: adiroiban
Fixes: ticket:10080

Fix or work around stricter pydoctor warnings about __all__ and __doc__

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant