Skip to content

Remove unused pyicloud functions#1237

Merged
AndreyNikiforov merged 6 commits intoicloud-photos-downloader:masterfrom
AndreyNikiforov:refactor/remove-unused-pyicloud-functions
Aug 31, 2025
Merged

Remove unused pyicloud functions#1237
AndreyNikiforov merged 6 commits intoicloud-photos-downloader:masterfrom
AndreyNikiforov:refactor/remove-unused-pyicloud-functions

Conversation

@AndreyNikiforov
Copy link
Copy Markdown
Collaborator

No description provided.

AndreyNikiforov and others added 6 commits August 30, 2025 22:40
Remove unused device management parameters and functionality from pyicloud cmdline interface:

- Remove parameters: --list, --llist, --locate, --device, --sound, --message, --silentmessage, --lostmode, --lostphone, --lostpassword, --lostmessage, --outputfile
- Remove device filtering and iteration logic
- Remove create_pickled_data() function and pickle file output
- Remove unused imports: pickle, identity, RawTreatmentPolicy, AppleDevice
- Remove DEVICE_ERROR constant and all device interaction functionality

The icloud cmdline tool now focuses solely on authentication and keyring management,
providing a clean separation from the main icloudpd photo downloading functionality.

Benefits:
- Simplified interface with ~120 lines of code removed
- Clear separation of concerns between auth (icloud) and photos (icloudpd)
- Reduced complexity and maintenance burden
- All tests pass and type checking succeeds

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Remove CalendarService, ContactsService, FindMyiPhoneServiceManager, RemindersService, UbiquityService, and AccountService along with their corresponding service files and properties. The pyicloud_ipd package now only supports PhotosService which is the core functionality needed for icloud_photos_downloader.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Add comprehensive documentation for the removal of unused services from pyicloud_ipd and device management functionality from icloud cmdline. Update quality metrics to reflect 694+ lines of code reduction while maintaining all functionality.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Remove pyicloud_ipd from ruff exclusions and fix all code quality issues:

- Fixed 91 linting issues across 14 files
- Fixed 8 mypy strict typing errors
- Applied consistent formatting to all files
- Updated to modern Python syntax (f-strings, X | Y unions)
- Replaced bare except clauses with specific exceptions
- Fixed lambda variable capture and converted to proper functions
- Added proper type annotations to class constants
- Simplified nested conditional logic

All 203 tests continue to pass with full code quality compliance.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Remove explicit six dependency as it's not directly used in the codebase.
The six library was only needed as a transitive dependency for python-dateutil
and srp packages, which will continue to install it automatically when needed.

Since we require Python 3.10+, the six library (Python 2/3 compatibility)
is no longer necessary as an explicit dependency.

- Removed six==1.17.0 from main dependencies
- Removed types-six==1.17.0.20250515 from test dependencies
- All 203 tests continue to pass
- MyPy strict checking passes on all source files

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Replace dateutil.tz.tzoffset() with timezone(timedelta(seconds=offset)) from stdlib
- Remove python-dateutil==2.9.0.post0 dependency entirely
- Remove types-python-dateutil==2.9.0.20250516 type stubs
- Update XMP sidecar generation to use standard library datetime timezone handling
- Reduce external dependencies by using built-in Python functionality

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@AndreyNikiforov AndreyNikiforov merged commit c0323ac into icloud-photos-downloader:master Aug 31, 2025
398 checks passed
@AndreyNikiforov AndreyNikiforov deleted the refactor/remove-unused-pyicloud-functions branch August 31, 2025 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant