Repository navigation
Validate drive/root consistency; accept drive id or name - #67
Closed
Light2Dark wants to merge 25 commits into
Closed
Light2Dark wants to merge 25 commits into
Light2Dark wants to merge 25 commits into
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
add uv, pyrefly, commit CI
add logo, docs, contributing.md
update links, remove text
add test-coverage
Request mimeType and reject non-folder IDs so a regular file passed as
root_file_id no longer masquerades as an empty directory under ls("").
Add a TODO for the conflicting drive vs shared-drive root_file_id case
(issue #2) to handle in a follow-up.
Co-authored-by: Cursor <cursoragent@cursor.com>
Add integration tests asserting a file ID is rejected as root (NotADirectoryError) and a folder ID lists its children. Introduce a typed DriveConfig + make_fs factory fixture in conftest so live filesystems are built from env in one place and tests can create multiple instances with a shared teardown. Add tests to pyrefly search-path and document Drive API constants. Co-authored-by: Cursor <cursoragent@cursor.com>
check root id is valid
Enforce that a scoped drive and root_file_id agree: reject a folder root whose driveId differs from the configured drive, and raise on a shared-drive root_file_id that conflicts with an already-set drive (previously a silent no-op). Also resolve the `drive` argument by id or name (was name-only) and correct the docstring accordingly. Co-authored-by: Cursor <cursoragent@cursor.com>
Collaborator
Author
|
Opened against the wrong repo; recreating on the Light2Dark fork. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #7 (the issue #2 TODO).
driveandroot_file_idagree:driveIddiffers from the configured drive (now requestsdriveIdin the validation field mask);ValueErroron a shared-driveroot_file_idthat conflicts with an already-setdrive(previously a silent no-op).driveargument by id or name (was name-only), via the new_resolve_drive_id; fix the misleading docstring that called it an "ID" while only accepting a name.Test plan
uv run pytest tests/test_core.py— 42 passed, 4 integration deselecteduv run pyrefly check— 0 errors-m integration, requires live Drive creds): folder root in a different drive is rejected; shared-drive-iddriveresolves the same as its nameMade with Cursor