-
-
Notifications
You must be signed in to change notification settings - Fork 34.4k
Use roles :data: and :const: for module-level variables and constants #106892
Copy link
Copy link
Closed
Labels
3.11only security fixesonly security fixes3.12only security fixesonly security fixes3.13bugs and security fixesbugs and security fixesdocsDocumentation in the Doc dirDocumentation in the Doc dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Role :data: is purposed for marking a module-level variable. [1] But role :attr: is often used instead in cases like sys.modules. While technically any module-level variable is accessible as an attribute, I think that it would be better to use more special role :data:.
[1] https://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html#role-py-data
Linked PRs
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
3.11only security fixesonly security fixes3.12only security fixesonly security fixes3.13bugs and security fixesbugs and security fixesdocsDocumentation in the Doc dirDocumentation in the Doc dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error