From fed97182f4e8940bb032a224c5cbcd007a8bd722 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Tue, 7 Mar 2017 18:58:32 -0600 Subject: [PATCH] Fix missing Dict/List typing imports --- course/content.py | 2 +- course/enrollment.py | 2 +- course/flow.py | 2 +- course/grades.py | 2 +- course/grading.py | 2 +- course/im.py | 2 ++ course/models.py | 1 + course/page/base.py | 2 +- course/utils.py | 2 +- course/validation.py | 2 +- course/versioning.py | 2 +- course/views.py | 2 +- relate/settings.py | 2 +- 13 files changed, 14 insertions(+), 11 deletions(-) diff --git a/course/content.py b/course/content.py index d6456960..8bd657cc 100644 --- a/course/content.py +++ b/course/content.py @@ -59,7 +59,7 @@ else: # {{{ mypy from typing import ( # noqa - cast, Union, Any, List, Tuple, Optional, Callable, Text) + cast, Union, Any, List, Tuple, Optional, Callable, Text, Dict) if False: # for mypy diff --git a/course/enrollment.py b/course/enrollment.py index 0bc31df9..b5bb5a1a 100644 --- a/course/enrollment.py +++ b/course/enrollment.py @@ -71,7 +71,7 @@ from pytools.lex import RE as REBase # noqa # {{{ for mypy -from typing import Any, Tuple, Text, Optional # noqa +from typing import Any, Tuple, Text, Optional, List # noqa from course.utils import CoursePageContext # noqa # }}} diff --git a/course/flow.py b/course/flow.py index b98d1f59..04c94c38 100644 --- a/course/flow.py +++ b/course/flow.py @@ -84,7 +84,7 @@ from relate.utils import retry_transaction_decorator # {{{ mypy -from typing import Any, Optional, Iterable, Tuple, Text # noqa +from typing import Any, Optional, Iterable, Tuple, Text, List # noqa import datetime # noqa from course.models import ( # noqa Course, diff --git a/course/grades.py b/course/grades.py index 2c438a6f..7c3024fa 100644 --- a/course/grades.py +++ b/course/grades.py @@ -59,7 +59,7 @@ from course.constants import ( # {{{ for mypy -from typing import cast, Tuple, Text, Optional, Any, Iterable # noqa +from typing import cast, Tuple, Text, Optional, Any, Iterable, List # noqa from course.utils import CoursePageContext # noqa from course.content import FlowDesc # noqa from course.models import Course, FlowPageVisitGrade # noqa diff --git a/course/grading.py b/course/grading.py index fe47e127..ca0c2ab9 100644 --- a/course/grading.py +++ b/course/grading.py @@ -55,7 +55,7 @@ from course.constants import ( # {{{ for mypy -from typing import Text, Any, Optional # noqa +from typing import Text, Any, Optional, Dict # noqa from course.models import ( # noqa GradingOpportunity) from course.utils import ( # noqa diff --git a/course/im.py b/course/im.py index 612b14cd..1deac9c9 100644 --- a/course/im.py +++ b/course/im.py @@ -46,6 +46,8 @@ import sleekxmpp import threading +from typing import List, Dict # noqa + # {{{ instant message diff --git a/course/models.py b/course/models.py index b0256e2a..2fc56275 100644 --- a/course/models.py +++ b/course/models.py @@ -59,6 +59,7 @@ from course.page.base import AnswerFeedback # {{{ mypy +from typing import List, Dict # noqa if False: from course.content import FlowDesc # noqa diff --git a/course/page/base.py b/course/page/base.py index 1a2439f6..7b861a55 100644 --- a/course/page/base.py +++ b/course/page/base.py @@ -44,7 +44,7 @@ from django.conf import settings # {{{ mypy -from typing import Text, Optional, Any, Tuple # noqa +from typing import Text, Optional, Any, Tuple, Dict # noqa from django import http # noqa if False: diff --git a/course/utils.py b/course/utils.py index 5773dde8..54de5de2 100644 --- a/course/utils.py +++ b/course/utils.py @@ -55,7 +55,7 @@ from course.page.base import ( # noqa # {{{ mypy if False: - from typing import Tuple, List, Text, Iterable, Any, Optional, Union # noqa + from typing import Tuple, List, Text, Iterable, Any, Optional, Union, Dict # noqa from relate.utils import Repo_ish # noqa from course.models import ( # noqa Course, diff --git a/course/validation.py b/course/validation.py index ed1d4bdd..287570e1 100644 --- a/course/validation.py +++ b/course/validation.py @@ -43,7 +43,7 @@ from relate.utils import Struct # {{{ mypy -from typing import Any, Tuple, Optional, Text # noqa +from typing import Any, Tuple, Optional, Text, List # noqa if False: from relate.utils import Repo_ish # noqa from course.models import Course # noqa diff --git a/course/versioning.py b/course/versioning.py index 943e04ff..3e718cc5 100644 --- a/course/versioning.py +++ b/course/versioning.py @@ -67,7 +67,7 @@ from course.constants import ( # {{{ for mypy from django import http # noqa -from typing import Tuple, List, Text, Any # noqa +from typing import Tuple, List, Text, Any, Dict # noqa from dulwich.client import GitClient # noqa # }}} diff --git a/course/views.py b/course/views.py index f1edc651..716d7b84 100644 --- a/course/views.py +++ b/course/views.py @@ -82,7 +82,7 @@ from course.utils import ( # noqa # {{{ for mypy -from typing import Tuple, List, Text, Optional, Any, Iterable # noqa +from typing import Tuple, List, Text, Optional, Any, Iterable, Dict # noqa from course.content import ( # noqa FlowDesc, diff --git a/relate/settings.py b/relate/settings.py index 18a658ea..fe2edd5f 100644 --- a/relate/settings.py +++ b/relate/settings.py @@ -6,7 +6,7 @@ Django settings for RELATE. if False: # for mypy - from typing import Callable, Any, Union # noqa + from typing import Callable, Any, Union, Dict # noqa # Do not change this file. All these settings can be overridden in # local_settings.py. -- GitLab