From 669b70b2cd7ff9349c33c641d571f7da6730c5e7 Mon Sep 17 00:00:00 2001 From: Peter Law Date: Mon, 18 May 2020 22:37:23 +0100 Subject: [PATCH] Validate instance methods on Django models --- test/completion/django.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/completion/django.py b/test/completion/django.py index 88a508d9..16d31202 100644 --- a/test/completion/django.py +++ b/test/completion/django.py @@ -49,6 +49,9 @@ class BusinessModel(models.Model): unidentifiable = NOT_FOUND + def method(self): + return 42 + # ----------------- # Model attribute inference # ----------------- @@ -132,6 +135,11 @@ model_instance.unidentifiable #! ['unidentifiable = NOT_FOUND'] model_instance.unidentifiable +#? int() +model_instance.method() +#! ['def method'] +model_instance.method + # ----------------- # Queries # -----------------