Skip to content

Commit 72b3a16

Browse files
committed
Improved type hints [skip ci]
1 parent b367d86 commit 72b3a16

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ lint:
44
pycodestyle . --ignore=E501 --exclude=.venv
55

66
check:
7-
ty check pgvector tests
7+
ty check pgvector tests --ignore unused-type-ignore-comment
88

99
build:
1010
python3 -m build

pgvector/psycopg2/register.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
# note: register_adapter is always global
99
def register_vector(conn_or_curs: connection | cursor, globally: bool = False, arrays: bool = True) -> None:
10-
conn = conn_or_curs if hasattr(conn_or_curs, 'cursor') else conn_or_curs.connection
10+
conn = conn_or_curs if isinstance(conn_or_curs, connection) else conn_or_curs.connection
1111
cur = conn.cursor(cursor_factory=cursor)
1212
scope = None if globally else conn_or_curs
1313

pgvector/sqlalchemy/bit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def bind_processor(self, dialect: Dialect) -> Any:
2222

2323
def process(value: Any) -> Any:
2424
if isinstance(value, str):
25-
return asyncpg.BitString(value)
25+
return asyncpg.BitString(value) # type: ignore
2626
return value
2727
return process
2828
else:

0 commit comments

Comments
 (0)