mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-01 02:50:47 +00:00
Harrison/fix lint (#80)
This commit is contained in:
2
.github/workflows/lint.yml
vendored
2
.github/workflows/lint.yml
vendored
@@ -17,7 +17,7 @@ jobs:
|
|||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install -r requirements.txt
|
pip install -r test_requirements.txt
|
||||||
- name: Analysing the code with our lint
|
- name: Analysing the code with our lint
|
||||||
run: |
|
run: |
|
||||||
make lint
|
make lint
|
||||||
|
@@ -92,7 +92,6 @@ class SelfAskWithSearchChain(Chain, BaseModel):
|
|||||||
input_key: str = "question" #: :meta private:
|
input_key: str = "question" #: :meta private:
|
||||||
output_key: str = "answer" #: :meta private:
|
output_key: str = "answer" #: :meta private:
|
||||||
|
|
||||||
|
|
||||||
class Config:
|
class Config:
|
||||||
"""Configuration for this pydantic object."""
|
"""Configuration for this pydantic object."""
|
||||||
|
|
||||||
|
@@ -74,8 +74,8 @@ class SerpAPIChain(Chain, BaseModel):
|
|||||||
if serpapi_api_key is None or serpapi_api_key == "":
|
if serpapi_api_key is None or serpapi_api_key == "":
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
"Did not find SerpAPI API key, please add an environment variable"
|
"Did not find SerpAPI API key, please add an environment variable"
|
||||||
" `SERPAPI_API_KEY` which contains it, or pass `serpapi_api_key` as a named"
|
" `SERPAPI_API_KEY` which contains it, or pass `serpapi_api_key` "
|
||||||
" parameter to the constructor."
|
"as a named parameter to the constructor."
|
||||||
)
|
)
|
||||||
try:
|
try:
|
||||||
from serpapi import GoogleSearch
|
from serpapi import GoogleSearch
|
||||||
|
@@ -1,10 +1,4 @@
|
|||||||
-r test_requirements.txt
|
-r test_requirements.txt
|
||||||
# For linting
|
|
||||||
black
|
|
||||||
isort
|
|
||||||
mypy
|
|
||||||
flake8
|
|
||||||
flake8-docstrings
|
|
||||||
# For integrations
|
# For integrations
|
||||||
cohere
|
cohere
|
||||||
openai
|
openai
|
||||||
|
@@ -2,3 +2,9 @@
|
|||||||
# For testing
|
# For testing
|
||||||
pytest
|
pytest
|
||||||
pytest-dotenv
|
pytest-dotenv
|
||||||
|
# For linting
|
||||||
|
black
|
||||||
|
isort
|
||||||
|
mypy
|
||||||
|
flake8
|
||||||
|
flake8-docstrings
|
||||||
|
Reference in New Issue
Block a user