diff --git a/.gitignore b/.gitignore index 944aefe..9e796c5 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ parsing_profile *.pyc sphinxcontrib_doxylink.egg-info/ dist/ +build/ diff --git a/setup.py b/setup.py index 50e26c9..20ceef3 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ setup( name='sphinxcontrib-doxylink', - version='1.4', + version='1.5', url='http://sphinxcontrib-doxylink.readthedocs.io/en/stable/', download_url='http://pypi.python.org/pypi/sphinxcontrib-doxylink', license='BSD', diff --git a/sphinxcontrib/doxylink/doxylink.py b/sphinxcontrib/doxylink/doxylink.py index 540948b..6105c9d 100644 --- a/sphinxcontrib/doxylink/doxylink.py +++ b/sphinxcontrib/doxylink/doxylink.py @@ -231,7 +231,7 @@ def find_url2(mapping, symbol): # If there is only one by here we return it. if len(classes_list) is 1: - return classes_list.values()[0] + return list(classes_list.values())[0] #print("Still", len(classes_list), 'possible matches') @@ -242,14 +242,14 @@ def find_url2(mapping, symbol): no_templates_list = find_url_remove_templates(classes_list, symbol) if len(no_templates_list) == 1: - return return_from_mapping(no_templates_list.values()[0], normalised_arglist) + return return_from_mapping(list(no_templates_list.values())[0], normalised_arglist) #print("Still", len(no_templates_list), 'possible matches') # If not found by now, just return the first one in the list if no_templates_list: # TODO return a warning here? - return return_from_mapping(no_templates_list.values()[0], normalised_arglist) + return return_from_mapping(list(no_templates_list.values())[0], normalised_arglist) # Else return None if the list is empty else: LookupError('Could not find a match')