ruff: Fix PLW0603 Using the global statement to update is discouraged.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
e18d35dbf3
commit
18805ac181
1 changed files with 1 additions and 3 deletions
|
@ -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"])
|
||||
|
|
Loading…
Add table
Reference in a new issue