diff --git a/amcat4/__main__.py b/amcat4/__main__.py index a0f674f..6873810 100644 --- a/amcat4/__main__.py +++ b/amcat4/__main__.py @@ -18,7 +18,7 @@ from pydantic.fields import FieldInfo from amcat4 import index -from amcat4.config import get_settings, AuthOptions, Settings, validate_settings +from amcat4.config import get_settings, AuthOptions, validate_settings from amcat4.elastic import connect_elastic, get_system_version, ping, upload_documents from amcat4.index import ( GLOBAL_ROLES, diff --git a/amcat4/config.py b/amcat4/config.py index d4e48f0..1c6506c 100644 --- a/amcat4/config.py +++ b/amcat4/config.py @@ -54,17 +54,26 @@ class Settings(BaseSettings): elastic_password: Optional[str] = Field( None, - description="Elasticsearch password. This the password for the 'elastic' user when Elastic xpack security is enabled", + description=( + "Elasticsearch password. " + "This the password for the 'elastic' user when Elastic xpack security is enabled" + ), ) elastic_host: Optional[str] = Field( None, - description="Elasticsearch host. Default: https://localhost:9200 if elastic_password is set, http://localhost:9200 otherwise", + description=( + "Elasticsearch host. " + "Default: https://localhost:9200 if elastic_password is set, http://localhost:9200 otherwise" + ), ) elastic_verify_ssl: Optional[bool] = Field( None, - description="Elasticsearch verify SSL (only used if elastic_password is set). Default: True unless host is localhost)", + description=( + "Elasticsearch verify SSL (only used if elastic_password is set). " + "Default: True unless host is localhost)" + ), ) system_index: str = Field( diff --git a/tests/test_api_documents.py b/tests/test_api_documents.py index debc4f2..39f4bde 100644 --- a/tests/test_api_documents.py +++ b/tests/test_api_documents.py @@ -1,6 +1,5 @@ -from turtle import pos from amcat4.index import set_role, Role -from tests.conftest import index_docs, populate_index +from tests.conftest import populate_index from tests.tools import post_json, build_headers, get_json, check