[Python-modules-commits] [sphinx-paramlinks] 01/05: Import sphinx-paramlinks_0.3.4.orig.tar.gz
Piotr Ożarowski
piotr at moszumanska.debian.org
Tue Jun 20 18:00:33 UTC 2017
This is an automated email from the git hooks/post-receive script.
piotr pushed a commit to branch master
in repository sphinx-paramlinks.
commit 94eba9452ad9a623f65da180253e4dea91257eab
Author: Piotr Ożarowski <piotr at debian.org>
Date: Tue Jun 20 19:51:53 2017 +0200
Import sphinx-paramlinks_0.3.4.orig.tar.gz
---
PKG-INFO | 9 ++++++---
README.rst | 7 +++++--
sphinx_paramlinks.egg-info/PKG-INFO | 9 ++++++---
sphinx_paramlinks/__init__.py | 2 +-
sphinx_paramlinks/sphinx_paramlinks.py | 9 ++++++---
5 files changed, 24 insertions(+), 12 deletions(-)
diff --git a/PKG-INFO b/PKG-INFO
index ae30991..5b83909 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: sphinx-paramlinks
-Version: 0.3.2
+Version: 0.3.4
Summary: Allows param links in Sphinx function/method descriptions to be linkable
Home-page: http://bitbucket.org/zzzeek/sphinx-paramlinks
Author: Mike Bayer
@@ -51,8 +51,11 @@ Description: ==================
:paramref:`.EnvironmentContext.configure.transactional_ddl`
The directive makes use of the existing Python role to do the method/function
- lookup, using the ``:obj:`` role; then the parameter name is applied separately
- to produce the final reference link.
+ lookup, searching first the ``:meth:``, then the ``:class:``, and then the
+ ``:func:`` role; then the parameter name is applied separately to produce the
+ final reference link. (new in 0.3.4, search for ``:meth:`` / ``:func:`` /
+ ``:class:`` individually rather than using ``:obj:`` which catches lots of
+ things that don't have parameters)
* The paramlinks are also added to the master index as well as the list
of domain objects, which allows them to be searchable through the
diff --git a/README.rst b/README.rst
index b21a66f..4f9e954 100644
--- a/README.rst
+++ b/README.rst
@@ -43,8 +43,11 @@ Features
:paramref:`.EnvironmentContext.configure.transactional_ddl`
The directive makes use of the existing Python role to do the method/function
- lookup, using the ``:obj:`` role; then the parameter name is applied separately
- to produce the final reference link.
+ lookup, searching first the ``:meth:``, then the ``:class:``, and then the
+ ``:func:`` role; then the parameter name is applied separately to produce the
+ final reference link. (new in 0.3.4, search for ``:meth:`` / ``:func:`` /
+ ``:class:`` individually rather than using ``:obj:`` which catches lots of
+ things that don't have parameters)
* The paramlinks are also added to the master index as well as the list
of domain objects, which allows them to be searchable through the
diff --git a/sphinx_paramlinks.egg-info/PKG-INFO b/sphinx_paramlinks.egg-info/PKG-INFO
index ae30991..5b83909 100644
--- a/sphinx_paramlinks.egg-info/PKG-INFO
+++ b/sphinx_paramlinks.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: sphinx-paramlinks
-Version: 0.3.2
+Version: 0.3.4
Summary: Allows param links in Sphinx function/method descriptions to be linkable
Home-page: http://bitbucket.org/zzzeek/sphinx-paramlinks
Author: Mike Bayer
@@ -51,8 +51,11 @@ Description: ==================
:paramref:`.EnvironmentContext.configure.transactional_ddl`
The directive makes use of the existing Python role to do the method/function
- lookup, using the ``:obj:`` role; then the parameter name is applied separately
- to produce the final reference link.
+ lookup, searching first the ``:meth:``, then the ``:class:``, and then the
+ ``:func:`` role; then the parameter name is applied separately to produce the
+ final reference link. (new in 0.3.4, search for ``:meth:`` / ``:func:`` /
+ ``:class:`` individually rather than using ``:obj:`` which catches lots of
+ things that don't have parameters)
* The paramlinks are also added to the master index as well as the list
of domain objects, which allows them to be searchable through the
diff --git a/sphinx_paramlinks/__init__.py b/sphinx_paramlinks/__init__.py
index 4a57c0f..e9a003c 100644
--- a/sphinx_paramlinks/__init__.py
+++ b/sphinx_paramlinks/__init__.py
@@ -1,3 +1,3 @@
-__version__ = '0.3.2'
+__version__ = '0.3.4'
from .sphinx_paramlinks import setup # noqa
diff --git a/sphinx_paramlinks/sphinx_paramlinks.py b/sphinx_paramlinks/sphinx_paramlinks.py
index 1692dd1..2cfd530 100644
--- a/sphinx_paramlinks/sphinx_paramlinks.py
+++ b/sphinx_paramlinks/sphinx_paramlinks.py
@@ -178,9 +178,12 @@ def lookup_params(app, env, node, contnode):
# along with the classname/methodname/funcname minus the parameter
# part.
- newnode = domain.resolve_xref(
- env, refdoc, app.builder,
- "obj", resolve_target, node, contnode)
+ for search in ["meth", "class", "func"]:
+ newnode = domain.resolve_xref(
+ env, refdoc, app.builder,
+ search, resolve_target, node, contnode)
+ if newnode is not None:
+ break
if newnode is not None:
# assuming we found it, tack the paramname back onto to the final
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/sphinx-paramlinks.git
More information about the Python-modules-commits
mailing list