| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
This allows using Ruff's import sorting fixers
|
| |
|
| |
|
| |
|
| |
|
|
|
| |
Move the HTML 4 translator into a private module.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
.. 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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
In inheritance_diagram extension, while iterating over bases,
we verify if the base class is one of the Python built-in
class or not.
As of now, we simply check for its presence in all `builtins`
objects. Please note, `builtins` not only has built-in classes,
but also functions (like `open`) and other built-in objects.
To avoid any sort of future problem, it seems better to only
use classes (and of course exception classes).
|
| |
|
| |
|
|\ |
|
| |\ |
|
| | | |
|
| |/
| |
| | |
Previously they would be emitted with a white background
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The Python docs for __import__ recommend using importlib.get_module().
https://docs.python.org/3/library/functions.html#__import__
> Note: This is an advanced function that is not needed in everyday
> Python programming, unlike importlib.import_module().
As importlib.get_module() uses the Python module cache and returns the
module, this also allows simplifying many module cache checks of use of
sys.modules.
importlib.get_module() has been available since Python 3.3.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The documentation now correctly describes the behavior of the ``parts``
option in an inheritance-diagram directive: it gives the number of parts
that are *kept* not dropped. The option now also accepts negative
values, which drops parts from the left (which is the what the
documentation incorrectly claimed the option would do for positive
values)
As a form of testing of the new functionality, the documentation for the
inheritance_diagram extension now includes a section "Examples" that
demonstrate the different possibilities. This would fail to build
without the patch.
Closes #4872
|
| | |
|
|\ \
| |/ |
|
| |\ |
|
| | | |
|
| |\ \
| | | |
| | | | |
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.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
|/ / |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In the Python 3 only code base, this function is no longer necessary.
The type of values is well understood and deliberate. Code should avoid
arbitrary mixing of bytes & str.
By removing force_decode() calls from docstring values, can deprecate
the now unused 'encoding' arguments to various autodoc methods.
|
| | |
|
|\ \
| |/ |
|
| | |
|
| |
| |
| |
| |
| | |
Removal of the remaining imports may require passing "--python-version
3.5" to the mypy command.
|