♻️ remove internal Undefined sentinel references#55
Conversation
|
Warning Review limit reached
More reviews will be available in 53 minutes and 4 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (9)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
🟢 Coverage 100.00% diff coverage · +0.00% coverage variation
Metric Results Coverage variation ✅ +0.00% coverage variation (-1.00%) Diff coverage ✅ 100.00% diff coverage Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (735f05c) 1931 1931 100.00% Head commit (8f55f8d) 1931 (+0) 1931 (+0) 100.00% (+0.00%) Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch:
<coverage of head commit> - <coverage of common ancestor commit>Diff coverage details
Coverable lines Covered lines Diff coverage Pull request (#55) 3 3 100.00% Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified:
<covered lines added or modified>/<coverable lines added or modified> * 100%
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #55 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 22 22
Lines 1931 1931
=========================================
Hits 1931 1931 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Keep the charset Sentinel public while removing Undefined from the package root. Define explicit module export boundaries and cover the public API contract.
Remove the public encoding example and generated API entry, and record the API cleanup for 1.6.0-dev.
e3e9783 to
8f55f8d
Compare
There was a problem hiding this comment.
Pull request overview
This pull request narrows the library’s public surface area by removing the Undefined sentinel from the package-root API (qs_codec.Undefined), while keeping sentinel behavior as an internal implementation detail and clarifying Sentinel documentation.
Changes:
- Removed
Undefinedfromqs_codec/__init__.pyexports and removed its usage examples and module docs from README/Sphinx docs. - Improved docstrings for charset sentinel handling (
Sentinel) and clarifiedUndefinedas an internal singleton sentinel with no public exports. - Added unit tests to assert
Sentinelremains public andUndefinedis not exported from the package root.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/package_test.py | Adds assertions for public API surface (Sentinel exported; Undefined not exported). |
| tests/unit/example_test.py | Removes public-facing qs_codec.Undefined() example usage. |
| src/qs_codec/models/undefined.py | Marks Undefined as internal, removes module exports, and tightens singleton/subclassing semantics documentation. |
| src/qs_codec/enums/sentinel.py | Clarifies Sentinel docstrings and explicitly defines intended exports. |
| src/qs_codec/init.py | Removes Undefined from package-root imports and __all__. |
| README.rst | Removes Undefined from public documentation/examples. |
| docs/README.rst | Removes Undefined from public documentation/examples. |
| docs/qs_codec.models.rst | Removes the qs_codec.models.undefined module from generated docs. |
| CHANGELOG.md | Documents removal of qs_codec.Undefined from the public API in the next dev cycle. |
This pull request makes
Undefinedan internal implementation detail rather than a public API, and updates documentation and tests to reflect this. It also clarifies and improves the documentation for charset sentinels and theSentinelenum.Public API changes:
Undefinedfrom the public API by deleting its import and export fromqs_codec/__init__.py, and removing its documentation and usage examples from the docs and README files. [1] [2] [3] [4] [5] [6]Sentinelis part of the public API andUndefinedis not.Documentation improvements:
Sentineland_SentinelDataMixininsentinel.py, making their roles and usage clearer and more precise. [1] [2]Undefinedimplementation and docstring to clarify its internal, singleton nature and prevent subclassing, and removed its__all__export. [1] [2] [3]Changelog:
qs_codec.Undefinedfrom the public API.