mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-15 10:07:06 +08:00
fix some python 3 compatibility things (which involves some real bugs, but py2 was passing)
This commit is contained in:
@@ -173,11 +173,11 @@ class BaseDefinition(object):
|
||||
The module name.
|
||||
|
||||
>>> from jedi import Script
|
||||
>>> source = 'import datetime'
|
||||
>>> script = Script(source, 1, len(source), 'example.py')
|
||||
>>> source = 'import json'
|
||||
>>> script = Script(source, path='example.py')
|
||||
>>> d = script.goto_definitions()[0]
|
||||
>>> print(d.module_name) # doctest: +ELLIPSIS
|
||||
datetime
|
||||
json
|
||||
"""
|
||||
return str(self._module.name)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user