Skip to content
Snippets Groups Projects
Commit 68d27741 authored by Antoine Lambert's avatar Antoine Lambert
Browse files

mypy: Bump to 1.0 and fix new typing errors

Related to swh/meta#4960
parent 4f3d8c12
No related branches found
No related tags found
No related merge requests found
Pipeline #858 failed
......@@ -19,7 +19,7 @@ class SortedList(Generic[SortedListKey, SortedListItem]):
def __init__(
self,
data: List[SortedListItem] = None,
data: List[SortedListItem] = [],
key: Optional[Callable[[SortedListItem], SortedListKey]] = None,
):
if key is None:
......
......@@ -8,7 +8,7 @@ import datetime
from enum import IntEnum
import inspect
from string import printable
from typing import Any
from typing import Any, Callable
from unittest.mock import MagicMock, Mock
import uuid
......@@ -17,17 +17,12 @@ from hypothesis.extra.pytz import timezones
import psycopg2
import pytest
from pytest_postgresql import factories
from typing_extensions import Protocol
from swh.core.db import BaseDb
from swh.core.db.common import db_transaction, db_transaction_generator
from swh.core.db.tests.conftest import function_scoped_fixture_check
# workaround mypy bug https://github.com/python/mypy/issues/5485
class Converter(Protocol):
def __call__(self, x: Any) -> Any:
...
Converter = Callable[[Any], Any]
@dataclass
......
......@@ -50,7 +50,7 @@ extras =
http
github
deps =
mypy==0.942
mypy==1.0
commands =
mypy swh
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment