You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With a new version, couple issues were fixed but got new. In general looks like all explainable.
So I got:
apps/users/models.py:95: error: Incompatible types in assignment (expression has type "UserManager[User]", base class "AbstractUser" defined the type as "UserManager[AbstractUser]")
apps/currencies/amounts.py:150: error: Incompatible types in assignment (expression has type "ForeignKey[Union[Currency, Combinable], Currency]", base class "AmountStringRepresentationMixin" defined the type as "Currency")
apps/currencies/amounts.py:171: error: Cannot determine type of 'currency'
apps/currencies/amounts.py:175: error: Cannot determine type of 'currency'
apps/currencies/amounts.py:177: error: Cannot determine type of 'currency'
apps/demo/models.py:348: error: Cannot determine type of 'objects'
apps/auth/tasks.py:30: error: Cannot determine type of 'objects'
core/tests.py:115: error: Cannot determine type of 'objects'
views/accounts/users.py:139: error: Cannot determine type of 'objects'
views/accounts/users.py:160: error: Cannot determine type of 'objects'
views/auth.py:89: error: Cannot determine type of 'objects'
views/auth.py:317: error: Cannot determine type of 'objects'
views/auth.py:388: error: Cannot determine type of 'objects'
Look like the first two issues are main. If look rest of issues it's:
(For first issue) user = User.objects.get(email=email.lower())
or User.objects.create
or User.objects.get_or_create
(for second) currency=self.currency
or self.currency == other.currency
Looks like if I got some issue with some stuff - rest manipulation in code makes an error.
A little bit code, for reproducing:
(for first issue)
from django.contrib.auth.models import AbstractUser
class User(AbstractUser):
....
objects = UserManager() <----- an error
...
and
from django.contrib.auth.models import BaseUserManager
class UserManager(BaseUserManager):
.....
(for second)
class BaseAmount(AmountStringRepresentationMixin[models.DecimalField],
AmountComparatorMixin[models.DecimalField],
models.Model):
...
currency = models.ForeignKey(Currency, <----- an error
related_name='+',
verbose_name=_('Currency'),
on_delete=models.PROTECT)
...
I will be glad to any advice :)
OS: Ubuntu 18.04.3 LTS
python version: 3.7
django version: 2.2.5
mypy version: 0.720
django-stubs version: 1.1.0
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Bug report
Hello,
With a new version, couple issues were fixed but got new. In general looks like all explainable.
So I got:
Look like the first two issues are main. If look rest of issues it's:
(For first issue)
user = User.objects.get(email=email.lower())
or
User.objects.create
or
User.objects.get_or_create
(for second)
currency=self.currency
or
self.currency == other.currency
Looks like if I got some issue with some stuff - rest manipulation in code makes an error.
A little bit code, for reproducing:
(for first issue)
and
(for second)
I will be glad to any advice :)
python
version: 3.7django
version: 2.2.5mypy
version: 0.720django-stubs
version: 1.1.0The text was updated successfully, but these errors were encountered: