Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds comprehensive type annotations to test files and examples, improving code clarity and enabling better static type checking. The changes primarily add type hints to function parameters and return types, update import statements to include specific types from pyfuse3, and make some minor refactoring improvements.
Key changes:
- Added type annotations to all major functions in test utilities and example filesystem implementations
- Updated imports to explicitly import pyfuse3 types (EntryAttributes, FileHandleT, InodeT, RequestContext, etc.)
- Refactored some code for better consistency with type annotations (e.g., umount function variable usage, waited initialization)
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| test/util.py | Added Process type alias and type annotations to utility functions; refactored umount to access exitcode directly |
| test/test_rounding.py | Updated imports to explicitly import EntryAttributes |
| test/test_fs.py | Added type annotations to Fs class methods; updated getattr calls to pass ctx parameter |
| test/test_api.py | Updated imports to explicitly import pyfuse3 types |
| test/pytest_checklogs.py | Added type annotations to logging handler and utility functions |
| examples/tmpfs.py | Added comprehensive type annotations to Operations class; replaced getattr call with direct database query in release method |
| examples/passthroughfs.py | Added comprehensive type annotations; added type-aware handling for root path (str vs set); improved variable naming (name_str, target_str) |
| examples/hello_asyncio.py | Added type annotations to TestFs class methods and utility functions |
| examples/hello.py | Added type annotations to TestFs class methods and utility functions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
e817e40 to
d34dfbd
Compare
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.
No description provided.