Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Closed
tkf opened this Issue · 1 comment

2 participants

@tkf
Collaborator
In [2]:
source = """\
from pygments.formatters import TerminalFormatter
TerminalFormatter"""
lines = source.splitlines()
script = jedi.Script(source, len(lines), len(lines[-1]), None)
definition = script.get_definition()
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
Owner

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

@davidhalter davidhalter referenced this issue from a commit
@davidhalter again use cases #64 28665b2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.