Enable logging related ruff checks

... to extend the enforced format rules related to logging.

Change-Id: Id6813930d045871c0482ab625776408dcf0bd1e1
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
Takashi Kajinami
2025-12-11 17:13:46 +09:00
parent 9170fe9e7a
commit e8489adf3a
3 changed files with 3 additions and 5 deletions

View File

@@ -65,7 +65,7 @@ disallow_any_generics = false
line-length = 79
[tool.ruff.lint]
select = ["C4", "E4", "E5", "E7", "E9", "F", "S", "U"]
select = ["C4", "E4", "E5", "E7", "E9", "F", "G", "LOG", "S", "U"]
ignore = [
# we only use asserts for type narrowing
"S101",

View File

@@ -91,7 +91,7 @@ class ListPluginsDirective(rst.Directive):
def run(self) -> Sequence[nodes.Node]:
namespace = ' '.join(self.content).strip()
LOG.info(f'documenting plugins from {namespace!r}')
LOG.info('documenting plugins from %r', namespace)
overline_style = self.options.get('overline-style', '')
underline_style = self.options.get('underline-style', '=')
@@ -100,7 +100,7 @@ class ListPluginsDirective(rst.Directive):
ep: importlib.metadata.EntryPoint,
err: BaseException,
) -> None:
LOG.warning(f'Failed to load {ep.module}: {err}')
LOG.warning('Failed to load %s: %s', ep.module, err)
mgr: extension.ExtensionManager[Any]
mgr = extension.ExtensionManager(

View File

@@ -59,8 +59,6 @@ commands = bindep test
usedevelop = False
[flake8]
# H904: Delay string interpolations at logging calls
enable-extensions = H904
ignore = E251,H405,W504
show-source = True
exclude = .venv,.tox,dist,doc,releasenotes,*egg,build