Skip to content

gh-62172: Document undocumented public functions in inspect - #153624

Open
sreehariannam wants to merge 6 commits into
python:mainfrom
sreehariannam:gh-62172-inspect-docs
Open

gh-62172: Document undocumented public functions in inspect#153624
sreehariannam wants to merge 6 commits into
python:mainfrom
sreehariannam:gh-62172-inspect-docs

Conversation

@sreehariannam

@sreehariannam sreehariannam commented Jul 12, 2026

Copy link
Copy Markdown

Adds documentation for public, __all__-exported functions in the inspect module that were missing from Doc/library/inspect.rst:

  • inspect.getabsfile()
  • inspect.indentsize()
  • inspect.classify_class_attrs()
  • inspect.findsource()
  • inspect.getblock()
  • inspect.walktree()
  • inspect.getargs()
  • inspect.formatannotation()
  • inspect.formatannotationrelativeto()
  • inspect.getlineno()

Closes gh-62172. This was originally split across multiple PRs (#153628, #154534, #154536); per review feedback, all of the changes have been consolidated into this single PR.

Verified with sphinx-lint (no issues) against the current Doc/library/inspect.rst.

@bedevere-app bedevere-app Bot added docs Documentation in the Doc dir skip news labels Jul 12, 2026
@python-cla-bot

python-cla-bot Bot commented Jul 12, 2026

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@read-the-docs-community

read-the-docs-community Bot commented Jul 12, 2026

Copy link
Copy Markdown

Comment thread Doc/library/inspect.rst Outdated
Comment thread Doc/library/inspect.rst Outdated
@sreehariannam

Copy link
Copy Markdown
Author

Thanks for the review! Addressed both points in the latest commit: dropped the normcase implementation detail from getabsfile's description, and linked named tuple via :term: in classify_class_attrs.

@picnixz

picnixz commented Jul 24, 2026

Copy link
Copy Markdown
Member

Please incorporate the other docs changes in this PR. There is no need for multiple ones.

@sreehariannam sreehariannam changed the title gh-62172: Document classify_class_attrs(), getabsfile(), and indentsize() in inspect gh-62172: Document undocumented public functions in inspect Jul 24, 2026
@sreehariannam

Copy link
Copy Markdown
Author

Consolidated the docs for findsource, getblock, walktree, getargs, formatannotation, formatannotationrelativeto, and getlineno into this PR as requested, alongside the original getabsfile, indentsize, and classify_class_attrs entries. Closing #153628, #154534, and #154536 in favor of this one.

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

Labels

awaiting core review docs Documentation in the Doc dir skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

inspect module docs omits many functions

3 participants