Skip to content

Commit e8fedd6

Browse files
committed
Fix android_sdk.py for Python 3.9
1 parent e75f11e commit e8fedd6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

sdk/python/packages/flet-cli/src/flet_cli/utils/android_sdk.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
from flet_cli.utils import processes
88
from flet_cli.utils.distros import download_with_progress, extract_with_progress
9-
from rich.console import Console
109
from rich.progress import Progress
1110

1211
ANDROID_CMDLINE_TOOLS_DOWNLOAD_VERSION = "11076708"
@@ -45,7 +44,7 @@ def default_android_home_dir() -> Path:
4544
return Path.home() / "Android" / "sdk"
4645

4746
@staticmethod
48-
def android_home_dir() -> Path | None:
47+
def android_home_dir() -> Optional[Path]:
4948
# check ANDROID_HOME environment variable
5049
home_dir = os.getenv("ANDROID_HOME")
5150
if home_dir and Path(home_dir).exists():
@@ -66,7 +65,7 @@ def android_home_dir() -> Path | None:
6665

6766
return None
6867

69-
def cmdline_tools_bin(self, home_dir: Path) -> Path | None:
68+
def cmdline_tools_bin(self, home_dir: Path) -> Optional[Path]:
7069
for d in [
7170
home_dir / "cmdline-tools" / "latest" / "bin",
7271
home_dir / "cmdline-tools" / ANDROID_CMDLINE_TOOLS_VERSION / "bin",

0 commit comments

Comments
 (0)