Skip to content

Commit

Permalink
Enable future annotations.
Browse files Browse the repository at this point in the history
  • Loading branch information
freakboy3742 committed May 26, 2023
1 parent 67014dd commit ee077d1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions core/src/toga/widgets/webview.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import asyncio

from toga.handlers import AsyncResult, wrapped_handler
Expand All @@ -14,8 +16,8 @@ def __init__(
self,
id=None,
style=None,
url: str = None,
user_agent: str = None,
url: str | None = None,
user_agent: str | None = None,
on_webview_load=None,
):
"""Create a new WebView widget.
Expand Down Expand Up @@ -50,7 +52,7 @@ def _set_url(self, url, future):
self._impl.set_url(url, future=future)

@property
def url(self) -> str:
def url(self) -> str | None:
"""The current URL.
WebView can only display ``http://`` and ``https://`` URLs.
Expand Down

0 comments on commit ee077d1

Please sign in to comment.