mirror of
https://github.com/fastapi-users/fastapi-users.git
synced 2025-08-15 03:04:27 +08:00
Use Protocol
from typing if available (#402)
Some of the 'experimental' definitions in typing_extensions are added to the typing module in time. This PR prefers the stdlib imports when available, falling back to typing_extensions as necessary
This commit is contained in:
@ -1,6 +1,9 @@
|
||||
from typing import Awaitable, Type
|
||||
|
||||
from typing_extensions import Protocol
|
||||
try:
|
||||
from typing import Protocol
|
||||
except:
|
||||
from typing_extensions import Protocol
|
||||
|
||||
from fastapi_users import models
|
||||
from fastapi_users.db import BaseUserDatabase
|
||||
|
Reference in New Issue
Block a user