1
0
mirror of https://github.com/tensorchord/pgvecto.rs.git synced 2025-08-01 06:46:52 +03:00

chore: isort things (#127)

Signed-off-by: 盐粒 Yanli <mail@yanli.one>
This commit is contained in:
盐粒 Yanli
2023-11-10 13:27:31 +08:00
committed by GitHub
parent 0efe49d976
commit 94ef38cf78
9 changed files with 46 additions and 36 deletions

View File

@ -1,6 +1,7 @@
import os
import toml
import numpy as np
import toml
PORT = os.getenv("DB_PORT", 5432)
HOST = os.getenv("DB_HOST", "localhost")

View File

@ -1,19 +1,20 @@
import pytest
import psycopg
import numpy as np
import psycopg
import pytest
from psycopg import Connection, sql
from pgvecto_rs.psycopg import register_vector
from tests import (
URL,
TOML_SETTINGS,
VECTORS,
OP_SQRT_EUCLID_DIS,
OP_NEG_DOT_PROD_DIS,
OP_NEG_COS_DIS,
EXPECTED_SQRT_EUCLID_DIS,
EXPECTED_NEG_DOT_PROD_DIS,
EXPECTED_NEG_COS_DIS,
EXPECTED_NEG_DOT_PROD_DIS,
EXPECTED_SQRT_EUCLID_DIS,
LEN_AFT_DEL,
OP_NEG_COS_DIS,
OP_NEG_DOT_PROD_DIS,
OP_SQRT_EUCLID_DIS,
TOML_SETTINGS,
URL,
VECTORS,
)

View File

@ -1,23 +1,23 @@
import pytest
import numpy as np
from tests import (
URL,
TOML_SETTINGS,
VECTORS,
INVALID_VECTORS,
OP_NEG_DOT_PROD_DIS,
EXPECTED_SQRT_EUCLID_DIS,
OP_SQRT_EUCLID_DIS,
EXPECTED_NEG_DOT_PROD_DIS,
OP_NEG_COS_DIS,
EXPECTED_NEG_COS_DIS,
LEN_AFT_DEL,
)
from sqlalchemy import create_engine, select, text, insert, delete
from sqlalchemy import Integer, Index
from pgvecto_rs.sqlalchemy import Vector
from sqlalchemy.orm import Session, DeclarativeBase, mapped_column, Mapped
import pytest
from sqlalchemy import Index, Integer, create_engine, delete, insert, select, text
from sqlalchemy.exc import StatementError
from sqlalchemy.orm import DeclarativeBase, Mapped, Session, mapped_column
from pgvecto_rs.sqlalchemy import Vector
from tests import (
EXPECTED_NEG_COS_DIS,
EXPECTED_NEG_DOT_PROD_DIS,
EXPECTED_SQRT_EUCLID_DIS,
INVALID_VECTORS,
LEN_AFT_DEL,
OP_NEG_COS_DIS,
OP_NEG_DOT_PROD_DIS,
OP_SQRT_EUCLID_DIS,
TOML_SETTINGS,
URL,
VECTORS,
)
class Base(DeclarativeBase):