Compare commits
No commits in common. "4fd5d38ca094548cf0728521a65c727bdae246b8" and "278fdd339a5e5822e7c525be05bd3319968b42b6" have entirely different histories.
4fd5d38ca0
...
278fdd339a
|
@ -26,27 +26,12 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
"""
|
||||
from .variable import CONVERT_OPTION
|
||||
import importlib.resources
|
||||
from os.path import dirname, join
|
||||
from ..utils import load_modules
|
||||
|
||||
|
||||
ANNOTATORS = None
|
||||
|
||||
|
||||
if not 'files' in dir(importlib.resources):
|
||||
# old python version
|
||||
class fake_files:
|
||||
def __init__(self, package):
|
||||
self.mod = []
|
||||
dir_package = dirname(importlib.resources._get_package(package).__file__)
|
||||
for mod in importlib.resources.contents(package):
|
||||
self.mod.append(join(dir_package, mod))
|
||||
|
||||
def iterdir(self):
|
||||
return self.mod
|
||||
importlib.resources.files = fake_files
|
||||
|
||||
|
||||
def get_level(module):
|
||||
return module.level
|
||||
|
||||
|
|
Loading…
Reference in New Issue