From 18805ac1810d9c8f2789589737976d041c19706c Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Mon, 30 Oct 2023 10:51:19 -0700 Subject: [PATCH] ruff: Fix PLW0603 Using the global statement to update is discouraged. Signed-off-by: Anders Kaseorg --- zulip/integrations/google/google-calendar | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/zulip/integrations/google/google-calendar b/zulip/integrations/google/google-calendar index 278b13db..e36e9fa4 100755 --- a/zulip/integrations/google/google-calendar +++ b/zulip/integrations/google/google-calendar @@ -111,8 +111,6 @@ def get_credentials() -> client.Credentials: def populate_events() -> Optional[None]: - global events - credentials = get_credentials() creds = credentials.authorize(httplib2.Http()) service = discovery.build("calendar", "v3", http=creds) @@ -130,7 +128,7 @@ def populate_events() -> Optional[None]: .execute() ) - events = [] + events.clear() for event in feed["items"]: try: start = dateutil.parser.parse(event["start"]["dateTime"])