]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Add type annotations to indexable extension code 12763/head
authorDenis Laxalde <denis@laxalde.org>
Mon, 28 Jul 2025 08:02:25 +0000 (10:02 +0200)
committerDenis Laxalde <denis@laxalde.org>
Mon, 28 Jul 2025 12:48:14 +0000 (14:48 +0200)
commit896b9642629fb212a71e68ed3f08705d08407dbf
tree4bb0d6858bc916bcfd122c2c715d611087a12c10
parentfc2debe97ed74a497fea0c8b1c56ef212e8a4968
Add type annotations to indexable extension code

A typing test case (plain_files/ext/indexable.py) is also added.

In order to make the methods of index_property conform with type
definitions of `fget`, `fset` and `fdel` arguments of hybrid_property,
we need to make the signature of protocols (e.g. `_HybridGetterType`)
`__call__`) method positional only.

Related to #6810.
lib/sqlalchemy/ext/hybrid.py
lib/sqlalchemy/ext/indexable.py
test/typing/plain_files/ext/indexable.py [new file with mode: 0644]