Upgraded the required versions of mypy and django-stubs to the latest that support Django 2.2. Fixed some issues found by after the upgrades.

- Legacy-Id: 18717
This commit is contained in:
Henrik Levkowetz 2020-11-22 21:13:36 +00:00
parent b5f1e3af34
commit f41fd1867d
8 changed files with 12 additions and 11 deletions

View file

@ -246,7 +246,7 @@ class ChangePasswordForm(forms.Form):
class ChangeUsernameForm(forms.Form):
username = forms.ChoiceField(choices=['-','--------'])
username = forms.ChoiceField(choices=[('-','--------')])
password = forms.CharField(widget=forms.PasswordInput, help_text="Confirm the change with your password")
def __init__(self, user, *args, **kwargs):

View file

@ -50,8 +50,7 @@ from django.contrib.auth.hashers import identify_hasher
from django.contrib.auth.models import User
from django.contrib.auth.views import LoginView
from django.contrib.sites.models import Site
from django.core.exceptions import ObjectDoesNotExist
from django.core.validators import ValidationError
from django.core.exceptions import ObjectDoesNotExist, ValidationError
from django.urls import reverse as urlreverse
from django.utils.safestring import mark_safe
from django.http import Http404, HttpResponseRedirect #, HttpResponse,

View file

@ -13,12 +13,12 @@ from form_utils.forms import BetterModelForm
from django import forms
from django.conf import settings
from django.core.exceptions import ObjectDoesNotExist
from django.core.exceptions import ObjectDoesNotExist, ValidationError
from django.db.models.query import QuerySet
from django.forms.utils import ErrorList
from django.db.models import Q
#from django.forms.widgets import RadioFieldRenderer
from django.core.validators import validate_email, ValidationError
from django.core.validators import validate_email
import debug # pyflakes:ignore

View file

@ -7,7 +7,8 @@ from email.utils import parseaddr
from django.contrib import messages
from django.urls import reverse as urlreverse
from django.core.validators import validate_email, ValidationError
from django.core.exceptions import ValidationError
from django.core.validators import validate_email
from django.db.models import Q, Prefetch
from django.http import HttpResponse
from django.shortcuts import render, get_object_or_404, redirect

View file

@ -11,7 +11,7 @@ import pyzmail
from django.conf import settings
from django.urls import reverse as urlreverse
from django.core.validators import ValidationError
from django.core.exceptions import ValidationError
from django.contrib.sites.models import Site
from django.template.loader import render_to_string
from django.utils.encoding import force_text, force_str

View file

@ -12,7 +12,8 @@ import time
from typing import Callable, Optional # pyflakes:ignore
from django.conf import settings
from django.core.validators import validate_email, ValidationError
from django.core.exceptions import ValidationError
from django.core.validators import validate_email
from django.db import transaction
from django.http import HttpRequest # pyflakes:ignore
from django.utils.module_loading import import_string

View file

@ -13,7 +13,7 @@ from django.contrib import messages
from django.contrib.auth.models import User
from django.db import DataError
from django.urls import reverse as urlreverse
from django.core.validators import ValidationError
from django.core.exceptions import ValidationError
from django.http import HttpResponseRedirect, Http404, HttpResponseForbidden, HttpResponse
from django.http import HttpRequest # pyflakes:ignore
from django.shortcuts import get_object_or_404, redirect, render

View file

@ -20,7 +20,7 @@ django-oidc-provider>=0.7
django-password-strength>=1.2.1
django-referrer-policy>=1.0
django-simple-history>=2.3.0
django-stubs==1.3.0 # The django-stubs version used determines the the mypy version indicated below
django-stubs==1.6.0 # The django-stubs version used determines the the mypy version indicated below
django-tastypie>=0.14.3 # Django 2.1 will require 0.14.2; Django 3.0 will require 0.14.3
django-webtest>=1.9.7
django-widget-tweaks>=1.4.2
@ -38,7 +38,7 @@ logging_tree>=1.8.1
lxml>=3.4.0,<5
markdown2>=2.3.8
mock>=2.0.0
mypy==0.750 # Version requirements determined by django-stubs.
mypy>=0.782,<0.790 # Version requirements determined by django-stubs.
mysqlclient>=1.3.13
oic>=1.2
pathlib>=1.0