mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
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.
This commit is contained in:
@@ -99,7 +99,7 @@ def nonascii_srcdir(request, setup_command):
|
||||
.. toctree::
|
||||
|
||||
%(mb_name)s/%(mb_name)s
|
||||
""" % locals())).encode('utf-8'))
|
||||
""" % locals())).encode())
|
||||
|
||||
|
||||
@pytest.mark.usefixtures('nonascii_srcdir')
|
||||
|
Reference in New Issue
Block a user