Skip to content

Commit

Permalink
🎨 Format again after fixing pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
tiangolo committed Jun 4, 2024
1 parent 4bec513 commit 4ef0bb4
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 74 deletions.
6 changes: 2 additions & 4 deletions sqlmodel/ext/asyncio/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ async def exec(
bind_arguments: Optional[Dict[str, Any]] = None,
_parent_execute_state: Optional[Any] = None,
_add_event: Optional[Any] = None,
) -> TupleResult[_TSelectParam]:
...
) -> TupleResult[_TSelectParam]: ...

@overload
async def exec(
Expand All @@ -56,8 +55,7 @@ async def exec(
bind_arguments: Optional[Dict[str, Any]] = None,
_parent_execute_state: Optional[Any] = None,
_add_event: Optional[Any] = None,
) -> ScalarResult[_TSelectParam]:
...
) -> ScalarResult[_TSelectParam]: ...

async def exec(
self,
Expand Down
12 changes: 4 additions & 8 deletions sqlmodel/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,7 @@ def Field(
sa_column_args: Union[Sequence[Any], UndefinedType] = Undefined,
sa_column_kwargs: Union[Mapping[str, Any], UndefinedType] = Undefined,
schema_extra: Optional[Dict[str, Any]] = None,
) -> Any:
...
) -> Any: ...


@overload
Expand Down Expand Up @@ -268,8 +267,7 @@ def Field(
repr: bool = True,
sa_column: Union[Column, UndefinedType] = Undefined, # type: ignore
schema_extra: Optional[Dict[str, Any]] = None,
) -> Any:
...
) -> Any: ...


def Field(
Expand Down Expand Up @@ -361,8 +359,7 @@ def Relationship(
link_model: Optional[Any] = None,
sa_relationship_args: Optional[Sequence[Any]] = None,
sa_relationship_kwargs: Optional[Mapping[str, Any]] = None,
) -> Any:
...
) -> Any: ...


@overload
Expand All @@ -371,8 +368,7 @@ def Relationship(
back_populates: Optional[str] = None,
link_model: Optional[Any] = None,
sa_relationship: Optional[RelationshipProperty[Any]] = None,
) -> Any:
...
) -> Any: ...


def Relationship(
Expand Down
6 changes: 2 additions & 4 deletions sqlmodel/orm/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ def exec(
bind_arguments: Optional[Dict[str, Any]] = None,
_parent_execute_state: Optional[Any] = None,
_add_event: Optional[Any] = None,
) -> TupleResult[_TSelectParam]:
...
) -> TupleResult[_TSelectParam]: ...

@overload
def exec(
Expand All @@ -48,8 +47,7 @@ def exec(
bind_arguments: Optional[Dict[str, Any]] = None,
_parent_execute_state: Optional[Any] = None,
_add_event: Optional[Any] = None,
) -> ScalarResult[_TSelectParam]:
...
) -> ScalarResult[_TSelectParam]: ...

def exec(
self,
Expand Down
87 changes: 29 additions & 58 deletions sqlmodel/sql/_expression_select_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,7 @@


@overload
def select(__ent0: _TCCA[_T0]) -> SelectOfScalar[_T0]:
...
def select(__ent0: _TCCA[_T0]) -> SelectOfScalar[_T0]: ...


@overload
Expand All @@ -127,104 +126,92 @@ def select(__ent0: _TScalar_0) -> SelectOfScalar[_TScalar_0]: # type: ignore
def select( # type: ignore
__ent0: _TCCA[_T0],
__ent1: _TCCA[_T1],
) -> Select[Tuple[_T0, _T1]]:
...
) -> Select[Tuple[_T0, _T1]]: ...


@overload
def select( # type: ignore
__ent0: _TCCA[_T0],
entity_1: _TScalar_1,
) -> Select[Tuple[_T0, _TScalar_1]]:
...
) -> Select[Tuple[_T0, _TScalar_1]]: ...


@overload
def select( # type: ignore
entity_0: _TScalar_0,
__ent1: _TCCA[_T1],
) -> Select[Tuple[_TScalar_0, _T1]]:
...
) -> Select[Tuple[_TScalar_0, _T1]]: ...


@overload
def select( # type: ignore
entity_0: _TScalar_0,
entity_1: _TScalar_1,
) -> Select[Tuple[_TScalar_0, _TScalar_1]]:
...
) -> Select[Tuple[_TScalar_0, _TScalar_1]]: ...


@overload
def select( # type: ignore
__ent0: _TCCA[_T0],
__ent1: _TCCA[_T1],
__ent2: _TCCA[_T2],
) -> Select[Tuple[_T0, _T1, _T2]]:
...
) -> Select[Tuple[_T0, _T1, _T2]]: ...


@overload
def select( # type: ignore
__ent0: _TCCA[_T0],
__ent1: _TCCA[_T1],
entity_2: _TScalar_2,
) -> Select[Tuple[_T0, _T1, _TScalar_2]]:
...
) -> Select[Tuple[_T0, _T1, _TScalar_2]]: ...


@overload
def select( # type: ignore
__ent0: _TCCA[_T0],
entity_1: _TScalar_1,
__ent2: _TCCA[_T2],
) -> Select[Tuple[_T0, _TScalar_1, _T2]]:
...
) -> Select[Tuple[_T0, _TScalar_1, _T2]]: ...


@overload
def select( # type: ignore
__ent0: _TCCA[_T0],
entity_1: _TScalar_1,
entity_2: _TScalar_2,
) -> Select[Tuple[_T0, _TScalar_1, _TScalar_2]]:
...
) -> Select[Tuple[_T0, _TScalar_1, _TScalar_2]]: ...


@overload
def select( # type: ignore
entity_0: _TScalar_0,
__ent1: _TCCA[_T1],
__ent2: _TCCA[_T2],
) -> Select[Tuple[_TScalar_0, _T1, _T2]]:
...
) -> Select[Tuple[_TScalar_0, _T1, _T2]]: ...


@overload
def select( # type: ignore
entity_0: _TScalar_0,
__ent1: _TCCA[_T1],
entity_2: _TScalar_2,
) -> Select[Tuple[_TScalar_0, _T1, _TScalar_2]]:
...
) -> Select[Tuple[_TScalar_0, _T1, _TScalar_2]]: ...


@overload
def select( # type: ignore
entity_0: _TScalar_0,
entity_1: _TScalar_1,
__ent2: _TCCA[_T2],
) -> Select[Tuple[_TScalar_0, _TScalar_1, _T2]]:
...
) -> Select[Tuple[_TScalar_0, _TScalar_1, _T2]]: ...


@overload
def select( # type: ignore
entity_0: _TScalar_0,
entity_1: _TScalar_1,
entity_2: _TScalar_2,
) -> Select[Tuple[_TScalar_0, _TScalar_1, _TScalar_2]]:
...
) -> Select[Tuple[_TScalar_0, _TScalar_1, _TScalar_2]]: ...


@overload
Expand All @@ -233,8 +220,7 @@ def select( # type: ignore
__ent1: _TCCA[_T1],
__ent2: _TCCA[_T2],
__ent3: _TCCA[_T3],
) -> Select[Tuple[_T0, _T1, _T2, _T3]]:
...
) -> Select[Tuple[_T0, _T1, _T2, _T3]]: ...


@overload
Expand All @@ -243,8 +229,7 @@ def select( # type: ignore
__ent1: _TCCA[_T1],
__ent2: _TCCA[_T2],
entity_3: _TScalar_3,
) -> Select[Tuple[_T0, _T1, _T2, _TScalar_3]]:
...
) -> Select[Tuple[_T0, _T1, _T2, _TScalar_3]]: ...


@overload
Expand All @@ -253,8 +238,7 @@ def select( # type: ignore
__ent1: _TCCA[_T1],
entity_2: _TScalar_2,
__ent3: _TCCA[_T3],
) -> Select[Tuple[_T0, _T1, _TScalar_2, _T3]]:
...
) -> Select[Tuple[_T0, _T1, _TScalar_2, _T3]]: ...


@overload
Expand All @@ -263,8 +247,7 @@ def select( # type: ignore
__ent1: _TCCA[_T1],
entity_2: _TScalar_2,
entity_3: _TScalar_3,
) -> Select[Tuple[_T0, _T1, _TScalar_2, _TScalar_3]]:
...
) -> Select[Tuple[_T0, _T1, _TScalar_2, _TScalar_3]]: ...


@overload
Expand All @@ -273,8 +256,7 @@ def select( # type: ignore
entity_1: _TScalar_1,
__ent2: _TCCA[_T2],
__ent3: _TCCA[_T3],
) -> Select[Tuple[_T0, _TScalar_1, _T2, _T3]]:
...
) -> Select[Tuple[_T0, _TScalar_1, _T2, _T3]]: ...


@overload
Expand All @@ -283,8 +265,7 @@ def select( # type: ignore
entity_1: _TScalar_1,
__ent2: _TCCA[_T2],
entity_3: _TScalar_3,
) -> Select[Tuple[_T0, _TScalar_1, _T2, _TScalar_3]]:
...
) -> Select[Tuple[_T0, _TScalar_1, _T2, _TScalar_3]]: ...


@overload
Expand All @@ -293,8 +274,7 @@ def select( # type: ignore
entity_1: _TScalar_1,
entity_2: _TScalar_2,
__ent3: _TCCA[_T3],
) -> Select[Tuple[_T0, _TScalar_1, _TScalar_2, _T3]]:
...
) -> Select[Tuple[_T0, _TScalar_1, _TScalar_2, _T3]]: ...


@overload
Expand All @@ -303,8 +283,7 @@ def select( # type: ignore
entity_1: _TScalar_1,
entity_2: _TScalar_2,
entity_3: _TScalar_3,
) -> Select[Tuple[_T0, _TScalar_1, _TScalar_2, _TScalar_3]]:
...
) -> Select[Tuple[_T0, _TScalar_1, _TScalar_2, _TScalar_3]]: ...


@overload
Expand All @@ -313,8 +292,7 @@ def select( # type: ignore
__ent1: _TCCA[_T1],
__ent2: _TCCA[_T2],
__ent3: _TCCA[_T3],
) -> Select[Tuple[_TScalar_0, _T1, _T2, _T3]]:
...
) -> Select[Tuple[_TScalar_0, _T1, _T2, _T3]]: ...


@overload
Expand All @@ -323,8 +301,7 @@ def select( # type: ignore
__ent1: _TCCA[_T1],
__ent2: _TCCA[_T2],
entity_3: _TScalar_3,
) -> Select[Tuple[_TScalar_0, _T1, _T2, _TScalar_3]]:
...
) -> Select[Tuple[_TScalar_0, _T1, _T2, _TScalar_3]]: ...


@overload
Expand All @@ -333,8 +310,7 @@ def select( # type: ignore
__ent1: _TCCA[_T1],
entity_2: _TScalar_2,
__ent3: _TCCA[_T3],
) -> Select[Tuple[_TScalar_0, _T1, _TScalar_2, _T3]]:
...
) -> Select[Tuple[_TScalar_0, _T1, _TScalar_2, _T3]]: ...


@overload
Expand All @@ -343,8 +319,7 @@ def select( # type: ignore
__ent1: _TCCA[_T1],
entity_2: _TScalar_2,
entity_3: _TScalar_3,
) -> Select[Tuple[_TScalar_0, _T1, _TScalar_2, _TScalar_3]]:
...
) -> Select[Tuple[_TScalar_0, _T1, _TScalar_2, _TScalar_3]]: ...


@overload
Expand All @@ -353,8 +328,7 @@ def select( # type: ignore
entity_1: _TScalar_1,
__ent2: _TCCA[_T2],
__ent3: _TCCA[_T3],
) -> Select[Tuple[_TScalar_0, _TScalar_1, _T2, _T3]]:
...
) -> Select[Tuple[_TScalar_0, _TScalar_1, _T2, _T3]]: ...


@overload
Expand All @@ -363,8 +337,7 @@ def select( # type: ignore
entity_1: _TScalar_1,
__ent2: _TCCA[_T2],
entity_3: _TScalar_3,
) -> Select[Tuple[_TScalar_0, _TScalar_1, _T2, _TScalar_3]]:
...
) -> Select[Tuple[_TScalar_0, _TScalar_1, _T2, _TScalar_3]]: ...


@overload
Expand All @@ -373,8 +346,7 @@ def select( # type: ignore
entity_1: _TScalar_1,
entity_2: _TScalar_2,
__ent3: _TCCA[_T3],
) -> Select[Tuple[_TScalar_0, _TScalar_1, _TScalar_2, _T3]]:
...
) -> Select[Tuple[_TScalar_0, _TScalar_1, _TScalar_2, _T3]]: ...


@overload
Expand All @@ -383,8 +355,7 @@ def select( # type: ignore
entity_1: _TScalar_1,
entity_2: _TScalar_2,
entity_3: _TScalar_3,
) -> Select[Tuple[_TScalar_0, _TScalar_1, _TScalar_2, _TScalar_3]]:
...
) -> Select[Tuple[_TScalar_0, _TScalar_1, _TScalar_2, _TScalar_3]]: ...


# Generated overloads end
Expand Down

0 comments on commit 4ef0bb4

Please sign in to comment.