Skip to content

Commit 7e7520f

Browse files
authored
Merge branch 'main' into main
2 parents d627ecb + abbc92b commit 7e7520f

File tree

6 files changed

+25
-7
lines changed

6 files changed

+25
-7
lines changed

.github/workflows/labeler.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- uses: actions/labeler@v5
20+
if: ${{ github.event.action != 'labeled' && github.event.action != 'unlabeled' }}
21+
- run: echo "Done adding labels"
2022
# Run this after labeler applied labels
2123
check-labels:
2224
needs:

docs/release-notes.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,20 @@
22

33
## Latest Changes
44

5+
### Refactors
6+
7+
* 🚨 Fix types for new Pydantic. PR [#1131](https://github.com/fastapi/sqlmodel/pull/1131) by [@tiangolo](https://github.com/tiangolo).
8+
59
### Docs
610

711
* ✏️ Fix typo in documentation. PR [#1106](https://github.com/fastapi/sqlmodel/pull/1106) by [@Solipsistmonkey](https://github.com/Solipsistmonkey).
812
* 📝 Remove highlights in `indexes.md` . PR [#1100](https://github.com/fastapi/sqlmodel/pull/1100) by [@alejsdev](https://github.com/alejsdev).
913

1014
### Internal
1115

16+
* ➕ Add docs dependency markdown-include-variants. PR [#1129](https://github.com/fastapi/sqlmodel/pull/1129) by [@tiangolo](https://github.com/tiangolo).
17+
* 🔨 Update script to standardize format. PR [#1130](https://github.com/fastapi/sqlmodel/pull/1130) by [@tiangolo](https://github.com/tiangolo).
18+
* 👷 Update `labeler.yml`. PR [#1128](https://github.com/fastapi/sqlmodel/pull/1128) by [@tiangolo](https://github.com/tiangolo).
1219
* 👷 Update worfkow deploy-docs-notify URL. PR [#1126](https://github.com/fastapi/sqlmodel/pull/1126) by [@tiangolo](https://github.com/tiangolo).
1320
* 👷 Upgrade Cloudflare GitHub Action. PR [#1124](https://github.com/fastapi/sqlmodel/pull/1124) by [@tiangolo](https://github.com/tiangolo).
1421
*[pre-commit.ci] pre-commit autoupdate. PR [#1097](https://github.com/fastapi/sqlmodel/pull/1097) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci).

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ markdown_extensions:
184184

185185
# Other extensions
186186
mdx_include:
187+
markdown_include_variants:
187188

188189
extra:
189190
analytics:

requirements-docs.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ cairosvg==2.7.1
1616
# For griffe, it formats with black
1717
typer == 0.12.3
1818
mkdocs-macros-plugin==1.0.5
19+
markdown-include-variants==0.0.1

scripts/format.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
#!/bin/sh -e
1+
#!/usr/bin/env bash
2+
3+
set -e
24
set -x
35

46
ruff check sqlmodel tests docs_src scripts --fix

sqlmodel/main.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
from sqlalchemy.orm.instrumentation import is_instrumented
5353
from sqlalchemy.sql.schema import MetaData
5454
from sqlalchemy.sql.sqltypes import LargeBinary, Time, Uuid
55-
from typing_extensions import Literal, deprecated, get_origin
55+
from typing_extensions import Literal, TypeAlias, deprecated, get_origin
5656

5757
from ._compat import ( # type: ignore[attr-defined]
5858
IS_PYDANTIC_V2,
@@ -90,7 +90,12 @@
9090

9191
_T = TypeVar("_T")
9292
NoArgAnyCallable = Callable[[], Any]
93-
IncEx = Union[Set[int], Set[str], Dict[int, Any], Dict[str, Any], None]
93+
IncEx: TypeAlias = Union[
94+
Set[int],
95+
Set[str],
96+
Mapping[int, Union["IncEx", Literal[True]]],
97+
Mapping[str, Union["IncEx", Literal[True]]],
98+
]
9499
OnDeleteType = Literal["CASCADE", "SET NULL", "RESTRICT"]
95100

96101

@@ -858,8 +863,8 @@ def model_dump(
858863
self,
859864
*,
860865
mode: Union[Literal["json", "python"], str] = "python",
861-
include: IncEx = None,
862-
exclude: IncEx = None,
866+
include: Union[IncEx, None] = None,
867+
exclude: Union[IncEx, None] = None,
863868
context: Union[Dict[str, Any], None] = None,
864869
by_alias: bool = False,
865870
exclude_unset: bool = False,
@@ -908,8 +913,8 @@ def model_dump(
908913
def dict(
909914
self,
910915
*,
911-
include: IncEx = None,
912-
exclude: IncEx = None,
916+
include: Union[IncEx, None] = None,
917+
exclude: Union[IncEx, None] = None,
913918
by_alias: bool = False,
914919
exclude_unset: bool = False,
915920
exclude_defaults: bool = False,

0 commit comments

Comments
 (0)