Skip to content

Improve typing#121

Merged
pbrassel merged 1 commit into
mainfrom
refactor-typing
Jul 21, 2026
Merged

Improve typing#121
pbrassel merged 1 commit into
mainfrom
refactor-typing

Conversation

@pbrassel

@pbrassel pbrassel commented Jul 21, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features
    • Added a reusable ResourceListResult type for list and search operations, supporting optional pagination metadata.
    • Exposed ResourceListResult through the public types API.
  • Documentation
    • Added API documentation for ResourceListResult.
  • Refactor
    • Improved public type annotations for optional authentication, resource identifiers, and request fields across clients.
    • Added clearer string conversion support for UUID-based models.

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR introduces the generic ResourceListResult type alias, applies it to list and find methods across the client APIs, makes nullable parameters explicit in annotations, re-exports the alias, and adds its API documentation.

Changes

Resource list typing alignment

Layer / File(s) Summary
Shared resource list contract
flame_hub/_base_client.py
Defines ResourceListResult, applies it to base list helpers, and updates related UUID, query-building, and metadata variable annotations.
Client list API annotations
flame_hub/_auth_client.py, flame_hub/_core_client.py, flame_hub/_storage_client.py
Updates list and find return annotations to ResourceListResult[...] and explicitly types nullable parameters.
Public exports and related annotations
flame_hub/types.py, docs/types_api.rst, flame_hub/_exceptions.py
Re-exports and documents ResourceListResult, and explicitly permits None for the optional error parameter.

Estimated code review effort: 3 (Moderate) | ~20 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is too generic and doesn't describe the specific typing changes in the pull request. Use a concrete title like "Add ResourceListResult typing for client list methods".
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor-typing

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/types_api.rst`:
- Around line 8-11: Replace the ResourceListResult autoclass directive with
autodata in the API documentation, preserving its members and undoc-members
options as appropriate for the data directive. Also update the existing
UuidIdentifiable directive if it is defined as a type alias, changing it from
autoclass to autodata.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: caa71dce-2318-4051-8673-7c08b4700e8a

📥 Commits

Reviewing files that changed from the base of the PR and between 2678d09 and 2ba2a32.

📒 Files selected for processing (7)
  • docs/types_api.rst
  • flame_hub/_auth_client.py
  • flame_hub/_base_client.py
  • flame_hub/_core_client.py
  • flame_hub/_exceptions.py
  • flame_hub/_storage_client.py
  • flame_hub/types.py

Comment thread docs/types_api.rst
@pbrassel
pbrassel merged commit 59c2124 into main Jul 21, 2026
7 checks passed
@pbrassel
pbrassel deleted the refactor-typing branch July 21, 2026 15:13
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