-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from RazerM/feature/sqlalchemy-2.0-only
SQLAlchemy 2.0+ and typing
- Loading branch information
Showing
21 changed files
with
801 additions
and
253 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import sys | ||
from typing import Any, List, Tuple, Type, Union | ||
|
||
from sqlalchemy import Executable | ||
from sqlalchemy import Sequence as SequenceType | ||
from sqlalchemy import TableClause | ||
from sqlalchemy.orm import Mapper | ||
|
||
if sys.version_info >= (3, 10): | ||
from typing import TypeAlias | ||
else: | ||
from typing_extensions import TypeAlias | ||
|
||
|
||
ExecutableType: TypeAlias = Executable | ||
TableTarget: TypeAlias = Union[ | ||
TableClause, | ||
Type[Any], | ||
Mapper[Any], | ||
] | ||
|
||
AnyTarget: TypeAlias = Union[TableTarget, SequenceType, str] | ||
ArgTypesInput: TypeAlias = Union[List[str], Tuple[str, ...]] | ||
|
||
__all__ = ( | ||
"AnyTarget", | ||
"ArgTypesInput", | ||
"ExecutableType", | ||
"TableTarget", | ||
"SequenceType", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Oops, something went wrong.