添加注册登录功能

This commit is contained in:
2025-08-29 00:34:40 +08:00
parent 09065f2ce7
commit 2fe3474d9e
3060 changed files with 29217 additions and 87137 deletions

View File

@@ -5,9 +5,7 @@
# This module is part of SQLAlchemy and is released under
# the MIT License: https://www.opensource.org/licenses/mit-license.php
"""Constants and rudimental functions used throughout the ORM.
"""
"""Constants and rudimental functions used throughout the ORM."""
from __future__ import annotations
@@ -435,7 +433,7 @@ def _inspect_mapped_object(instance: _T) -> Optional[InstanceState[_T]]:
def _class_to_mapper(
class_or_mapper: Union[Mapper[_T], Type[_T]]
class_or_mapper: Union[Mapper[_T], Type[_T]],
) -> Mapper[_T]:
# can't get mypy to see an overload for this
insp = inspection.inspect(class_or_mapper, False)
@@ -447,7 +445,7 @@ def _class_to_mapper(
def _mapper_or_none(
entity: Union[Type[_T], _InternalEntityType[_T]]
entity: Union[Type[_T], _InternalEntityType[_T]],
) -> Optional[Mapper[_T]]:
"""Return the :class:`_orm.Mapper` for the given class or None if the
class is not mapped.