-
Notifications
You must be signed in to change notification settings - Fork 0
[Junie]: Schemaジェネリックラッパーとvalidate型補完対応 #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
harumaki4649
merged 1 commit into
copilot/add-type-hints-to-validate-function
from
jetbrains-junie-issue-9-run-e9f69cc7-79e2-4f8b-a2e8-f2079b29b165
Feb 26, 2026
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| from .v import v | ||
| from .validator import validate, ValidationError, Schema | ||
|
|
||
| __version__ = "1.1.0" | ||
| __version__ = "1.1.1" | ||
| __all__ = ["v", "validate", "ValidationError", "Schema"] |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -183,5 +183,6 @@ def test_schema_generic_optional_field(): | |
|
|
||
| def test_schema_exported(): | ||
| """Schema is exported from the top-level package.""" | ||
| import validkit | ||
| assert hasattr(validkit, "Schema") | ||
| import importlib | ||
| pkg = importlib.import_module("validkit") | ||
| assert hasattr(pkg, "Schema") | ||
Oops, something went wrong.
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.
Check notice
Code scanning / CodeQL
Statement has no effect Note
Copilot Autofix
AI about 14 hours ago
General approach: remove the standalone ellipsis expression so that there are no top‑level statements without effects. We must not change the overload signatures or runtime behavior.
Best concrete fix: delete line 169 containing only
) -> T: ...? No — that’s valid, needed syntax. The reported line 169 is the sole...line that is not attached to adefheader. In the snippet, it is the terminator of the first overload, written on its own line as) -> T: .... To avoid changing the meaning, we can move the ellipsis into a proper function body (which is standard for stub‑style overloads) and eliminate it as a separate statement. The minimal change is to rewrite the overload so that the...is the function body directly under the signature, and remove the stray standalone...line if it exists separately; in our snippet, that means turning the one‑line overload header with...at the end into a multi‑line definition whose body is just....Concretely, in
src/validkit/validator.py, inside theif TYPE_CHECKING:block, adjust the first overload definition so that the ellipsis is the function body, not a separate expression statement. No new imports or helpers are needed.