Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

No definition found for `from pygments.formatters import TerminalFormatter` #64

tkf opened this Issue Nov 18, 2012 · 1 comment


None yet
2 participants

tkf commented Nov 18, 2012

In [2]:
source = """\
from pygments.formatters import TerminalFormatter
lines = source.splitlines()
script = jedi.Script(source, len(lines), len(lines[-1]), None)
definition = script.get_definition()
Out [2]:

It's the same for the other classes in this module.

The beginning of pygments/formatters/__init__.py is something like this:

from pygments.formatters._mapping import FORMATTERS

ns = globals()
for fcls in FORMATTERS:
    ns[fcls.__name__] = fcls
del fcls

__all__ = ['get_formatter_by_name', 'get_formatter_for_filename',
           'get_all_formatters'] + [cls.__name__ for cls in FORMATTERS]

Probably it's too evil for Jedi to handle?


davidhalter commented Nov 18, 2012

Too evil, sorry. In my opinion that's also bad coding style. But what can I say, if Georg Brandl does something ;-)

davidhalter added a commit that referenced this issue Nov 18, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment