| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
* cmdline: port to argparse
* cmdline: adapt the argparse help formatter to actually take terminal width into account
* Update based on review feedback.
* Extract "is_only_option" method
* Check -L argument to be a "known good" argument
Co-authored-by: Matthäus G. Chajdas <dev@anteru.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
pyupgrade is a tool to automatically upgrade syntax for newer versions
of the Python language.
The project has been Python 3 only since
35544e2fc6eed0ce4a27ec7285aac71ff0ddc473, allowing for several cleanups:
- Remove unnecessary "-*- coding: utf-8 -*-" cookie. Python 3 reads all
source files as utf-8 by default.
- Replace IOError/EnvironmentError with OSError. Python 3 unified these
exceptions. The old names are aliases only.
- Use the Python 3 shorter super() syntax.
- Remove "utf8" argument form encode/decode. In Python 3, this value is
the default.
- Remove "r" from open() calls. In Python 3, this value is the default.
- Remove u prefix from Unicode strings. In Python 3, all strings are
Unicode.
- Replace io.open() with builtin open(). In Python 3, these functions
are functionally equivalent.
Co-authored-by: Matthäus G. Chajdas <Anteru@users.noreply.github.com>
|
| |
|
| |
|
|
|
|
|
|
|
| |
PyPy3 on Windows has a test failure in `test_cmdline:test_outfile()`
when trying to unlink the temporary output file. The root cause is that
`cmdline:inner_main()` does not explicitly close the file that it opens,
and PyPy3 isn't auto-closing the file when `inner_main()` returns.
This prevents the file from being unlinked, and the test case fails.
|
| |
|
|
|
|
|
|
|
| |
This fixes three test failures on Windows:
* Two due to incorrect handling of : (on Windows, multiple : can
be part of a path.)
* One due to newline differences
|
|
|
|
|
|
|
|
|
|
|
| |
* Remove Python 2 compatibility
* remove 2/3 shims in pygments.util
* update setup.py metadata
* Remove unneeded object inheritance.
* Remove unneeded future imports.
|
| |
|
| |
|
|\
| |
| |
| | |
When no output file is specified, use the "terminal256" formatter by default if TERM contains "256".
|
| | |
|
| |\
| | |
| | |
| | | |
Custom Lexer/Formatter File Loading
|
| | | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This introduces support for some missing features to the Handlebars lexer:
Partials and path segments. Partials mostly appeared to work before, but the
`>` in `{{> ... }}` would appear as a syntax error, as could other
components of the partial. This change introduces support for:
* Standard partials: `{{> partialName}}`
* Partials with parameters: `{{> partialName varname="value"}}`
* Ddynamic partials: `{{> (partialFunc)}}`
* Ddynamic partials with lookups: `{{> (lookup ../path "partialName")}}`
* Partial blocks: `{{> @partial-block}}`
* Inline partials: `{{#*inline}}..{{/inline}}`
It also introduces support for path segments, which can reference content in
the current context or in a parent context. For instance, `this.name`,
`this/name`, `./name`, `../name`, `this/name`, etc. These are all now tracked
as variables.
|
| |
| |
| |
| |
| |
| |
| | |
Add optional function parameter for the class name to instantiate, and update cli to support this.
Move error handling to within the loading functions; they now only raise ClassNotFound.
Modify doc with these updates and the version number.
Test case clean up and additions.
|
| |
| |
| |
| |
| |
| |
| |
| | |
untrusted files
Finish custom-formatter loading and fill in some docstrings
Add load_?_from_file functions to API documentation
pep8 compliance
|
| | |
|
| | |
|
|/
|
|
| |
if TERM contains "256".
|
|
|