✨ Improve type annotations, add support for mypy --strict, internally and for external packages (#2547)

This commit is contained in:
Sebastián Ramírez authored and GitHub committed 2020-12-20 19:50:00 +01:00
1 parent 4fdcdf341c
commit fdb6c9ccc5
43 files changed
+314 -244

No files matched your search

+2 -2
View File
@@ -5,7 +5,7 @@ from fastapi.logger import logger
from pydantic import AnyUrl, BaseModel, Field
try:
import email_validator
import email_validator # type: ignore
assert email_validator # make autoflake ignore the unused import
from pydantic import EmailStr
@@ -13,7 +13,7 @@ except ImportError: # pragma: no cover
class EmailStr(str): # type: ignore
@classmethod
def __get_validators__(cls) -> Iterable[Callable]:
def __get_validators__(cls) -> Iterable[Callable[..., Any]]:
yield cls.validate
@classmethod