Skip to content

Commit 8dd992d

Browse files
committed
Update pyright and mypy and fix all new issues they detected
1 parent 42ac645 commit 8dd992d

File tree

8 files changed

+137
-83
lines changed

8 files changed

+137
-83
lines changed

django-stubs/db/models/fields/__init__.pyi

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1058,7 +1058,9 @@ class DateTimeCheckMixin: ...
10581058

10591059
_D = TypeVar("_D", bound=Optional[date])
10601060

1061-
class DateField(Generic[_D], DateTimeCheckMixin, Field[Union[str, date, Combinable], date]):
1061+
class DateField(
1062+
Generic[_D], DateTimeCheckMixin, Field[Union[str, date, Combinable], date]
1063+
):
10621064
@overload
10631065
def __init__(
10641066
self: DateField[date],

django-stubs/db/models/sql/query.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class JoinInfo(NamedTuple):
3636
class RawQuery:
3737
high_mark: Optional[int]
3838
low_mark: Optional[int]
39-
params: Union[Any] = ...
39+
params: Any = ...
4040
sql: str = ...
4141
using: str = ...
4242
extra_select: Dict[Any, Any] = ...

django-stubs/utils/translation/__init__.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class TranslatorCommentWarning(SyntaxWarning): ...
1212

1313
class Trans:
1414
activate: Callable[..., Any]
15-
check_for_language: functools._lru_cache_wrapper[Any]
15+
check_for_language: functools._lru_cache_wrapper[Any, Any] # type: ignore [type-arg]
1616
deactivate: Callable[..., Any]
1717
deactivate_all: Callable[..., Any]
1818
get_language: Callable[..., Any]

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"devDependencies": {
3-
"pyright": "^1.1.181"
3+
"pyright": "1.1.188"
44
}
55
}

poetry.lock

Lines changed: 122 additions & 72 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

psycopg2-stubs/extras.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ class DictCursor(DictCursorBase):
6060
class DictRow(List[Any]):
6161
_index: OrderedDict[str, int]
6262
def __init__(self, cursor: DictCursor) -> None: ...
63-
def __getitem__(self, x: Union[str, int, slice]) -> Any: ...
64-
def __setitem__(self, x: Union[str, int, slice], v: Any) -> None: ...
63+
def __getitem__(self, x: Union[str, int, slice]) -> Any: ... # type: ignore [override]
64+
def __setitem__(self, x: Union[str, int, slice], v: Any) -> None: ... # type: ignore [override]
6565
def items(self) -> Iterator[Tuple[str, Any]]: ...
6666
def keys(self) -> Iterator[str]: ...
6767
def values(self) -> Iterator[Any]: ...

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,14 @@ python = "^3.6.2"
2020
black = "21.9b0"
2121
pytest = "6.2.2"
2222
wheel = "0.35.1"
23-
mypy = "0.790"
23+
mypy = "0.910"
2424
isort = "5.9.3"
2525
Django = "3.1.7"
2626
flake8 = "4.0.1"
2727
psycopg2 = "2.8.6"
2828
flake8-pyi = "^20.10.0"
29+
types-PyYAML = "^6.0.1"
30+
types-pytz = "^2021.3.0"
2931

3032
[tool.black]
3133
line-length = 88

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# yarn lockfile v1
33

44

5-
pyright@^1.1.181:
6-
version "1.1.181"
7-
resolved "https://registry.yarnpkg.com/pyright/-/pyright-1.1.181.tgz#a86eac21531c6542f9500ea96e39342b65d31acd"
8-
integrity sha512-YuBEA9qwGYNeTBpUtlFKYlNmK8X3/hz/wTRkfR6Z2HDLBQSOpqmNAu/lWrzDnJopSvXwK2qNrW0zFjCE1I4dzg==
5+
6+
version "1.1.188"
7+
resolved "https://registry.yarnpkg.com/pyright/-/pyright-1.1.188.tgz#1b5c5787f626cfe9baa0cc4584a99125ed4a3281"
8+
integrity sha512-9ypjVwXwVroIzo/atn3hvfOuyH/eBRQMr2ayIN/+rqKmx4haNxuCdV/WnYa5QIH6l4LFSMV+rTHLRISIFMv+1w==

0 commit comments

Comments
 (0)