|
3 | 3 | from functools import partial |
4 | 4 | from typing import Any, Callable, Dict, List, Optional, Tuple, Type |
5 | 5 |
|
6 | | -from mypy.build import PRI_MYPY |
| 6 | +from mypy.build import PRI_HIGH, PRI_MYPY |
7 | 7 | from mypy.modulefinder import mypy_path |
8 | 8 | from mypy.nodes import MypyFile, TypeInfo |
9 | 9 | from mypy.options import Options |
@@ -99,14 +99,14 @@ def _get_typeinfo_or_none(self, class_name: str) -> Optional[TypeInfo]: |
99 | 99 | return sym.node |
100 | 100 | return None |
101 | 101 |
|
102 | | - def _new_dependency(self, module: str) -> Tuple[int, str, int]: |
| 102 | + def _new_dependency(self, module: str, priority: int = PRI_MYPY) -> Tuple[int, str, int]: |
103 | 103 | fake_lineno = -1 |
104 | | - return (PRI_MYPY, module, fake_lineno) |
| 104 | + return (priority, module, fake_lineno) |
105 | 105 |
|
106 | 106 | def get_additional_deps(self, file: MypyFile) -> List[Tuple[int, str, int]]: |
107 | 107 | # for settings |
108 | 108 | if file.fullname == "django.conf" and self.django_context.django_settings_module: |
109 | | - return [self._new_dependency(self.django_context.django_settings_module)] |
| 109 | + return [self._new_dependency(self.django_context.django_settings_module, PRI_HIGH)] |
110 | 110 |
|
111 | 111 | # for values / values_list |
112 | 112 | if file.fullname == "django.db.models": |
|
0 commit comments