Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 80850f5

Browse files
committed
Remove mostly unused utils_extra.py
1 parent 1b05a12 commit 80850f5

File tree

4 files changed

+10
-880
lines changed

4 files changed

+10
-880
lines changed

sphinx_automodapi/tests/test_automodapi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import pytest
77

88
from . import *
9-
from ..utils_extra import iteritems
9+
from ..utils import iteritems
1010

1111
pytest.importorskip('sphinx') # skips these tests if sphinx not present
1212

sphinx_automodapi/tests/test_automodsumm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import pytest
66

77
from . import *
8-
from ..utils_extra import iteritems
8+
from ..utils import iteritems
99

1010
pytest.importorskip('sphinx') # skips these tests if sphinx not present
1111

sphinx_automodapi/utils.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@
77
from sphinx.ext.autosummary.generate import find_autosummary_in_docstring
88

99

10+
if sys.version_info[0] >= 3:
11+
def iteritems(dictionary):
12+
return dictionary.items()
13+
else:
14+
def iteritems(dictionary):
15+
return dictionary.iteritems()
16+
17+
1018
def find_mod_objs(modname, onlylocals=False):
1119
""" Returns all the public attributes of a module referenced by name.
1220

0 commit comments

Comments
 (0)