From 6882c81e9071ec64a1b84512264bc79c6e8d44be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 1 Jan 2024 08:00:13 +0100 Subject: [PATCH] fixup logger warning call --- buildbot_nix/__init__.py | 4 ++-- pyproject.toml | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/buildbot_nix/__init__.py b/buildbot_nix/__init__.py index 391042c..016ca40 100644 --- a/buildbot_nix/__init__.py +++ b/buildbot_nix/__init__.py @@ -684,7 +684,7 @@ class AnyProjectEndpointMatcher(EndpointMatcherBase): builder = yield self.master.data.get(("builders", res["builderid"])) if builder["name"] in self.builders: - log.warning( + log.warn( "Builder {builder} allowed by {role}: {builders}", builder=builder["name"], role=self.role, @@ -692,7 +692,7 @@ class AnyProjectEndpointMatcher(EndpointMatcherBase): ) return Match(self.master, **{object_type: res}) else: - log.warning( + log.warn( "Builder {builder} not allowed by {role}: {builders}", builder=builder["name"], role=self.role, diff --git a/pyproject.toml b/pyproject.toml index b683a00..727cfef 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -79,6 +79,10 @@ ignore = [ "E501", # line too long "T201", # `print` found "PLR2004", # Magic value used in comparison + + # not compatible with twisted logger: https://docs.twisted.org/en/twisted-18.7.0/core/howto/logger.html + "PGH002", # `warn` is deprecated in favor of `warning` + "G010", # Logging statement uses `warn` instead of `warning` ] [tool.mypy]