| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |\
| |
| | |
Fix #6028: graphviz: Ensure the graphviz filenames are reproducible
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
Since python3.5, subprocess.run() has been introduced. It works a
wrapper of Popen, and it looks much simple and better. This uses it
instead of Popen to make our code simple.
|
| |\ \
| |/ |
|
| | | |
|
| | |
| |
| |
| |
| | |
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.
|
| |/ /
| |
| |
| |
| |
| | |
When an object is passed to a string format placeholder '%s', Python
will implicitly call str() on the object. This applies to print() and
logging as well.
|
| |\ \
| | |
| | | |
Avoid respecifying default encoding for .encode()/.decode() calls
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In Python 3, both .encode() and .decode() default the encoding to
'utf-8'. See the docs:
https://docs.python.org/3/library/stdtypes.html#str.encode
https://docs.python.org/3/library/stdtypes.html#bytes.decode
Simplify and shorten the code by using the default instead of
respecifying it.
|
| |/ /
| |
| |
| |
| |
| |
| |
| | |
The error is more specific and self documenting.
This removes the last use of sphinx.util.osutil.ENOENT, so it is now
deprecated for removal. sphinx.util.osutil.EEXIST was already unused so
that is deprecated as well.
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
The open() function opens files in read-only text mode by default. Drop
the mode argument to be slightly simpler and more idiomatic.
https://docs.python.org/3/library/functions.html#open
> The default mode is 'r' (open for reading text, synonym of 'rt').
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| |\ \
| |/ |
|
| | | |
|
| |\ \
| |/ |
|
| | | |
|
| |\ \ |
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In Python3, the functions io.open() is an alias of the builtin open()
and codecs.open() is functionally equivalent. To reduce indirection,
number of imports, and number of patterns, always prefer the builtin.
https://docs.python.org/3/library/io.html#high-level-module-interface
> io.open()
>
> This is an alias for the builtin open() function.
|
| |/
|
|
|
| |
In Python 3, all classes are new-style classes. The object in the
definition is redundant and unnecessary.
|
| | |
|
| |\ |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
addresses #4033
Co-authored-by: Jiri Kuncar <jiri.kuncar@gmail.com>
|
| |/ |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For consistency, the `<object>` tag for the SVG output of a
inheritance-diagram should have the same `class="inheritance"` attribute
that the corresponding `<img>` tag for the PNG format has. This allows
to define the CSS attribute
object.inheritance {
max-width: 100%;
}
which for SVG (unlike PNG) actually works and makes sense.
Added a test for inheritance-diagrams in SVG.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The graphviz extension is modified to wrap the `<img>` and `<object>`
tags it creates for diagrams in the png and svg formats in an additional
`<div class="graphviz">...</div>` tag. This allows to apply additional
CSS styling to the the diagrams that cannot be applied to `<img>` and
`<object>` directly. Most notably,
div.graphviz {
overflow: auto;
}
would be a useful style that the standard themes might consider.
In any case, it would allow users to add custom CSS code to their
project that gets around the problems with inheritance-diagrams
discussed in https://github.com/sphinx-doc/sphinx/issues/4865
The tests for the `grahviz` and `inheritance_diagram` have been modified
to test for the presence of the additional `<div>` tag.
Closes #4865
|
| |\ |
|
| | |
| |
| |
| | |
This reverts commit a073e17537c2aacaac305feadea58d4473ec97f4.
|
| |\ \ |
|
| | |/ |
|
| |/
|
|
|
| |
On py2, an exception having i18nized message causes UnicodeError on
stringify. This uses ``six.text_type()`` to stringify them instead.
|