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]:
|
def populate_events() -> Optional[None]:
|
||||||
global events
|
|
||||||
|
|
||||||
credentials = get_credentials()
|
credentials = get_credentials()
|
||||||
creds = credentials.authorize(httplib2.Http())
|
creds = credentials.authorize(httplib2.Http())
|
||||||
service = discovery.build("calendar", "v3", http=creds)
|
service = discovery.build("calendar", "v3", http=creds)
|
||||||
|
@ -130,7 +128,7 @@ def populate_events() -> Optional[None]:
|
||||||
.execute()
|
.execute()
|
||||||
)
|
)
|
||||||
|
|
||||||
events = []
|
events.clear()
|
||||||
for event in feed["items"]:
|
for event in feed["items"]:
|
||||||
try:
|
try:
|
||||||
start = dateutil.parser.parse(event["start"]["dateTime"])
|
start = dateutil.parser.parse(event["start"]["dateTime"])
|
||||||
|
|
Loading…
Add table
Reference in a new issue