Skip to content

Commit f99dca7

Browse files
committed
Possibly fixing vim/python import machinery error
This is a possible fix for python-mode#972. And it was based on pypa/setuptools#1563 (comment)
1 parent b36724a commit f99dca7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pymode/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44

55
import sys
66
import vim # noqa
7-
7+
try:
8+
from importlib.machinery import PathFinder as _PathFinder
9+
vim.find_module = _PathFinder.find_module
10+
except ImportError:
11+
pass
812

913
def auto():
1014
"""Fix PEP8 erorrs in current buffer.

0 commit comments

Comments
 (0)