Milo
1 month ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
3 additions and
3 deletions
-
fastapi/_compat/v2.py
-
scripts/add_latest_release_date.py
|
|
|
@ -173,7 +173,7 @@ class ModelField: |
|
|
|
def validate( |
|
|
|
self, |
|
|
|
value: Any, |
|
|
|
values: dict[str, Any] = {}, # noqa: B006 |
|
|
|
values: dict[str, Any] | None = None, |
|
|
|
*, |
|
|
|
loc: tuple[int | str, ...] = (), |
|
|
|
) -> tuple[Any, list[dict[str, Any]]]: |
|
|
|
|
|
|
|
@ -9,7 +9,7 @@ RELEASE_HEADER_PATTERN = re.compile(r"^## (\d+\.\d+\.\d+)\s*(\(.*\))?\s*$") |
|
|
|
|
|
|
|
|
|
|
|
def main() -> None: |
|
|
|
with open(RELEASE_NOTES_FILE) as f: |
|
|
|
with open(RELEASE_NOTES_FILE, encoding="utf-8") as f: |
|
|
|
lines = f.readlines() |
|
|
|
|
|
|
|
for i, line in enumerate(lines): |
|
|
|
@ -28,7 +28,7 @@ def main() -> None: |
|
|
|
lines[i] = f"## {version} ({today})\n" |
|
|
|
print(f"Added date: {version} ({today})") |
|
|
|
|
|
|
|
with open(RELEASE_NOTES_FILE, "w") as f: |
|
|
|
with open(RELEASE_NOTES_FILE, "w", encoding="utf-8") as f: |
|
|
|
f.writelines(lines) |
|
|
|
sys.exit(0) |
|
|
|
|
|
|
|
|