Skip to content

Conversation

@JsMelix
Copy link

@JsMelix JsMelix commented Oct 17, 2025

Description

Removes the unnecessary fga_client.close() call from the README example.

What problem is being solved?

The example included a .close() call, but the Python SDK automatically handles client closing via context managers, so users don't need to call it manually.

How is it being solved?

By removing the redundant line from the README documentation.

What changes are made to solve it?

  • Updated README.md
  • Improved example clarity

References

Closes #191

Review Checklist

  • I have clicked on "allow edits by maintainers"
  • The correct base branch is being used (main)
  • I have updated documentation

🟣 Hacktoberfest
This PR is part of Hacktoberfest 2025 🎃.
If valid, please mark it as hacktoberfest-accepted. Thank you!

Summary by CodeRabbit

  • Refactor
    • Improved resource cleanup handling by streamlining internal management processes.

@JsMelix JsMelix requested review from a team as code owners October 17, 2025 17:05
@linux-foundation-easycla
Copy link

CLA Not Signed

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 17, 2025

Walkthrough

The README.md was updated to remove redundant explicit await fga_client.close() calls from three async context manager examples, allowing the context manager's automatic cleanup mechanism to handle resource deallocation.

Changes

Cohort / File(s) Summary
Documentation cleanup
README.md
Removed explicit await fga_client.close() statements from three async with OpenFgaClient(...) code examples to eliminate redundant resource cleanup calls.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The PR title "docs: remove fga_client.close() from README (#191)" is concise, specific, and directly related to the main change described in the raw_summary. The title clearly communicates that the PR removes explicit close calls from the README examples, which is exactly what the changeset accomplishes. The title uses appropriate prefixing ("docs:") to indicate it's a documentation change and includes the issue number for reference, making it clear and actionable for developers scanning the history.
Linked Issues Check ✅ Passed The PR directly addresses the objective from issue #191 by removing explicit fga_client.close() calls from the README examples within async-with blocks. The raw_summary confirms that the changes align with the issue's requirement to eliminate redundant manual close calls since context managers (with __aexit__() and __exit__() methods) already handle resource cleanup automatically. The PR fully satisfies the coding requirement specified in the linked issue without introducing unrelated changes.
Out of Scope Changes Check ✅ Passed The PR introduces only in-scope changes focused entirely on addressing issue #191. The raw_summary indicates that only README.md was modified, with changes limited to removing explicit close calls from async-with block examples. No unrelated modifications, refactoring, or feature additions are present. The changes are directly tied to the documented objective of improving README example clarity by removing unnecessary manual close calls.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6f06c2f and ee1c17f.

📒 Files selected for processing (1)
  • README.md (0 hunks)
💤 Files with no reviewable changes (1)
  • README.md

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 and usage tips.

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.

Remove fga_client.close() from the README

1 participant