]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Document generic type parameters to FunctionElement and GenericFunction (#9079)
authorStephen Rosen <sirosen@globus.org>
Tue, 14 Mar 2023 19:18:14 +0000 (14:18 -0500)
committerGitHub <noreply@github.com>
Tue, 14 Mar 2023 19:18:14 +0000 (20:18 +0100)
commit79b6a41d257b0fda6e8dbb42547c050b0fd1e5de
tree14793b993691376a366d9b05eec9e359848e0b9e
parent9f1b6ae053f5513bbf0ce221ed9ab4fb9d8e0ca7
Document generic type parameters to FunctionElement and GenericFunction (#9079)

* Document type parameters to FunctionElement

Add a note to FunctionElement which indicates that the type is a
typing.Generic class and points at GenericFunction examples for a
specific example usage.

A minimal reference is made to type checkers and IDEs as use-cases in
order to try to contextualize this as an optional feature which
supports particular use cases.

Append to the GenericFunction examples a case which uses `DateTime`
but also includes the generic type parameter (`datetime.datetime`).

* Fix type annotated function usage example
lib/sqlalchemy/sql/functions.py