-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Various small SQLAlchemy type improvements #6623
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
4a582fa
Add annotations to exc.pyi
srittau cfd014c
Add annotations to log.pyi
srittau 66bf86e
Use re-exports in ext.declarative
srittau 73c3428
Add annotations to util._collections
srittau cbf2484
Add more type ignores
srittau 98e4e88
Add function to stubtest allowlist
srittau 8886f37
Add sql.elements to pytype exclude list
srittau 6623fb0
Add more files to pytype exclude list
srittau a7f2be6
Add another pytype exclude
srittau c5fb321
Fix Properties.update()
srittau 23180fd
Fix
srittau e21f4e2
Fix return type of Properties.__iter__()
srittau 52f1bd8
Mark uncallable arguments with NoReturn
srittau 9017d2d
Revert "Mark uncallable arguments with NoReturn"
srittau File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,30 +1,39 @@ | ||
| from typing import Any | ||
| from _typeshed import Self | ||
| from logging import Logger | ||
| from typing import Any, TypeVar, overload | ||
| from typing_extensions import Literal | ||
|
|
||
| _ClsT = TypeVar("_ClsT", bound=type) | ||
| _EchoFlag = bool | Literal["debug"] | None | ||
|
|
||
| rootlogger: Any | ||
|
|
||
| def class_logger(cls): ... | ||
| def class_logger(cls: _ClsT) -> _ClsT: ... | ||
|
|
||
| class Identified: | ||
| logging_name: Any | ||
| logging_name: str | None | ||
|
|
||
| class InstanceLogger: | ||
| echo: Any | ||
| logger: Any | ||
| def __init__(self, echo, name) -> None: ... | ||
| echo: _EchoFlag | ||
| logger: Logger | ||
| def __init__(self, echo: _EchoFlag, name: str | None) -> None: ... | ||
| def debug(self, msg, *args, **kwargs) -> None: ... | ||
| def info(self, msg, *args, **kwargs) -> None: ... | ||
| def warning(self, msg, *args, **kwargs) -> None: ... | ||
| warn: Any | ||
| warn = warning | ||
| def error(self, msg, *args, **kwargs) -> None: ... | ||
| def exception(self, msg, *args, **kwargs) -> None: ... | ||
| def critical(self, msg, *args, **kwargs) -> None: ... | ||
| def log(self, level, msg, *args, **kwargs) -> None: ... | ||
| def isEnabledFor(self, level): ... | ||
| def getEffectiveLevel(self): ... | ||
|
|
||
| def instance_logger(instance, echoflag: Any | None = ...) -> None: ... | ||
| def instance_logger(instance: Identified, echoflag: _EchoFlag = ...) -> None: ... | ||
|
|
||
| class echo_property: | ||
| __doc__: str | ||
| def __get__(self, instance, owner): ... | ||
| def __set__(self, instance, value) -> None: ... | ||
| @overload | ||
| def __get__(self: Self, instance: None, owner: object) -> Self: ... | ||
| @overload | ||
| def __get__(self, instance: Identified, owner: object) -> _EchoFlag: ... | ||
| def __set__(self, instance: Identified, value: _EchoFlag) -> None: ... |
This file contains hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.