Skip to content

Commit

Permalink
Merge pull request #431 from koxudaxi/fix_null_pointer_exception_in_P…
Browse files Browse the repository at this point in the history
…ydanticTypeCheckerInspection

Fix Null Pointer Exception in PydanticTypeCheckerInspection
  • Loading branch information
koxudaxi authored Feb 4, 2022
2 parents 03dd6ba + 5530cc3 commit 6a20563
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
<idea-plugin url="https://github.com/koxudaxi/pydantic-pycharm-plugin" require-restart="true">
<id>com.koxudaxi.pydantic</id>
<name>Pydantic</name>
<version>0.3.10</version>
<version>0.3.11</version>
<vendor email="koaxudai@gmail.com">Koudai Aono @koxudaxi</vendor>
<change-notes><![CDATA[
<h2>version 0.3.11</h2>
<p>BugFixes</p>
<ul>
<li>Fix Null Pointer Exception in PydanticTypeCheckerInspection [#431]</li>
</ul>
<h2>version 0.3.10</h2>
<p>Features</p>
<ul>
Expand Down
2 changes: 1 addition & 1 deletion src/com/koxudaxi/pydantic/PydanticTypeCheckerInspection.kt
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class PydanticTypeCheckerInspection : PyTypeCheckerInspection() {

val newType = when (typeForParameter) {
is PyCollectionType ->
typeForParameter.elementTypes.mapNotNull {
typeForParameter.elementTypes.filterNotNull().mapNotNull {
getTypeFromTypeMap(getTypeMap, it, cache)
}.toList().takeIf {
it.isNotEmpty()
Expand Down

0 comments on commit 6a20563

Please sign in to comment.