Skip to content

Commit 636dc55

Browse files
committed
use annotations from future (for compatibility)
1 parent a117cd3 commit 636dc55

File tree

4 files changed

+6
-1
lines changed

4 files changed

+6
-1
lines changed

docs/python_snippets/view_dependencies/main_example.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
from fastapi import Depends, Header
24
from pydantic import BaseModel
35
from sqlalchemy.engine import make_url

examples/api_for_sqlalchemy/models/schemas/user.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""User schemas module."""
2+
from __future__ import annotations
23

34
from datetime import datetime
45
from typing import TYPE_CHECKING, List, Optional

examples/api_for_sqlalchemy/models/user.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""User model."""
2-
2+
from __future__ import annotations
33

44
from sqlalchemy import Column, Integer, String
55
from sqlalchemy.orm import relationship

tests/fixtures/entities.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
from typing import Awaitable, Callable, List
24

35
from pytest import fixture # noqa

0 commit comments

Comments
 (0)