Skip to content

♻️ remove internal Undefined sentinel references#55

Merged
techouse merged 2 commits into
mainfrom
chore/api-cleanup
Jun 21, 2026
Merged

♻️ remove internal Undefined sentinel references#55
techouse merged 2 commits into
mainfrom
chore/api-cleanup

Conversation

@techouse

@techouse techouse commented Jun 21, 2026

Copy link
Copy Markdown
Owner

This pull request makes Undefined an 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 the Sentinel enum.

Public API changes:

  • Removed Undefined from the public API by deleting its import and export from qs_codec/__init__.py, and removing its documentation and usage examples from the docs and README files. [1] [2] [3] [4] [5] [6]
  • Added tests to ensure that Sentinel is part of the public API and Undefined is not.

Documentation improvements:

  • Improved and clarified the docstrings and comments for Sentinel and _SentinelDataMixin in sentinel.py, making their roles and usage clearer and more precise. [1] [2]
  • Updated the Undefined implementation and docstring to clarify its internal, singleton nature and prevent subclassing, and removed its __all__ export. [1] [2] [3]

Changelog:

  • Added a changelog entry for version 1.6.0-dev documenting the removal of qs_codec.Undefined from the public API.

@techouse techouse self-assigned this Jun 21, 2026
@techouse techouse added the enhancement New feature or request label Jun 21, 2026
@coderabbitai

coderabbitai Bot commented Jun 21, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@techouse, we couldn't start this review because you've reached your PR review rate limit.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ad996a6a-e1d8-4295-9e04-8d89a4702b11

📥 Commits

Reviewing files that changed from the base of the PR and between 735f05c and 8f55f8d.

📒 Files selected for processing (9)
  • CHANGELOG.md
  • README.rst
  • docs/README.rst
  • docs/qs_codec.models.rst
  • src/qs_codec/__init__.py
  • src/qs_codec/enums/sentinel.py
  • src/qs_codec/models/undefined.py
  • tests/unit/example_test.py
  • tests/unit/package_test.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/api-cleanup

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.

@codacy-production

codacy-production Bot commented Jun 21, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

🟢 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

View coverage diff in Codacy

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

codecov Bot commented Jun 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (735f05c) to head (8f55f8d).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

techouse added 2 commits June 21, 2026 12:08
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.
@techouse techouse force-pushed the chore/api-cleanup branch from e3e9783 to 8f55f8d Compare June 21, 2026 11:11
@techouse techouse changed the title ♻️ remove internal sentinel references and update documentation ♻️ remove internal Undefined sentinel references and update documentation Jun 21, 2026
@techouse techouse changed the title ♻️ remove internal Undefined sentinel references and update documentation ♻️ remove internal Undefined sentinel references Jun 21, 2026
@techouse techouse requested a review from Copilot June 21, 2026 11:16

Copilot AI 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.

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 Undefined from qs_codec/__init__.py exports and removed its usage examples and module docs from README/Sphinx docs.
  • Improved docstrings for charset sentinel handling (Sentinel) and clarified Undefined as an internal singleton sentinel with no public exports.
  • Added unit tests to assert Sentinel remains public and Undefined is 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.

@techouse techouse merged commit c153ca9 into main Jun 21, 2026
27 checks passed
@techouse techouse deleted the chore/api-cleanup branch June 21, 2026 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants