community[patch]: upgrade to recent version of mypy (#21616)

This PR upgrades community to a recent version of mypy. It inserts type:
ignore on all existing failures.
This commit is contained in:
Eugene Yurtsev
2024-05-13 14:55:07 -04:00
committed by GitHub
parent b923951062
commit 25fbe356b4
243 changed files with 718 additions and 710 deletions

View File

@@ -9,8 +9,10 @@ from langchain_community.embeddings import PremAIEmbeddings
@pytest.mark.requires("premai")
def test_api_key_is_string() -> None:
llm = PremAIEmbeddings(
premai_api_key="secret-api-key", project_id=8, model="fake-model"
llm = PremAIEmbeddings( # type: ignore[call-arg]
premai_api_key="secret-api-key", # type: ignore[arg-type]
project_id=8,
model="fake-model", # type: ignore[arg-type]
)
assert isinstance(llm.premai_api_key, SecretStr)
@@ -19,8 +21,10 @@ def test_api_key_is_string() -> None:
def test_api_key_masked_when_passed_via_constructor(
capsys: CaptureFixture,
) -> None:
llm = PremAIEmbeddings(
premai_api_key="secret-api-key", project_id=8, model="fake-model"
llm = PremAIEmbeddings( # type: ignore[call-arg]
premai_api_key="secret-api-key", # type: ignore[arg-type]
project_id=8,
model="fake-model", # type: ignore[arg-type]
)
print(llm.premai_api_key, end="") # noqa: T201
captured = capsys.readouterr()