Skip to content

Commit

Permalink
Fix android_sdk.py for Python 3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
FeodorFitsner committed Jan 26, 2025
1 parent e75f11e commit e8fedd6
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

from flet_cli.utils import processes
from flet_cli.utils.distros import download_with_progress, extract_with_progress
from rich.console import Console
from rich.progress import Progress

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

@staticmethod
def android_home_dir() -> Path | None:
def android_home_dir() -> Optional[Path]:
# check ANDROID_HOME environment variable
home_dir = os.getenv("ANDROID_HOME")
if home_dir and Path(home_dir).exists():
Expand All @@ -66,7 +65,7 @@ def android_home_dir() -> Path | None:

return None

def cmdline_tools_bin(self, home_dir: Path) -> Path | None:
def cmdline_tools_bin(self, home_dir: Path) -> Optional[Path]:
for d in [
home_dir / "cmdline-tools" / "latest" / "bin",
home_dir / "cmdline-tools" / ANDROID_CMDLINE_TOOLS_VERSION / "bin",
Expand Down

0 comments on commit e8fedd6

Please sign in to comment.