-
Notifications
You must be signed in to change notification settings - Fork 223
Labels
good first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
AuthEntryReference
is currently untyped. So that users may register something in one type, but pass it to a spec accepting another type, without being caught by type validations.
Ideally
AuthEntryReference
should be typed, e.g. the type should beAuthEntryReference[T]
.
class AuthEntryReference: add_auth_entry()
should return the typeAuthEntryReference[T]
whereT
is the same as the argumentvalue
's type
def add_auth_entry(key: str, value) -> AuthEntryReference: AuthEntryReference
in various specs should be changed toAuthEntryReference
with type parameter, e.g.- For
Postgres.database
, the type should beAuthEntryReference[.lib.DatabaseConnectionSpec] | None
cocoindex/python/cocoindex/storages.py
Lines 9 to 13 in 08655cb
class Postgres(op.StorageSpec): """Storage powered by Postgres and pgvector.""" database: AuthEntryReference | None = None table_name: str | None = None - For
Neo4j.connection
, the type should beAuthEntryReference[Neo4jConnection]
cocoindex/python/cocoindex/storages.py
Lines 68 to 72 in 08655cb
class Neo4j(op.StorageSpec): """Graph storage powered by Neo4j.""" connection: AuthEntryReference mapping: NodeMapping | RelationshipMapping
- For
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed