Skip to content

Commit

Permalink
Allow code imports from starlark files
Browse files Browse the repository at this point in the history
Jedi uses the Python-builtin importlib library to discover source files from a module name.
Modifying importlib's allowed file extensions from jedi is easier than providing a patched builtin library.
  • Loading branch information
Peter Hagen committed Nov 3, 2019
1 parent 00b2205 commit 1094ff2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions jedi/inference/compiled/subprocess/__main__.py
Expand Up @@ -18,6 +18,9 @@ def _get_paths():
if sys.version_info > (3, 4):
from importlib.machinery import PathFinder

import importlib
importlib.machinery.SOURCE_SUFFIXES.append('.star')

class _ExactImporter(object):
def __init__(self, path_dct):
self._path_dct = path_dct
Expand Down

0 comments on commit 1094ff2

Please sign in to comment.