ci: fix mypy checks (#2431)

* ci: fix mypy

* ci: fix mypy

* ci: fix mypy

* run fe checks

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Nicolò Boschi 2024-07-01 23:42:14 +02:00 committed by GitHub
commit f2bf62e284
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 6 additions and 8 deletions

View file

@ -10,6 +10,7 @@ on:
pull_request:
merge_group:
env:
POETRY_VERSION: "1.8.3"
NODE_VERSION: "21"

View file

@ -59,7 +59,6 @@ class FirecrawlCrawlApi(CustomComponent):
raise ImportError(
"Could not import firecrawl integration package. " "Please install it with `pip install firecrawl-py`."
)
if crawlerOptions:
crawler_options_dict = crawlerOptions.__dict__["data"]["text"]
else:

View file

@ -43,7 +43,7 @@ class FirecrawlScrapeApi(CustomComponent):
self,
api_key: str,
url: str,
timeout: Optional[int] = 10000,
timeout: int = 10000,
pageOptions: Optional[Data] = None,
extractorOptions: Optional[Data] = None,
) -> Data:

View file

@ -1,4 +1,4 @@
from typing import List
from typing import List, Optional
from langchain_community.vectorstores import Cassandra
@ -138,9 +138,7 @@ class CassandraVectorStoreComponent(LCVectorStoreComponent):
password=self.token,
cluster_kwargs=self.cluster_kwargs,
)
if not self.ttl_seconds: # type: ignore
self.ttl_seconds = None
ttl_seconds: Optional[int] = self.ttl_seconds
documents = []
@ -156,7 +154,7 @@ class CassandraVectorStoreComponent(LCVectorStoreComponent):
embedding=self.embedding,
table_name=self.table_name,
keyspace=self.keyspace,
ttl_seconds=self.ttl_seconds,
ttl_seconds=ttl_seconds,
batch_size=self.batch_size,
body_index_options=self.body_index_options,
)
@ -166,7 +164,7 @@ class CassandraVectorStoreComponent(LCVectorStoreComponent):
embedding=self.embedding,
table_name=self.table_name,
keyspace=self.keyspace,
ttl_seconds=self.ttl_seconds,
ttl_seconds=ttl_seconds,
body_index_options=self.body_index_options,
setup_mode=self.setup_mode,
)