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: pull_request:
merge_group: merge_group:
env: env:
POETRY_VERSION: "1.8.3" POETRY_VERSION: "1.8.3"
NODE_VERSION: "21" NODE_VERSION: "21"

View file

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

View file

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

View file

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