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

Autodoc should skip inherited methods #46908

Closed
jmillikin mannequin opened this issue Apr 18, 2008 · 2 comments
Closed

Autodoc should skip inherited methods #46908

jmillikin mannequin opened this issue Apr 18, 2008 · 2 comments
Assignees
Labels
docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error

Comments

@jmillikin
Copy link
Mannequin

jmillikin mannequin commented Apr 18, 2008

BPO 2656
Nosy @birkenfeld, @jmillikin

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/birkenfeld'
closed_at = <Date 2008-05-04.09:09:34.408>
created_at = <Date 2008-04-18.21:02:42.969>
labels = ['type-bug', 'docs']
title = 'Autodoc should skip inherited methods'
updated_at = <Date 2008-05-04.09:09:34.387>
user = 'https://github.com/jmillikin'

bugs.python.org fields:

activity = <Date 2008-05-04.09:09:34.387>
actor = 'georg.brandl'
assignee = 'georg.brandl'
closed = True
closed_date = <Date 2008-05-04.09:09:34.408>
closer = 'georg.brandl'
components = ['Documentation tools (Sphinx)']
creation = <Date 2008-04-18.21:02:42.969>
creator = 'jmillikin'
dependencies = []
files = []
hgrepos = []
issue_num = 2656
keywords = []
message_count = 2.0
messages = ['65624', '66198']
nosy_count = 2.0
nosy_names = ['georg.brandl', 'jmillikin']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue2656'
versions = ['Python 2.6']

@jmillikin
Copy link
Mannequin Author

jmillikin mannequin commented Apr 18, 2008

Using the following class layout:

class A (object):
	def a (self):
		"A.a"
		pass
class B (A):
	def b (self):
		"B.b"
		pass

If sphinx.ext.autodoc is used to extract documentation, the entry for
class B will have subentries for both the a() and b() methods. This is
unnecessary clutter. It would be nice if the inherited method was
skipped when documenting B, or even better if it was inserted as a
"stub" linking to the documentation for A.a().

@jmillikin jmillikin mannequin assigned birkenfeld Apr 18, 2008
@jmillikin jmillikin mannequin added docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error labels Apr 18, 2008
@birkenfeld
Copy link
Member

Thanks. In SVN (r62695), autodoc now skips inherited members unless the
:inherited-members: flag option is given.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant