Skip to content

Commit 09dd4ad

Browse files
committed
-
1 parent e1baf1a commit 09dd4ad

File tree

3 files changed

+3
-42
lines changed

3 files changed

+3
-42
lines changed

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@
4545
# built documents.
4646
#
4747
# The short X.Y version.
48-
version = '1.0.6'
48+
version = '1.0.7'
4949
# The full version, including alpha/beta/rc tags.
50-
release = '1.0.6'
50+
release = '1.0.7'
5151

5252
# The language for content autogenerated by Sphinx. Refer to documentation
5353
# for a list of supported languages.

python_toolbox/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import python_toolbox.monkeypatch_copyreg
1616
import python_toolbox.monkeypatch_envelopes
1717

18-
__version__ = '1.0.6'
18+
__version__ = '1.0.7'
1919
__version_info__ = python_toolbox.version_info.VersionInfo(
2020
*(map(int, __version__.split('.')))
2121
)

python_toolbox/import_tools.py

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -11,49 +11,10 @@
1111
import pathlib
1212

1313

14-
from python_toolbox import package_finder
1514
from python_toolbox import caching
1615

1716

1817

19-
def import_all(package, exclude='__init__', silent_fail=False):
20-
'''
21-
Import all the modules and packages that live inside the given package.
22-
23-
This is not recursive. Modules and packages defined inside a subpackage
24-
will not be imported (of course, that subpackage itself may import them
25-
anyway.)
26-
27-
You may specify a module/package to exclude, which is by default
28-
`__init__`.
29-
30-
Returns a list with all the imported modules and packages.
31-
32-
todo: only tested with __init__ passed in
33-
'''
34-
35-
paths = package_finder.get_packages_and_modules_filenames(package)
36-
37-
names = {}
38-
for path in paths:
39-
name = path.stem
40-
if name == exclude:
41-
continue
42-
full_name = package.__name__ + '.' + name
43-
names[path] = full_name
44-
45-
d = {}
46-
47-
for (path, name) in names.items():
48-
try:
49-
d[name] = normal_import(name)
50-
except Exception:
51-
if not silent_fail:
52-
raise
53-
54-
return d
55-
56-
5718
def normal_import(module_name):
5819
'''
5920
Import a module.

0 commit comments

Comments
 (0)