Repository navigation
feat: typing - #16
Merged
Merged
feat: typing #16
Conversation
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
There was a problem hiding this comment.
Pull request overview
This PR introduces explicit typing metadata and CI static type checking to treat rfc3987_syntax2 as a typed package and enforce mypy-based validation.
Changes:
- Added mypy strict configuration and a dedicated GitHub Actions job to run mypy.
- Marked the distribution as typed (PEP 561
py.typed+Typing :: Typedclassifier). - Tightened/added return and callable type annotations in helpers and tests.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
tests/test_syntax.py |
Adds typing imports and a return annotation for a generator used in parametrized tests. |
tests/__init__.py |
Adds mypy ignore comments on json.load returns (needs a small fix). |
src/rfc3987_syntax2/utils.py |
Adds an explicit -> str return type to load_grammar. |
src/rfc3987_syntax2/syntax_helpers.py |
Adds typing import and explicit return types for public helpers and validator factory. |
src/rfc3987_syntax2/py.typed |
Adds PEP 561 marker file to indicate inline type hints are shipped. |
pyproject.toml |
Declares Typing :: Typed and adds mypy to testing extras. |
CHANGELOG.md |
Notes the addition of static typing assertions. |
.mypy.ini |
Introduces strict mypy configuration (scoped to src/). |
.github/workflows/python-tests.yml |
Adds a static analysis job running mypy (one step name should be corrected). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
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.
No description provided.