mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 14:34:31 +08:00
At europython's hackathon we played with it and @scoder added a small script to cython/Cython/Compiler/JediTyper.py, which makes it possible to add Cython types to a Python script.
14 lines
378 B
Python
14 lines
378 B
Python
from jedi.parser import Parser
|
|
from jedi.parser import representation as pr
|
|
from jedi._compatibility import u
|
|
|
|
|
|
def test_import_is_nested():
|
|
imp = Parser(u('import ')).module.imports[0]
|
|
# should not raise an error, even if it's not a complete import
|
|
assert not imp.is_nested()
|
|
|
|
|
|
def test_module_scope_name_generator():
|
|
assert pr.Module().scope_names_generator()
|