Skip to content

Commit bc02e89

Browse files
committed
Moved code [skip ci]
1 parent 03d1135 commit bc02e89

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

pgvector/psycopg/bit.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ def dump(self, obj: Bit) -> Buffer | None:
2424
return Bit._to_db_binary(obj)
2525

2626

27-
def register_bit_info(context: BaseConnection[Any], info: TypeInfo) -> None:
27+
def register_bit_info(context: BaseConnection[Any], info: TypeInfo | None) -> None:
28+
assert info is not None
2829
info.register(context)
2930

3031
# add oid to anonymous class for set_types

pgvector/psycopg/register.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ def register_vector(context: Connection[Any]) -> None:
1212
register_vector_info(context, info)
1313

1414
info = TypeInfo.fetch(context, 'bit')
15-
assert info is not None
1615
register_bit_info(context, info)
1716

1817
info = TypeInfo.fetch(context, 'halfvec')
@@ -29,7 +28,6 @@ async def register_vector_async(context: AsyncConnection[Any]) -> None:
2928
register_vector_info(context, info)
3029

3130
info = await TypeInfo.fetch(context, 'bit')
32-
assert info is not None
3331
register_bit_info(context, info)
3432

3533
info = await TypeInfo.fetch(context, 'halfvec')

0 commit comments

Comments
 (0)