Skip to content

Semshi produces errors with __future__ annotations #116

@dkuhlman

Description

@dkuhlman

Semshi is a great piece of code. It's very useful and helpful.

But, apparently, Semshi has issues with files containing the following
line:

from __future__ import annotations

When I edit a file containing the above line, I get the following
error message:

Error detected while processing function <SNR>41_filetype_changed[4]..remote#define#CommandBootstrap[5]..remote#define#request:
line    2:
Error invoking '/home/dkuhlman/.vim/pack/addons/start/semshi/rplugin/python3/semshi:command:Semshi' on channel 3 (python3-rplugin-host):
error caught in request handler '/home/dkuhlman/.vim/pack/addons/start/semshi/rplugin/python3/semshi:command:Semshi [['enable']]':
Traceback (most recent call last):
  File "/home/dkuhlman/.vim/pack/addons/start/semshi/rplugin/python3/semshi/node.py", line 55, in __init__
    self.symbol = self.env[-1].lookup(self.symname)
  File "/usr/lib/python3.10/symtable.py", line 125, in lookup
    flags = self._table.symbols[name]
KeyError: 'str'

During handling of the above exception, another exception occurred:

[etc]

If I comment out the __future__ line, the error messages go away.
Alternatively, if I uninstall Semshi, Neovim runs without errors.

I'm running Semshi with the following:

Python 3.10.1
Neovim compiled from Github source.
Arch Linux 5.15.7-arch1-1

Dave

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions