Skip to content

Commit

Permalink
Fix NullPointerException of getExternalDocumentationUrl (#778)
Browse files Browse the repository at this point in the history
  • Loading branch information
koxudaxi authored Aug 5, 2023
1 parent 50e1ef4 commit 77c7f48
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class PydanticDocumentationLinkProvider : PythonDocumentationLinkProvider {
CONFIG_DICT_SHORT_Q_NAME to "https://docs.pydantic.dev/dev-v2/api/config/#pydantic.config.ConfigDict",
)

override fun getExternalDocumentationUrl(element: PsiElement, originalElement: PsiElement): String? {
override fun getExternalDocumentationUrl(element: PsiElement?, originalElement: PsiElement?): String? {
val qualifiedName = (element as? PyQualifiedNameOwner)?.qualifiedName ?: return null
if (!qualifiedName.startsWith("pydantic.")) return null

Expand Down

0 comments on commit 77c7f48

Please sign in to comment.