Skip to content

Allow any Sequence in execute methods#18

Open
egerke28 wants to merge 1 commit into
Rapptz:masterfrom
egerke28:master
Open

Allow any Sequence in execute methods#18
egerke28 wants to merge 1 commit into
Rapptz:masterfrom
egerke28:master

Conversation

@egerke28
Copy link
Copy Markdown

@egerke28 egerke28 commented Apr 5, 2025

Resolves #17 by allowing any Sequence types in execute methods on both asqlite.Connection and asqlite.Cursor as in sqlite3.

@egerke28 egerke28 changed the title Allow and Sequence in execute methods Allow any Sequence in execute methods Apr 19, 2025
@Rapptz
Copy link
Copy Markdown
Owner

Rapptz commented Aug 12, 2025

Sorry for the late response but this change isn't correct depending on the Python version. isinstance on Sequence requires collections.abc.Sequence instead of just typing.Sequence, which may be an alias to collections.abc.Sequence depending on the version of Python used.

Likewise, when used as a type signature you generally want to be explicit with the generic parameter a la Sequence[Any] instead of letting it become whatever the default is (which is Any, but e.g. pyright uses Unknown as a default)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Connection.execute doesn't accept list for placeholder values, unlike sqlite3

2 participants