|
Let us walk on the 3-isogeny graph
|
Namespaces | |
| namespace | _mapping |
| namespace | python |
Data Structures | |
| class | _automodule |
Functions | |
| _fn_matches (fn, glob) | |
| _load_lexers (module_name) | |
| get_all_lexers (plugins=True) | |
| find_lexer_class (name) | |
| find_lexer_class_by_name (_alias) | |
| get_lexer_by_name (_alias, **options) | |
| load_lexer_from_file (filename, lexername="CustomLexer", **options) | |
| find_lexer_class_for_filename (_fn, code=None) | |
| get_lexer_for_filename (_fn, code=None, **options) | |
| get_lexer_for_mimetype (_mime, **options) | |
| _iter_lexerclasses (plugins=True) | |
| guess_lexer_for_filename (_fn, _text, **options) | |
| guess_lexer (_text, **options) | |
Variables | |
| dict | COMPAT |
| dict | _lexer_cache = {} |
| dict | _pattern_cache = {} |
| oldmod = sys.modules[__name__] | |
| newmod = _automodule(__name__) | |
| name | |
pygments.lexers
~~~~~~~~~~~~~~~
Pygments lexers.
:copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
|
protected |
Return whether the supplied file name fn matches pattern filename.
Definition at line 34 of file __init__.py.
References i.
Referenced by pip._vendor.pygments.lexers.find_lexer_class_for_filename(), and pip._vendor.pygments.lexers.guess_lexer_for_filename().

|
protected |
Return an iterator over all lexer classes.
Definition at line 250 of file __init__.py.
References pip._vendor.pygments.lexers._load_lexers().
Referenced by pip._vendor.pygments.lexers.guess_lexer(), and pip._vendor.pygments.lexers.guess_lexer_for_filename().


|
protected |
Load a lexer (and all others in the module too).
Definition at line 42 of file __init__.py.
References i.
Referenced by _automodule.__getattr__(), pip._vendor.pygments.lexers._iter_lexerclasses(), pip._vendor.pygments.lexers.find_lexer_class(), pip._vendor.pygments.lexers.find_lexer_class_by_name(), pip._vendor.pygments.lexers.find_lexer_class_for_filename(), pip._vendor.pygments.lexers.get_lexer_by_name(), and pip._vendor.pygments.lexers.get_lexer_for_mimetype().

| find_lexer_class | ( | name | ) |
Return the `Lexer` subclass that with the *name* attribute as given by the *name* argument.
Definition at line 64 of file __init__.py.
References pip._vendor.pygments.lexers._load_lexers(), and i.

| find_lexer_class_by_name | ( | _alias | ) |
Return the `Lexer` subclass that has `alias` in its aliases list, without instantiating it. Like `get_lexer_by_name`, but does not instantiate the class. Will raise :exc:`pygments.util.ClassNotFound` if no lexer with that alias is found. .. versionadded:: 2.2
Definition at line 82 of file __init__.py.
References pip._vendor.pygments.lexers._load_lexers(), and i.

| find_lexer_class_for_filename | ( | _fn, | |
code = None |
|||
| ) |
Get a lexer for a filename. If multiple lexers match the filename pattern, use ``analyse_text()`` to figure out which one is more appropriate. Returns None if not found.
Definition at line 169 of file __init__.py.
References pip._vendor.pygments.lexers._fn_matches(), pip._vendor.pygments.lexers._load_lexers(), and i.

| get_all_lexers | ( | plugins = True | ) |
Return a generator of tuples in the form ``(name, aliases, filenames, mimetypes)`` of all know lexers. If *plugins* is true (the default), plugin lexers supplied by entrypoints are also returned. Otherwise, only builtin ones are considered.
Definition at line 50 of file __init__.py.
References i.
| get_lexer_by_name | ( | _alias, | |
| ** | options | ||
| ) |
Return an instance of a `Lexer` subclass that has `alias` in its aliases list. The lexer is given the `options` at its instantiation. Will raise :exc:`pygments.util.ClassNotFound` if no lexer with that alias is found.
Definition at line 109 of file __init__.py.
References pip._vendor.pygments.lexers._load_lexers(), and i.

| get_lexer_for_filename | ( | _fn, | |
code = None, |
|||
| ** | options | ||
| ) |
Get a lexer for a filename. Return a `Lexer` subclass instance that has a filename pattern matching `fn`. The lexer is given the `options` at its instantiation. Raise :exc:`pygments.util.ClassNotFound` if no lexer for that filename is found. If multiple lexers match the filename pattern, use their ``analyse_text()`` methods to figure out which one is more appropriate.
Definition at line 212 of file __init__.py.
References i.
| get_lexer_for_mimetype | ( | _mime, | |
| ** | options | ||
| ) |
Return a `Lexer` subclass instance that has `mime` in its mimetype list. The lexer is given the `options` at its instantiation. Will raise :exc:`pygments.util.ClassNotFound` if not lexer for that mimetype is found.
Definition at line 231 of file __init__.py.
References pip._vendor.pygments.lexers._load_lexers(), and i.

| guess_lexer | ( | _text, | |
| ** | options | ||
| ) |
Return a `Lexer` subclass instance that's guessed from the text in `text`. For that, the :meth:`.analyse_text()` method of every known lexer class is called with the text as argument, and the lexer which returned the highest value will be instantiated and returned. :exc:`pygments.util.ClassNotFound` is raised if no lexer thinks it can handle the content.
Definition at line 304 of file __init__.py.
References pip._vendor.pygments.lexers._iter_lexerclasses(), and i.

| guess_lexer_for_filename | ( | _fn, | |
| _text, | |||
| ** | options | ||
| ) |
As :func:`guess_lexer()`, but only lexers which have a pattern in `filenames` or `alias_filenames` that matches `filename` are taken into consideration. :exc:`pygments.util.ClassNotFound` is raised if no lexer thinks it can handle the content.
Definition at line 261 of file __init__.py.
References pip._vendor.pygments.lexers._fn_matches(), pip._vendor.pygments.lexers._iter_lexerclasses(), and i.

| load_lexer_from_file | ( | filename, | |
lexername = "CustomLexer", |
|||
| ** | options | ||
| ) |
Load a lexer from a file. This method expects a file located relative to the current working directory, which contains a Lexer class. By default, it expects the Lexer to be name CustomLexer; you can specify your own class name as the second argument to this function. Users should be very careful with the input, because this method is equivalent to running eval on the input file. Raises ClassNotFound if there are any problems importing the Lexer. .. versionadded:: 2.2
Definition at line 134 of file __init__.py.
References i.
|
protected |
Definition at line 30 of file __init__.py.
|
protected |
Definition at line 31 of file __init__.py.
| dict COMPAT |
Definition at line 22 of file __init__.py.
| name |
Definition at line 78 of file __init__.py.
| newmod = _automodule(__name__) |
Definition at line 359 of file __init__.py.
| oldmod = sys.modules[__name__] |
Definition at line 358 of file __init__.py.