Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e004df82b0 | ||
|
|
8020bede3a |
@@ -158,6 +158,6 @@ The project uses GitHub Actions for multi-platform builds (`.github/workflows/re
|
||||
## Notes
|
||||
|
||||
- **ADB Binaries**: Stored in `src/platform-tools/` - do not modify or delete unless explictly instructed to
|
||||
- **Python Version**: Requires Python 3.13 (< 3.14)
|
||||
- **Python Version**: Requires Python 3.13 or 3.14 (>=3.13, <3.15)
|
||||
- **Package Mode**: Poetry is configured with `package-mode = false`
|
||||
- **License**: First-run license agreement required on Windows
|
||||
|
||||
Generated
+22
-21
@@ -1,4 +1,4 @@
|
||||
# This file is automatically @generated by Poetry 2.3.2 and should not be changed by hand.
|
||||
# This file is automatically @generated by Poetry 2.4.1 and should not be changed by hand.
|
||||
|
||||
[[package]]
|
||||
name = "altgraph"
|
||||
@@ -431,18 +431,18 @@ license = ["ukkonen"]
|
||||
|
||||
[[package]]
|
||||
name = "idna"
|
||||
version = "3.11"
|
||||
version = "3.18"
|
||||
description = "Internationalized Domain Names in Applications (IDNA)"
|
||||
optional = false
|
||||
python-versions = ">=3.8"
|
||||
python-versions = ">=3.9"
|
||||
groups = ["main"]
|
||||
files = [
|
||||
{file = "idna-3.11-py3-none-any.whl", hash = "sha256:771a87f49d9defaf64091e6e6fe9c18d4833f140bd19464795bc32d966ca37ea"},
|
||||
{file = "idna-3.11.tar.gz", hash = "sha256:795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902"},
|
||||
{file = "idna-3.18-py3-none-any.whl", hash = "sha256:7f952cbe720b688055e3f87de14f5c3e5fdaa8bc3928985c4077ca689de849a2"},
|
||||
{file = "idna-3.18.tar.gz", hash = "sha256:ffb385a7e039654cef1ab9ef32c6fafe283c0c0467bba1d9029738ce4a14a848"},
|
||||
]
|
||||
|
||||
[package.extras]
|
||||
all = ["flake8 (>=7.1.1)", "mypy (>=1.11.2)", "pytest (>=8.3.2)", "ruff (>=0.6.2)"]
|
||||
all = ["mypy (>=1.11.2)", "pytest (>=8.3.2)", "ruff (>=0.6.2)"]
|
||||
|
||||
[[package]]
|
||||
name = "iniconfig"
|
||||
@@ -852,14 +852,14 @@ setuptools = ">=42.0.0"
|
||||
|
||||
[[package]]
|
||||
name = "pytest"
|
||||
version = "9.0.2"
|
||||
version = "9.0.3"
|
||||
description = "pytest: simple powerful testing with Python"
|
||||
optional = false
|
||||
python-versions = ">=3.10"
|
||||
groups = ["test"]
|
||||
files = [
|
||||
{file = "pytest-9.0.2-py3-none-any.whl", hash = "sha256:711ffd45bf766d5264d487b917733b453d917afd2b0ad65223959f59089f875b"},
|
||||
{file = "pytest-9.0.2.tar.gz", hash = "sha256:75186651a92bd89611d1d9fc20f0b4345fd827c41ccd5c299a868a05d70edf11"},
|
||||
{file = "pytest-9.0.3-py3-none-any.whl", hash = "sha256:2c5efc453d45394fdd706ade797c0a81091eccd1d6e4bccfcd476e2b8e0ab5d9"},
|
||||
{file = "pytest-9.0.3.tar.gz", hash = "sha256:b86ada508af81d19edeb213c681b1d48246c1a91d304c6c81a427674c17eb91c"},
|
||||
]
|
||||
|
||||
[package.dependencies]
|
||||
@@ -1083,25 +1083,26 @@ files = [
|
||||
|
||||
[[package]]
|
||||
name = "requests"
|
||||
version = "2.32.5"
|
||||
version = "2.33.0"
|
||||
description = "Python HTTP for Humans."
|
||||
optional = false
|
||||
python-versions = ">=3.9"
|
||||
python-versions = ">=3.10"
|
||||
groups = ["main"]
|
||||
files = [
|
||||
{file = "requests-2.32.5-py3-none-any.whl", hash = "sha256:2462f94637a34fd532264295e186976db0f5d453d1cdd31473c85a6a161affb6"},
|
||||
{file = "requests-2.32.5.tar.gz", hash = "sha256:dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf"},
|
||||
{file = "requests-2.33.0-py3-none-any.whl", hash = "sha256:3324635456fa185245e24865e810cecec7b4caf933d7eb133dcde67d48cee69b"},
|
||||
{file = "requests-2.33.0.tar.gz", hash = "sha256:c7ebc5e8b0f21837386ad0e1c8fe8b829fa5f544d8df3b2253bff14ef29d7652"},
|
||||
]
|
||||
|
||||
[package.dependencies]
|
||||
certifi = ">=2017.4.17"
|
||||
certifi = ">=2023.5.7"
|
||||
charset_normalizer = ">=2,<4"
|
||||
idna = ">=2.5,<4"
|
||||
urllib3 = ">=1.21.1,<3"
|
||||
urllib3 = ">=1.26,<3"
|
||||
|
||||
[package.extras]
|
||||
socks = ["PySocks (>=1.5.6,!=1.5.7)"]
|
||||
use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"]
|
||||
test = ["PySocks (>=1.5.6,!=1.5.7)", "pytest (>=3)", "pytest-cov", "pytest-httpbin (==2.1.0)", "pytest-mock", "pytest-xdist"]
|
||||
use-chardet-on-py3 = ["chardet (>=3.0.2,<8)"]
|
||||
|
||||
[[package]]
|
||||
name = "setuptools"
|
||||
@@ -1138,14 +1139,14 @@ files = [
|
||||
|
||||
[[package]]
|
||||
name = "urllib3"
|
||||
version = "2.6.3"
|
||||
version = "2.7.0"
|
||||
description = "HTTP library with thread-safe connection pooling, file post, and more."
|
||||
optional = false
|
||||
python-versions = ">=3.9"
|
||||
python-versions = ">=3.10"
|
||||
groups = ["main"]
|
||||
files = [
|
||||
{file = "urllib3-2.6.3-py3-none-any.whl", hash = "sha256:bf272323e553dfb2e87d9bfd225ca7b0f467b919d7bbd355436d3fd37cb0acd4"},
|
||||
{file = "urllib3-2.6.3.tar.gz", hash = "sha256:1b62b6884944a57dbe321509ab94fd4d3b307075e0c2eae991ac71ee15ad38ed"},
|
||||
{file = "urllib3-2.7.0-py3-none-any.whl", hash = "sha256:9fb4c81ebbb1ce9531cce37674bbc6f1360472bc18ca9a553ede278ef7276897"},
|
||||
{file = "urllib3-2.7.0.tar.gz", hash = "sha256:231e0ec3b63ceb14667c67be60f2f2c40a518cb38b03af60abc813da26505f4c"},
|
||||
]
|
||||
|
||||
[package.extras]
|
||||
@@ -1175,4 +1176,4 @@ python-discovery = ">=1"
|
||||
[metadata]
|
||||
lock-version = "2.1"
|
||||
python-versions = ">=3.13, <3.15"
|
||||
content-hash = "c1309aed05c4d4524eb625dd9b846807373c0ff0ab42b216c640847845da2bdd"
|
||||
content-hash = "c46eff7907c07bed9dc96029843b2dd8662c02ea15cd474bff7bd8ff0a2101a5"
|
||||
|
||||
+4
-4
@@ -12,9 +12,9 @@ dependencies = ["requests>=2.32.4,<3.0.0", "platformdirs>4.0.0,<5.0.0"]
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = ">=3.13, <3.15"
|
||||
requests = "^2.32.5"
|
||||
requests = "^2.33.0"
|
||||
platformdirs = "^4.5.0"
|
||||
urllib3 = "^2.0"
|
||||
urllib3 = "^2.7"
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core>=2.0.0,<3.0.0"]
|
||||
@@ -32,7 +32,7 @@ mypy = "^1.18.2"
|
||||
pre-commit = "^4.3.0"
|
||||
|
||||
[tool.poetry.group.test.dependencies]
|
||||
pytest = "^9.0.2"
|
||||
pytest = "^9.0.3"
|
||||
pytest-mock = "^3.15.1"
|
||||
pytest-cov = "^7.0.0"
|
||||
|
||||
@@ -41,7 +41,7 @@ pyinstaller = "^6.1.0"
|
||||
|
||||
[tool.black]
|
||||
line-length = 88
|
||||
target-version = ['py313']
|
||||
target-version = ['py313', 'py314']
|
||||
|
||||
[tool.mypy]
|
||||
python_version = "3.13"
|
||||
|
||||
@@ -211,58 +211,6 @@ class DialogManager:
|
||||
dialog.protocol("WM_DELETE_WINDOW", on_close)
|
||||
ok_button.config(command=on_close)
|
||||
|
||||
def show_disable_debugging_reminder(self) -> None:
|
||||
"""Show reminder to disable USB debugging after transfer."""
|
||||
msg = (
|
||||
"Transfer completed!\n\n"
|
||||
"For security, please disable USB debugging when done:\n"
|
||||
"Settings → Developer Options → disable 'USB debugging'."
|
||||
)
|
||||
messagebox.showinfo("Disable USB Debugging", msg)
|
||||
|
||||
def show_transfer_stats(
|
||||
self, stats: dict, operation: str, deduplicator=None
|
||||
) -> None:
|
||||
"""Show transfer statistics dialog.
|
||||
|
||||
Args:
|
||||
stats: Dictionary containing transfer statistics
|
||||
operation: Type of operation ("Pull" or "Push")
|
||||
deduplicator: Optional deduplicator instance for byte formatting
|
||||
"""
|
||||
# Format bytes saved
|
||||
bytes_saved_str = ""
|
||||
if stats["bytes_saved"] > 0:
|
||||
if deduplicator and hasattr(deduplicator, "format_bytes"):
|
||||
bytes_saved_str = (
|
||||
f" ({deduplicator.format_bytes(stats['bytes_saved'])} saved)"
|
||||
)
|
||||
else:
|
||||
bytes_saved_str = f" ({stats['bytes_saved']} bytes saved)"
|
||||
|
||||
# Build message
|
||||
title = f"{operation} Transfer Complete"
|
||||
|
||||
if stats["total_files"] == 0:
|
||||
message = "No files were found to transfer."
|
||||
else:
|
||||
message_parts = [
|
||||
f"Transfer completed successfully!\n",
|
||||
f"Files found: {stats['total_files']}",
|
||||
f"Files transferred: {stats['transferred']}",
|
||||
f"Duplicate files skipped: {stats['skipped']}{bytes_saved_str}",
|
||||
]
|
||||
|
||||
if stats["skipped"] > 0:
|
||||
message_parts.append(
|
||||
f"\nDuplicate detection helped avoid unnecessary transfers!"
|
||||
)
|
||||
|
||||
message = "\n".join(message_parts)
|
||||
|
||||
# Show dialog
|
||||
messagebox.showinfo(title, message)
|
||||
|
||||
def show_error(self, title: str, message: str) -> None:
|
||||
"""Show an error dialog.
|
||||
|
||||
@@ -386,7 +334,7 @@ class DialogManager:
|
||||
side="right"
|
||||
)
|
||||
|
||||
def show_transfer_stats(self, stats: dict, operation: str):
|
||||
def show_transfer_stats(self, stats: dict, operation: str) -> None:
|
||||
"""Show transfer statistics in a dialog.
|
||||
|
||||
Args:
|
||||
@@ -437,7 +385,7 @@ class DialogManager:
|
||||
# Close button
|
||||
tk.Button(main_frame, text="Close", command=stats_window.destroy).pack()
|
||||
|
||||
def show_disable_debugging_reminder(self):
|
||||
def show_disable_debugging_reminder(self) -> None:
|
||||
"""Show reminder about disabling USB debugging after transfer."""
|
||||
messagebox.showinfo(
|
||||
"Security Reminder",
|
||||
|
||||
@@ -255,7 +255,6 @@ class TransferManager:
|
||||
lambda: self.dialog_manager.show_transfer_stats(
|
||||
stats,
|
||||
direction.capitalize(),
|
||||
self.device_manager.adb_manager.deduplicator,
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user