Python jedi.__version__() Examples
The following are 7
code examples of jedi.__version__().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
jedi
, or try the search function
.
Example #1
Source File: test_name_highlighter.py From thonny with MIT License | 6 votes |
def test_all(): if sys.version_info >= (3, 8): warnings.warn("Skipping name matcher tests in Python 3.8") return import jedi if ( jedi.__version__.startswith("0.13.") or jedi.__version__.startswith("0.14.") or jedi.__version__.startswith("0.15.") or jedi.__version__.startswith("0.16.") ): warnings.warn("Skipping name matcher tests for Jedi " + jedi.__version__) return for i, test in enumerate(TEST_GROUPS): print("Running test group %d: " % (i + 1)) _assert_returns_correct_indices(test[0], test[1], test[2])
Example #2
Source File: utils.py From Computable with MIT License | 5 votes |
def version_info(): """ Returns a namedtuple of Jedi's version, similar to Python's ``sys.version_info``. """ Version = namedtuple('Version', 'major, minor, micro, releaselevel, serial') from jedi import __version__ tupl = re.findall('[a-z]+|\d+', __version__) return Version(*[x if i == 3 else int(x) for i, x in enumerate(tupl)])
Example #3
Source File: utils.py From NukeToolSet with MIT License | 5 votes |
def version_info(): """ Returns a namedtuple of Jedi's version, similar to Python's ``sys.version_info``. """ Version = namedtuple('Version', 'major, minor, micro, releaselevel, serial') from jedi import __version__ tupl = re.findall('[a-z]+|\d+', __version__) return Version(*[x if i == 3 else int(x) for i, x in enumerate(tupl)])
Example #4
Source File: utils.py From python-tools with MIT License | 5 votes |
def version_info(): """ Returns a namedtuple of Jedi's version, similar to Python's ``sys.version_info``. """ Version = namedtuple('Version', 'major, minor, micro') from jedi import __version__ tupl = re.findall('[a-z]+|\d+', __version__) return Version(*[x if i == 3 else int(x) for i, x in enumerate(tupl)])
Example #5
Source File: python_magic.py From metakernel with BSD 3-Clause "New" or "Revised" License | 5 votes |
def get_completions(self, info): '''Get Python completions''' # https://github.com/davidhalter/jedi/blob/master/jedi/utils.py if jedi is None: return [] text = info['code'] position = (info['line_num'], info['column']) interpreter = Interpreter(text, [self.env]) if jedi.__version__ >= LooseVersion('0.12.0'): lines = split_lines(text) name = get_on_completion_name( interpreter._module_node, lines, position ) before = text[:len(text) - len(name)] elif jedi.__version__ >= LooseVersion('0.10.0'): lines = split_lines(text) name = get_on_completion_name( interpreter._get_module_node(), lines, position ) before = text[:len(text) - len(name)] else: path = UserContext(text, position).get_path_until_cursor() path, dot, like = completion_parts(path) before = text[:len(text) - len(like)] completions = interpreter.completions() completions = [before + c.name_with_symbols for c in completions] self.kernel.log.error(completions) return [c[info['start']:] for c in completions]
Example #6
Source File: utils.py From CNCGToolKit with MIT License | 5 votes |
def version_info(): """ Returns a namedtuple of Jedi's version, similar to Python's ``sys.version_info``. """ Version = namedtuple('Version', 'major, minor, micro, releaselevel, serial') from jedi import __version__ tupl = re.findall('[a-z]+|\d+', __version__) return Version(*[x if i == 3 else int(x) for i, x in enumerate(tupl)])
Example #7
Source File: utils.py From autocomplete-python with GNU General Public License v2.0 | 5 votes |
def version_info(): """ Returns a namedtuple of Jedi's version, similar to Python's ``sys.version_info``. """ Version = namedtuple('Version', 'major, minor, micro') from jedi import __version__ tupl = re.findall('[a-z]+|\d+', __version__) return Version(*[x if i == 3 else int(x) for i, x in enumerate(tupl)])