-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dfaf340
commit 488b13b
Showing
5 changed files
with
29 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env python3 | ||
# -*- coding: utf-8 -*- | ||
|
||
"""Created on Mon Apr 08 2024 12:21:30 by codeskyblue | ||
""" | ||
|
||
import abc | ||
import dataclasses | ||
from typing import Optional | ||
from adbutils._proto import AppInfo | ||
|
||
|
||
class AbstracctDevice(abc.ABC): | ||
@abc.abstractmethod | ||
def app_info(self, package_name: str) -> Optional[AppInfo]: | ||
pass | ||
|
||
|
||
class DeprecatedExtension(AbstracctDevice): | ||
def package_info(self, package_name: str) -> Optional[dict]: | ||
"""deprecated method, use app_info instead.""" | ||
info = self.app_info(package_name) | ||
if info: | ||
return dataclasses.asdict(info) | ||
return None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters