(source=None)
| 302 | |
| 303 | @catch_and_print_exceptions |
| 304 | def get_script(source=None): |
| 305 | jedi.settings.additional_dynamic_modules = [ |
| 306 | b.name for b in vim.buffers if ( |
| 307 | b.name is not None and |
| 308 | b.name.endswith('.py') and |
| 309 | b.options['buflisted'])] |
| 310 | if source is None: |
| 311 | source = '\n'.join(vim.current.buffer) |
| 312 | buf_path = vim.current.buffer.name |
| 313 | if not buf_path: |
| 314 | # If a buffer has no name its name is an empty string. |
| 315 | buf_path = None |
| 316 | |
| 317 | return jedi.Script(source, path=buf_path, project=get_project()) |
| 318 | |
| 319 | |
| 320 | def get_pos(column=None): |
no test coverage detected