Repository navigation
[WIP] feat!: move public API to __init__ - #65
Draft
jkowalleck wants to merge 5 commits into
Draft
jkowalleck wants to merge 5 commits into
jkowalleck wants to merge 5 commits into
Conversation
fixes #64 Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Documentation build overview
7 files changed ·
|
There was a problem hiding this comment.
Pull request overview
This PR consolidates the package’s public API by moving the previously exposed symbols from syntax_helpers.py (and the small helper in utils.py) into rfc3987_syntax2/__init__.py, aligning with the breaking-change request in issue #64.
Changes:
- Removed
rfc3987_syntax2.syntax_helpersand moved its public API intorfc3987_syntax2(package root). - Removed
rfc3987_syntax2.utilsand inlined grammar loading logic into__init__.py. - Added a BREAKING note to the Unreleased section of the changelog.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/rfc3987_syntax2/utils.py |
Removes the old grammar-loading helper module. |
src/rfc3987_syntax2/syntax_helpers.py |
Removes the prior public-API module (API is now at package root). |
src/rfc3987_syntax2/__init__.py |
Becomes the primary public API surface, containing parser/validator APIs and lazy-loaded attributes. |
CHANGELOG.md |
Documents the breaking removal of the old submodules. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+120
to
124
| T_SYNTAX_PARSER_TERM = Literal["iri", "iri_reference", "absolute_iri"] | ||
| """Top-level RFC 3987 parser start terms accepted by :func:`parse` and :func:`check`. | ||
|
|
||
| Allowed values are ``"iri"``, ``"iri_reference"``, and ``"absolute_iri"``. | ||
| """ |
Comment on lines
+9
to
+11
| BREAKING: | ||
| - removed `.syntax_helpers` | ||
| - removed `.utils` |
Comment on lines
+9
to
+11
| BREAKING: | ||
| - removed `.syntax_helpers` | ||
| - removed `.utils` |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (2)
src/rfc3987_syntax2/init.py:124
- Docstring references :func:
check, but there is nocheckfunction exported from this module. This makes the public docs inaccurate and can confuse users.
T_SYNTAX_PARSER_TERM = Literal["iri", "iri_reference", "absolute_iri"]
"""Top-level RFC 3987 parser start terms accepted by :func:`parse` and :func:`check`.
Allowed values are ``"iri"``, ``"iri_reference"``, and ``"absolute_iri"``.
"""
CHANGELOG.md:11
- The changelog notes removed modules but doesn’t provide a migration hint for users. Adding the new import path here would make the breaking change actionable.
BREAKING:
- removed `.syntax_helpers`
- removed `.utils`
Comment on lines
+5
to
+10
| from pathlib import Path | ||
| from threading import Lock | ||
| from typing import TYPE_CHECKING, Any, Callable, Literal, Optional | ||
| from warnings import warn | ||
|
|
||
| from lark import Lark, ParseTree, exceptions |
jkowalleck
marked this pull request as draft
July 21, 2026 20:12
__init____init__
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
__init__#64