Skip to content

Commit a2cbbd8

Browse files
committed
Switched to positional-only parameters in more places [skip ci]
1 parent 58ea2e8 commit a2cbbd8

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

pgvector/psycopg/bit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def dump(self, obj: Bit) -> Buffer | None:
2121
return obj.to_binary()
2222

2323

24-
def register_bit_info(context: BaseConnection[Any], info: TypeInfo | None) -> None:
24+
def register_bit_info(context: BaseConnection[Any], info: TypeInfo | None, /) -> None:
2525
assert info is not None
2626
info.register(context)
2727

pgvector/psycopg/halfvec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def load(self, data: Buffer) -> HalfVector | None:
3737
return HalfVector.from_binary(data)
3838

3939

40-
def register_halfvec_info(context: BaseConnection[Any], info: TypeInfo) -> None:
40+
def register_halfvec_info(context: BaseConnection[Any], info: TypeInfo, /) -> None:
4141
info.register(context)
4242

4343
# add oid to anonymous class for set_types

pgvector/psycopg/sparsevec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def load(self, data: Buffer) -> SparseVector | None:
3737
return SparseVector.from_binary(data)
3838

3939

40-
def register_sparsevec_info(context: BaseConnection[Any], info: TypeInfo) -> None:
40+
def register_sparsevec_info(context: BaseConnection[Any], info: TypeInfo, /) -> None:
4141
info.register(context)
4242

4343
# add oid to anonymous class for set_types

pgvector/psycopg/vector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def load(self, data: Buffer) -> Vector | None:
4444
return Vector.from_binary(data)
4545

4646

47-
def register_vector_info(context: BaseConnection[Any], info: TypeInfo | None) -> None:
47+
def register_vector_info(context: BaseConnection[Any], info: TypeInfo | None, /) -> None:
4848
if info is None:
4949
raise psycopg.ProgrammingError('vector type not found in the database')
5050
info.register(context)

0 commit comments

Comments
 (0)