Hi, The 'module' attribute does not equals to the filename.
>>> import sphinx.environment >>> sphinx.environment.BuildEnvironment.__module__ 'sphinx.environment' >>> sphinx.environment.__file__ '/Users/tkomiya/work/sphinx/sphinx/environment/__init__.py' I don't know good way to convert module name to filename, but you need to improve your handler. Thanks, Takeshi KOMIYA 2018-02-08 19:03 GMT+09:00 Jan Ulrich Hasecke <juh+sphinx-us...@mailbox.org>: > Hi all, > > I have this in conf.py: > > def linkcode_resolve(domain, info): > if domain != 'py': > return None > if not info['module']: > return None > filename = info['module'].replace('.', '/') > return "https://github.com/sphinx-doc/sphinx/blob/master/%s.py" % > filename > > While this works: > > .. module:: sphinx.environment.collectors.asset > > .. class:: ImageCollector > > > This does not link to the right file, nameley the __init__.py > > .. module:: sphinx.environment > > .. class:: BuildEnvironment > > > What do I miss? > > I am working with the current Sphinx version. > > TIA > juh > > -- > You received this message because you are subscribed to the Google Groups > "sphinx-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sphinx-users+unsubscr...@googlegroups.com. > To post to this group, send email to sphinx-users@googlegroups.com. > Visit this group at https://groups.google.com/group/sphinx-users. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "sphinx-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-users+unsubscr...@googlegroups.com. To post to this group, send email to sphinx-users@googlegroups.com. Visit this group at https://groups.google.com/group/sphinx-users. For more options, visit https://groups.google.com/d/optout.