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

two classes with the same name confuse pydoctor #33

Open
mwhudson opened this issue Jan 12, 2015 · 6 comments
Open

two classes with the same name confuse pydoctor #33

mwhudson opened this issue Jan 12, 2015 · 6 comments

Comments

@mwhudson
Copy link
Contributor

If two classes are defined in a file with the same name (e.g. one defined in an 'except' block, and the other in an 'else' block), pydoctor appends a number to the end of the generated name which links to nothing.

Generated docs:
http://twistedmatrix.com/documents/10.2.0/api/twisted.web.client.html

Source:
http://twistedmatrix.com/trac/browser/tags/releases/twisted-10.2.0/twisted/web/client.py#L567


Imported from Launchpad using lp2gh.

@mwhudson
Copy link
Contributor Author

(by mwhudson)
Sigh, yeah, that's not very good. I'm surprised by the 404 tbh, but it's still not clear what one should do here. Do you have any ideas? :-)

@mwhudson
Copy link
Contributor Author

(by lifeless)
write both classes to the html?

@tristanlatr
Copy link
Contributor

tristanlatr commented Nov 8, 2020

I'm having this issue with a Module name and a Class name here: https://chorsley.github.io/python-Wappalyzer/Wappalyzer.html
I think it's related to #17 actually

@tristanlatr
Copy link
Contributor

Now, I'm actually running into this bug with class 'Arena' from https://github.com/python/cpython/blob/master/Lib/multiprocessing/heap.py

I was trying to convert cpython API output to Dash compatible file with doc2dash and i ran into:

FileNotFoundError: [Errno 2] No such file or directory: '.../cpython-output.docset/Contents/Resources/Documents/Lib.multiprocessing.heap.Arena%200.html'

Now it looks like both classes do not appear in the module documentation. BUT rather they both appear in the name index.
Which is the issue for doc2dash cause it's parsing the nameIndex.html file to extract informations.

by default 2020-11-28 at 7 32 51 PM

This is a really tricky issue, but I think both class documentation should end up in the same class page.

@tristanlatr
Copy link
Contributor

tristanlatr commented Dec 4, 2020

Here is another instance of this issue,

https://tristanlatr.github.io/python-igraph/igraph.summary%200.html

It's a little bit more sneaky since the is no other module named summary but there is a method in the __init__.py named summary

https://github.com/tristanlatr/python-igraph/blob/3b2313ea6918d3c641f1b7d6bd23572a485d56d2/src/igraph/__init__.py#L4788

@tristanlatr
Copy link
Contributor

(This issue is most probably a duplicate of #17)

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

No branches or pull requests

2 participants