Skip to content

[Junie]: Schemaジェネリックラッパー追加とIDE補完対応プルリクレビュー#12

Merged
harumaki4649 merged 1 commit intocopilot/add-type-hints-to-validate-functionfrom
jetbrains-junie-issue-9-run-dd779749-da65-4619-ba99-73e666cab0e6
Feb 26, 2026
Merged

[Junie]: Schemaジェネリックラッパー追加とIDE補完対応プルリクレビュー#12
harumaki4649 merged 1 commit intocopilot/add-type-hints-to-validate-functionfrom
jetbrains-junie-issue-9-run-dd779749-da65-4619-ba99-73e666cab0e6

Conversation

@jetbrains-junie
Copy link
Contributor

📌 Hey! This PR was made for you with Junie, the coding agent by JetBrains Early Access Preview

It's still learning, developing, and might make mistakes. Please make sure you review the changes before you accept them.
We'd love your feedback — join our Discord to share bugs, ideas: here.

📊 Junie Summary

Empty

collect_errors: bool = ...,
*,
collect_errors: Literal[True],
) -> ValidationResult: ...

Check notice

Code scanning / CodeQL

Statement has no effect Note

This statement has no effect.

Copilot Autofix

AI about 12 hours ago

Copilot could not generate an autofix suggestion

Copilot could not generate an autofix suggestion for this alert. Try pushing a new commit or if the problem persists contact support.

collect_errors: bool = ...,
*,
collect_errors: Literal[True],
) -> ValidationResult: ...

Check notice

Code scanning / CodeQL

Statement has no effect Note

This statement has no effect.

Copilot Autofix

AI about 12 hours ago

In general, to fix "statement has no effect" warnings where ... is used as a function body, replace the bare ellipsis expression with pass, which is the idiomatic no‑op statement in Python. This keeps the function as a stub without changing behavior.

Here, each overload in the if TYPE_CHECKING: block ends with ) -> ...: .... The ellipsis body is only there as a placeholder, so the best fix is to change ... to pass on each overload definition, including the one on line 204 that CodeQL highlights. This keeps the overloads valid and understandable to type checkers and human readers, while eliminating the no‑effect expression statement. No imports or additional definitions are required.

Concretely, in src/validkit/validator.py, within the if TYPE_CHECKING: block starting around line 171, update all four def validate(...) -> ...: ... overloads so their bodies are pass instead of ....

Suggested changeset 1
src/validkit/validator.py

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/src/validkit/validator.py b/src/validkit/validator.py
--- a/src/validkit/validator.py
+++ b/src/validkit/validator.py
@@ -179,7 +179,8 @@
         migrate: Optional[Dict[str, Any]] = ...,
         *,
         collect_errors: Literal[True],
-    ) -> ValidationResult: ...
+    ) -> ValidationResult:
+        pass
 
     @overload
     def validate(
@@ -190,7 +191,8 @@
         migrate: Optional[Dict[str, Any]] = ...,
         *,
         collect_errors: Literal[False] = ...,  # default
-    ) -> T: ...
+    ) -> T:
+        pass
 
     @overload
     def validate(
@@ -201,7 +203,8 @@
         migrate: Optional[Dict[str, Any]] = ...,
         *,
         collect_errors: Literal[True],
-    ) -> ValidationResult: ...
+    ) -> ValidationResult:
+        pass
 
     @overload
     def validate(
@@ -212,7 +215,8 @@
         migrate: Optional[Dict[str, Any]] = ...,
         *,
         collect_errors: Literal[False] = ...,  # default
-    ) -> Any: ...
+    ) -> Any:
+        pass
 
 
 def validate(
EOF
@@ -179,7 +179,8 @@
migrate: Optional[Dict[str, Any]] = ...,
*,
collect_errors: Literal[True],
) -> ValidationResult: ...
) -> ValidationResult:
pass

@overload
def validate(
@@ -190,7 +191,8 @@
migrate: Optional[Dict[str, Any]] = ...,
*,
collect_errors: Literal[False] = ..., # default
) -> T: ...
) -> T:
pass

@overload
def validate(
@@ -201,7 +203,8 @@
migrate: Optional[Dict[str, Any]] = ...,
*,
collect_errors: Literal[True],
) -> ValidationResult: ...
) -> ValidationResult:
pass

@overload
def validate(
@@ -212,7 +215,8 @@
migrate: Optional[Dict[str, Any]] = ...,
*,
collect_errors: Literal[False] = ..., # default
) -> Any: ...
) -> Any:
pass


def validate(
Copilot is powered by AI and may make mistakes. Always verify output.
@harumaki4649 harumaki4649 merged commit f4b7781 into copilot/add-type-hints-to-validate-function Feb 26, 2026
30 checks passed
@harumaki4649 harumaki4649 deleted the jetbrains-junie-issue-9-run-dd779749-da65-4619-ba99-73e666cab0e6 branch February 26, 2026 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant