mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
refactor with pyupgrade
Run `pyupgrade --py3-only --keep-percent-format` to refine our code. Note: --keep-percent-format is required to keep translations available.
This commit is contained in:
@@ -46,7 +46,7 @@ def reference_check(app, *args, **kwds):
|
||||
@mock.patch('sphinx.ext.intersphinx._read_from_url')
|
||||
def test_fetch_inventory_redirection(_read_from_url, InventoryFile, app, status, warning):
|
||||
intersphinx_setup(app)
|
||||
_read_from_url().readline.return_value = '# Sphinx inventory version 2'.encode()
|
||||
_read_from_url().readline.return_value = b'# Sphinx inventory version 2'
|
||||
|
||||
# same uri and inv, not redirected
|
||||
_read_from_url().url = 'http://hostname/' + INVENTORY_FILENAME
|
||||
|
||||
Reference in New Issue
Block a user