fixup logger warning call
This commit is contained in:
parent
4bb5e60cf2
commit
6882c81e90
|
@ -684,7 +684,7 @@ class AnyProjectEndpointMatcher(EndpointMatcherBase):
|
||||||
|
|
||||||
builder = yield self.master.data.get(("builders", res["builderid"]))
|
builder = yield self.master.data.get(("builders", res["builderid"]))
|
||||||
if builder["name"] in self.builders:
|
if builder["name"] in self.builders:
|
||||||
log.warning(
|
log.warn(
|
||||||
"Builder {builder} allowed by {role}: {builders}",
|
"Builder {builder} allowed by {role}: {builders}",
|
||||||
builder=builder["name"],
|
builder=builder["name"],
|
||||||
role=self.role,
|
role=self.role,
|
||||||
|
@ -692,7 +692,7 @@ class AnyProjectEndpointMatcher(EndpointMatcherBase):
|
||||||
)
|
)
|
||||||
return Match(self.master, **{object_type: res})
|
return Match(self.master, **{object_type: res})
|
||||||
else:
|
else:
|
||||||
log.warning(
|
log.warn(
|
||||||
"Builder {builder} not allowed by {role}: {builders}",
|
"Builder {builder} not allowed by {role}: {builders}",
|
||||||
builder=builder["name"],
|
builder=builder["name"],
|
||||||
role=self.role,
|
role=self.role,
|
||||||
|
|
|
@ -79,6 +79,10 @@ ignore = [
|
||||||
"E501", # line too long
|
"E501", # line too long
|
||||||
"T201", # `print` found
|
"T201", # `print` found
|
||||||
"PLR2004", # Magic value used in comparison
|
"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]
|
[tool.mypy]
|
||||||
|
|
Loading…
Reference in a new issue