From 6d927d502e2eeb0e5ee263151880ce607990913b Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Sat, 25 Apr 2020 00:38:15 +0200 Subject: [PATCH] Make sure that infering the Django User model works --- jedi/plugins/django.py | 1 - test/completion/django.py | 8 ++++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/jedi/plugins/django.py b/jedi/plugins/django.py index 16f9eb41..606fe32c 100644 --- a/jedi/plugins/django.py +++ b/jedi/plugins/django.py @@ -1,7 +1,6 @@ """ Module is used to infer Django model fields. Bugs: - - Can't infer User model. - Can't infer ManyToManyField. """ from jedi import debug diff --git a/test/completion/django.py b/test/completion/django.py index f089d956..4baf9ec2 100644 --- a/test/completion/django.py +++ b/test/completion/django.py @@ -2,6 +2,11 @@ import datetime import decimal from django.db import models +from django.contrib.auth.models import User + + +#? str() +User().email class Tag(models.Model): @@ -38,6 +43,9 @@ class BusinessModel(models.Model): unidentifiable = NOT_FOUND +# ----------------- +# Model attribute inference +# ----------------- model_instance = BusinessModel() #? int()