Skip to content

Commit

Permalink
Merge pull request #363 from koxudaxi/fix_outdated_stub_in_index_erro…
Browse files Browse the repository at this point in the history
…r_on_pydantic_annotator

Fix Outdated Stub in index error on PydanticAnnotator.kt
  • Loading branch information
koxudaxi authored Sep 4, 2021
2 parents c55822b + e8cf488 commit c217017
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<h2>version 0.3.6</h2>
<p>BugFixes</p>
<ul>
<li>Fix Outdated Stub in index error on PydanticAnnotator.kt [#363]</li>
<li>Fix NullPointerException in PydanticTypeCheckerInspection.kt [#362]</li>
</ul>
<h2>version 0.3.5</h2>
Expand Down
2 changes: 1 addition & 1 deletion src/com/koxudaxi/pydantic/PydanticAnnotator.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class PydanticAnnotator : PyAnnotator() {
}

private fun annotatePydanticModelCallableExpression(pyCallExpression: PyCallExpression) {
val context = TypeEvalContext.userInitiated(pyCallExpression.project, pyCallExpression.containingFile)
val context = TypeEvalContext.codeAnalysis(pyCallExpression.project, pyCallExpression.containingFile)
val pyClass = getPydanticPyClass(pyCallExpression, context) ?: return
if (getPydanticModelInit(pyClass, context) != null) return
val unFilledArguments =
Expand Down

0 comments on commit c217017

Please sign in to comment.