diff options
author | Adam Turner <9087854+aa-turner@users.noreply.github.com> | 2023-01-31 18:30:43 +0000 |
---|---|---|
committer | Adam Turner <9087854+aa-turner@users.noreply.github.com> | 2023-01-31 18:30:43 +0000 |
commit | 4c4745af9cc788f94568bb3457f887b8c124f73f (patch) | |
tree | 3cfe20ed3672d3b08de0b1f4cb5d9abf7c19e214 /sphinx/ext/intersphinx.py | |
parent | 7395b05b1c03cd675b1d9a232a103934c2348225 (diff) | |
download | sphinx-git-4c4745af9cc788f94568bb3457f887b8c124f73f.tar.gz |
Fix various Ruff errors
Diffstat (limited to 'sphinx/ext/intersphinx.py')
-rw-r--r-- | sphinx/ext/intersphinx.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sphinx/ext/intersphinx.py b/sphinx/ext/intersphinx.py index 9e69d053c..6161b6a3e 100644 --- a/sphinx/ext/intersphinx.py +++ b/sphinx/ext/intersphinx.py @@ -25,8 +25,7 @@ import re import sys import time from os import path -from types import ModuleType -from typing import IO, Any, cast +from typing import IO, TYPE_CHECKING, Any, cast from urllib.parse import urlsplit, urlunsplit from docutils import nodes @@ -48,6 +47,9 @@ from sphinx.util.docutils import CustomReSTDispatcher, SphinxRole from sphinx.util.inventory import InventoryFile from sphinx.util.typing import Inventory, InventoryItem, RoleFunction +if TYPE_CHECKING: + from types import ModuleType + logger = logging.getLogger(__name__) |