properly use sphinx's logger

This commit is contained in:
Keewis 2020-05-29 19:57:20 +02:00
parent b846db7e53
commit ce60b555ee

View File

@ -13,15 +13,15 @@
import inspect
import re
from functools import partial
import logging
from typing import Any, Callable, Dict, List, Tuple, Union
from sphinx.application import Sphinx
from sphinx.config import Config as SphinxConfig
from sphinx.ext.napoleon.iterators import modify_iter
from sphinx.locale import _, __
from sphinx.util import logging
logger = logging.Logger(__name__)
logger = logging.getLogger(__name__)
if False:
# For type annotation
@ -792,7 +792,12 @@ def _recombine_set_tokens(tokens):
token = next(iterable)
except StopIteration:
if open_braces != 0:
logger.warning(__("invalid value set: %r"), "".join(tokens))
location = ("", "")
logger.warning(
__("invalid value set: %r"),
"".join(tokens),
location=location,
)
break