I made a mistake.

The example should be following:

Absolute import:

from project.bar import hoge

class foo(hoge):
    ...

Relative import:

from .bar import hoge

class foo(hoge):
    ...

2017年12月12日火曜日 17時53分55秒 UTC+9 Luc Saffre:
>
> Does your second example import at all? Because AFAICS it should be:: 
>
>   import project.bar 
>
>   class foo(project.bar) 
>       ... 
>
> Luc 
>
> On 12/12/17 09:32, [email protected] <javascript:> wrote: 
> > As title, if I use relative import, `make html` will create a html that 
> > contains such code to link the reference.  
> > <a class="reference internal" href="foo.html#bar" title="foo.bar"> 
> > 
> > import .bar 
> > 
> > class foo(bar) 
> >     ... 
> > 
> > 
> > But if I use absolute import, it does not. 
> > 
> > import project.bar 
> > 
> > class foo(bar) 
> >     ... 
> > 
> > 
> > Any ideas? 
> > 
> > -- 
> > 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 [email protected] <javascript:> 
> > <mailto:[email protected] <javascript:>>. 
> > To post to this group, send email to [email protected] 
> <javascript:> 
> > <mailto:[email protected] <javascript:>>. 
> > 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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sphinx-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to