Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upRestrict class interface? #25
Comments
This comment has been minimized.
This comment has been minimized.
|
Hmm. You can technically achieve your goal today, but it isn't pretty. It's based on this little line at the end of the docs:
So if class MyCmd(Cmd):
__pdoc__['MyCmd.foo'] = NoneListing all the fields sucks, so maybe you can do: class MyCmd(Cmd):
for field in Cmd.__dict__.keys():
__pdoc__['MyCmd.%s' % field] = NoneBut this isn't pretty. In that light, I think #15 is a duplicate. |
This comment has been minimized.
This comment has been minimized.
|
Thanks! |
mriehl
closed this
Jan 22, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
mriehl commentedJan 22, 2015
Hi,
Subclassing bloated classes (like
cmd.Cmd) will result in pdoc showing all methods from the inheritance tree, which is a lot.Is there some kind of
__all__at the class level to restrict these? TheCmdclass for example has lots of internal methods that do not begin with underscores, and I would like to omit those from the documentation.Any ideas how to go about this?