Re: [sphinx-users] How to make a link for absolute import in python?

2017-12-12 Thread wenhao . hu
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, wenh...@leapmind.io  wrote: 
> > As title, if I use relative import, `make html` will create a html that 
> > contains such code to link the reference.  
> >  
> > 
> > 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 sphinx-users...@googlegroups.com  
> > . 
> > To post to this group, send email to sphinx...@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.


Re: [sphinx-users] How to make a link for absolute import in python?

2017-12-12 Thread 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, wenhao...@leapmind.io wrote:
> As title, if I use relative import, `make html` will create a html that
> contains such code to link the reference. 
> 
> 
> 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 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.


[sphinx-users] How to make a link for absolute import in python?

2017-12-12 Thread wenhao . hu
As title, if I use relative import, `make html` will create a html that 
contains such code to link the reference. 


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 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.