Skip to content

Commit f407728

Browse files
committed
Updated if False checks to if TYPE_CHECKING, and updated docs to latest
1 parent 0148e6f commit f407728

File tree

18 files changed

+59
-54
lines changed

18 files changed

+59
-54
lines changed

docs/src/lib/content/project.ts

Lines changed: 25 additions & 25 deletions
Large diffs are not rendered by default.

sqliteframe/entity/column.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
"""
44

55
from __future__ import annotations
6+
from typing import TYPE_CHECKING
67
from dataclasses import dataclass, field
78
from ..types import Type
89
from ..where import Comparisons, Condition
910
from ..foreign_key import ForeignKey
10-
if False:
11+
if TYPE_CHECKING:
1112
from .entity import Entity
1213

1314

sqliteframe/entity/entity.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
"""
44

55
from __future__ import annotations
6-
from typing import TypeVar, Literal, Iterable, Optional, Callable, Iterator
6+
from typing import TypeVar, Literal, Iterable, Optional, Callable, Iterator, TYPE_CHECKING
77
from pprint import pformat
88
from inspect import getmembers, isroutine
99
from .column import Column
1010
from ..types import Type
1111
from ..statements import InsertInto, Set, CreateTable, Select, DeleteFrom, DropTable
1212
from ..wildcards import Wildcards
1313
from ..foreign_key import ForeignKey
14-
if False:
14+
if TYPE_CHECKING:
1515
from ..database import Database
1616

1717

sqliteframe/foreign_key/foreign_key.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
from __future__ import annotations
66
from functools import cached_property
7-
from typing import TypeVar, Optional, Callable
7+
from typing import TypeVar, Optional, Callable, TYPE_CHECKING
88
from .restraints import Restraints
99
from ..types import Type
10-
if False:
10+
if TYPE_CHECKING:
1111
from ..entity import Entity, Column
1212

1313

sqliteframe/join/join.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
"""
44

55
from __future__ import annotations
6+
from typing import TYPE_CHECKING
67
from .join_types import JoinTypes
78
from ..where import Condition, Where
8-
if False:
9+
if TYPE_CHECKING:
910
from sqliteframe.entity import Entity
1011

1112

sqliteframe/order_by/order_by.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
"""
44

55
from __future__ import annotations
6+
from typing import TYPE_CHECKING
67
from .order_types import OrderTypes
7-
if False:
8+
if TYPE_CHECKING:
89
from sqliteframe.entity import Column
910

1011

sqliteframe/parameterized/parameterized.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44

55
from __future__ import annotations
66
from abc import ABC, abstractmethod
7-
from typing import Literal
8-
9-
if False:
7+
from typing import Literal, TYPE_CHECKING
8+
if TYPE_CHECKING:
109
from ..statements import Statement
1110

1211

sqliteframe/result/result.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33
"""
44

55
from __future__ import annotations
6-
from typing import Iterator
6+
from typing import Iterator, TypeVar, TYPE_CHECKING
77
from sqlite3 import Cursor
8-
if False:
9-
from typing import TypeVar
8+
if TYPE_CHECKING:
109
from sqliteframe.entity import Column
1110
ColumnT = TypeVar("ColumnT", bound=Column)
1211

sqliteframe/statements/create_table.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
"""
44

55
from __future__ import annotations
6+
from typing import TYPE_CHECKING
67
from .statement import Statement
7-
if False:
8+
if TYPE_CHECKING:
89
from ..entity import Column, Entity
910

1011

sqliteframe/statements/delete_from.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
"""
44

55
from __future__ import annotations
6+
from typing import TYPE_CHECKING
67
from .statement import Statement
78
from ..where import Where, Condition
8-
if False:
9+
if TYPE_CHECKING:
910
from ..entity import Entity
1011

1112

0 commit comments

Comments
 (0)