Skip to content

Comments

Fix/add type hints and decorators#58

Open
pranavkonde wants to merge 16 commits intoakave-ai:mainfrom
pranavkonde:fix/add-type-hints-and-decorators
Open

Fix/add type hints and decorators#58
pranavkonde wants to merge 16 commits intoakave-ai:mainfrom
pranavkonde:fix/add-type-hints-and-decorators

Conversation

@pranavkonde
Copy link

Description

Improved type safety and code clarity by adding proper type hints and method decorators to the SDK class.

Changes

  1. Added @staticmethod decorator to extract_block_data
  2. Added return type hints to all methods:
    • __init__ -> None
    • close -> None
    • streaming_api -> StreamingAPI
    • ipc -> IPC
    • create_bucket -> BucketCreateResult
    • view_bucket -> Bucket
    • delete_bucket -> None
    • extract_block_data -> bytes
    • encryption_key_derivation -> Optional[bytes]
  3. Added proper type hints for class attributes:
    • client: Optional[nodeapi_pb2_grpc.NodeAPIStub]
    • conn: Optional[grpc.Channel]
    • sp_client: Optional[SPClient]
    • streaming_erasure_code: Optional[ErasureCode]
  4. Fixed code style:
    • Fixed indentation in extract_block_data method
    • Added proper spacing between classes
    • Improved code readability

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.

5 participants