| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
It will always be warned because prepending is processed before
dedenting. This changes the order of processing options.
|
| |
|
| |
|
| |
|
| |
|
|\ |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
If the option :dedent: (without numeric argument) was given to
code-block then all newlines where striped from the resulting code.
Preserve newlines when stripping common whitespace at the beginning of
code blocks.
|
|/
|
|
|
|
|
|
|
|
|
| |
Due to how Python converts ints to bool the numeric argument ``0`` to
the :dedent: option of the code-block directive was handled like if no
argument was given to :dedent:.
Check properly for None in the options argument processing, so ``0`` is
treated as numeric argument to :dedent:.
Bug: #9636
|
| |
|
| |
|
|\ |
|
| | |
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| | |
.. note::
$ find sphinx tests LICENSE doc/conf.py -type f -exec sed -i '' -e 's/2007\-20../2007-2021/' {} \;
$ git co sphinx/locale/**/*.js sphinx/templates/epub3/mimetype
|
| | |
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Keep imports alphabetically sorted and their order homogeneous across
Python source files.
The isort project has more feature and is more active than the
flake8-import-order plugin.
Most issues caught were simply import ordering from the same module.
Where imports were purposefully placed out of order, tag with
isort:skip.
|
|\ \
| |/ |
|
| | |
|
|\ \
| |/ |
|
| | |
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now that `highlightlang` directive is deprecated [1], the
`linenothreshold` option is to be used via the `highlight` directive.
The `highlight` directive will walk-through literal blocks to apply a
`linenos` value if:
1) The literal block has not been explicitly configured with the
`linenos` option.
2) If there is enough content (when comparing literal block's line
count to `linenothreshold`) that `linenos` should be explicitly
enabled or disabled [2].
While the `hightlight` directive should be able to explicitly define if
a literal block needs to enable line numbers, the logic is always
ignored since the code block and literal include directives already
configures `linenos` when checking for line number-specific options on
the node [3][4]. This effectively prevents `linenothreshold` from being
used.
To allow `linenothreshold` to be used in literal blocks, this commit
disables the explicit configuration `linenos` on a literal block
instance when the `CodeBlock` and `LiteralInclude` directives are
processed.
[1]: b35198d8475fe89aaf9a5224a9832fb394e73cca
[2]: https://github.com/sphinx-doc/sphinx/blob/v1.8.1/sphinx/transforms/post_transforms/code.py#L95-L97
[3]: https://github.com/sphinx-doc/sphinx/blob/v1.8.1/sphinx/directives/code.py#L156-L157
[4]: https://github.com/sphinx-doc/sphinx/blob/v1.8.1/sphinx/directives/code.py#L442-L444
Signed-off-by: James Knight <james.d.knight@live.com>
|
| |
|
|\ |
|
| | |
|
| |
| |
| |
| |
| | |
Since python 3.3, EnvironmentError and IOError were merged into
OSError.
|
| | |
|
|\ \
| | |
| | | |
Remove unnecessary encoding cookie from Python source files
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In Python 3, the default encoding of source files is utf-8. The encoding
cookie is now unnecessary and redundant so remove it. For more details,
see the docs:
https://docs.python.org/3/howto/unicode.html#the-string-type
> The default encoding for Python source code is UTF-8, so you can
> simply include a Unicode character in a string literal ...
Includes a fix for the flake8 header checks to stop expecting an
encoding cookie.
|
|/ /
| |
| |
| |
| | |
The docutils reporter supports an exception as an argument. It is
converted to a string internally.
|
| | |
|
| |
| |
| |
| |
| |
| | |
The form is less verbose and more idiomatic for Python 3 only code.
https://docs.python.org/3/library/functions.html#super
|
| | |
|