diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2023-01-26 08:52:01 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2023-01-26 13:42:15 -0500 |
commit | c06ef9745f34524169cb66335f0b0a86137bdb39 (patch) | |
tree | 79d86967b99861de75b6dacfb354d171eedca54e /test/ext/mypy/plain_files/sql_operations.py | |
parent | 19cbf8038f4a9e8e0820bcfeb6b65bf5bc873d39 (diff) | |
download | sqlalchemy-c06ef9745f34524169cb66335f0b0a86137bdb39.tar.gz |
add typing to legacy operators
Added typing to legacy operators such as ``isnot()``, ``notin_()``, etc.
which previously were referencing the newer operators but were not
themselves typed.
Fixes: #9148
Change-Id: I3ad7d75d89ec13c9f45063033ecff69d610c72ca
Diffstat (limited to 'test/ext/mypy/plain_files/sql_operations.py')
-rw-r--r-- | test/ext/mypy/plain_files/sql_operations.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/ext/mypy/plain_files/sql_operations.py b/test/ext/mypy/plain_files/sql_operations.py index 33db5f2cc..c55442be9 100644 --- a/test/ext/mypy/plain_files/sql_operations.py +++ b/test/ext/mypy/plain_files/sql_operations.py @@ -64,6 +64,17 @@ stmt = select(column("q")).where(lambda: column("g") > 5).where(c2 == 5) expr9 = c1.bool_op("@@")(func.to_tsquery("some & query")) +# add tests for #9148 +and_(c1.is_(q)) +and_(c1.is_not(q)) +and_(c1.isnot(q)) +and_(c1.not_in(["x"])) +and_(c1.notin_(["x"])) +and_(c1.not_like("x")) +and_(c1.notlike("x")) +and_(c1.not_ilike("x")) +and_(c1.notilike("x")) + if typing.TYPE_CHECKING: |