Skip to content

Commit 1ccb5db

Browse files
committed
ruff: Fix G010 Logging statement uses warn instead of warning.
Signed-off-by: Anders Kaseorg <[email protected]>
1 parent 88ab78e commit 1ccb5db

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

zulip/integrations/codebase/zulip_codebase_mirror

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def make_api_call(path: str) -> Optional[List[Dict[str, Any]]]:
7575
logging.error("Bad authorization from Codebase. Please check your credentials")
7676
sys.exit(-1)
7777
else:
78-
logging.warn(
78+
logging.warning(
7979
f"Found non-success response status code: {response.status_code} {response.text}"
8080
)
8181
return None
@@ -246,11 +246,11 @@ def handle_event(event: Dict[str, Any]) -> None:
246246
# but experimental testing showed that they were all sent as 'push' events
247247
pass
248248
elif event_type == "wiki_page":
249-
logging.warn("Wiki page notifications not yet implemented")
249+
logging.warning("Wiki page notifications not yet implemented")
250250
elif event_type == "sprint_creation":
251-
logging.warn("Sprint notifications not yet implemented")
251+
logging.warning("Sprint notifications not yet implemented")
252252
elif event_type == "sprint_ended":
253-
logging.warn("Sprint notifications not yet implemented")
253+
logging.warning("Sprint notifications not yet implemented")
254254
else:
255255
logging.info(f"Unknown event type {event_type}, ignoring!")
256256

@@ -264,7 +264,7 @@ def handle_event(event: Dict[str, Any]) -> None:
264264
if res["result"] == "success":
265265
logging.info("Successfully sent Zulip with id: {}".format(res["id"]))
266266
else:
267-
logging.warn("Failed to send Zulip: {} {}".format(res["result"], res["msg"]))
267+
logging.warning("Failed to send Zulip: {} {}".format(res["result"], res["msg"]))
268268

269269

270270
# the main run loop for this mirror script
@@ -282,7 +282,7 @@ def run_mirror() -> None:
282282
else:
283283
since = datetime.fromtimestamp(float(timestamp), tz=pytz.utc)
284284
except (ValueError, OSError) as e:
285-
logging.warn(f"Could not open resume file: {e}")
285+
logging.warning(f"Could not open resume file: {e}")
286286
since = default_since()
287287

288288
try:

0 commit comments

Comments
 (0)