diff --git a/mypy-requirements.txt b/mypy-requirements.txt index 972727f4f..152dfc2f9 100644 --- a/mypy-requirements.txt +++ b/mypy-requirements.txt @@ -1,4 +1,4 @@ -mypy==1.6.1 # update pyproject.toml as well +mypy[mypyc]==1.7.0 # update pyproject.toml as well black>=19.10b0 types-pkg_resources types-requests diff --git a/mypy-stubs/mistune/scanner.pyi b/mypy-stubs/mistune/scanner.pyi index 73bc8bd39..7d62b8c92 100644 --- a/mypy-stubs/mistune/scanner.pyi +++ b/mypy-stubs/mistune/scanner.pyi @@ -16,7 +16,7 @@ from typing import ( from mistune._types import State from typing_extensions import TypeAlias -MethodFunc: TypeAlias = Callable[["ScannerParser", Match, State], Any] +MethodFunc: TypeAlias = Callable[["ScannerParser", Match[str], State], Any] RuleMethod = Tuple[Pattern[str], MethodFunc] Lexicon = List[Tuple[Pattern[str], Tuple[str, RuleMethod]]] TextParser = Callable[[str, State], str] diff --git a/mypy.ini b/mypy.ini index 7cee2ab52..b13ad92b1 100644 --- a/mypy.ini +++ b/mypy.ini @@ -5,4 +5,3 @@ show_column_numbers = true show_error_codes = true pretty = true warn_unreachable = True -new_type_inference = True diff --git a/pyproject.toml b/pyproject.toml index b1cfd54d2..990772015 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,14 +1,14 @@ [build-system] requires = [ - "setuptools>=45", + "setuptools>=50", # 50 is to match mypyc's minimum "setuptools_scm[toml]>=8.0.4,<9", - 'mypy==1.6.0', # update mypy-requirements as well - "black>=19.10b0", + 'mypy[mypyc]==1.7.0', # update mypy-requirements as well + "black>=19.10b0,<23.12", "types-pkg_resources", "types-requests", "types-dataclasses", "importlib_resources>=1.4", # equivalent to Python 3.9 - "ruamel.yaml>= 0.12.4, != 0.16.6, < 0.18", + "ruamel.yaml>=0.17.6, < 0.19", "types-setuptools" ] build-backend = "setuptools.build_meta" diff --git a/requirements.txt b/requirements.txt index 2171d404f..34b5eecd4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,7 @@ ruamel.yaml >= 0.17.6, < 0.19 rdflib>= 4.2.2, < 8.0.0 mistune>=2.0.3,<2.1 CacheControl[filecache]>= 0.11.7, < 0.14 -black<23.12 +black>=19.10b0,<23.12 mypy_extensions importlib_resources>=1.4 # ^^ equivalent to Python 3.9