Skip to content

Commit

Permalink
chore(format): format after isort
Browse files Browse the repository at this point in the history
  • Loading branch information
Avantol13 committed Nov 3, 2023
1 parent d551592 commit 842705b
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 11 deletions.
12 changes: 6 additions & 6 deletions clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@

SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

echo ----------------------------------------------
echo Running black to automatically format Python
echo ----------------------------------------------
echo Command: black "$SCRIPT_DIR" --config ~/.gen3/.github/.github/linters/.python-black
black "$SCRIPT_DIR" --config ~/.gen3/.github/.github/linters/.python-black
echo
echo ----------------------------------------------
echo Running isort to automatically sort imports
echo ----------------------------------------------
echo Command: isort "$SCRIPT_DIR" --settings ~/.gen3/.github/.github/linters
isort "$SCRIPT_DIR" --settings ~/.gen3/.github/.github/linters
echo
echo ----------------------------------------------
echo Running black to automatically format Python
echo ----------------------------------------------
echo Command: black "$SCRIPT_DIR" --config ~/.gen3/.github/.github/linters/.python-black
black "$SCRIPT_DIR" --config ~/.gen3/.github/.github/linters/.python-black
echo
echo ----------------------------------------------
echo Running pylint to detect lint
echo ----------------------------------------------
echo Command: pylint -vv "$SCRIPT_DIR/gen3discoveryai" --rcfile ~/.gen3/.github/linters/.python-lint
Expand Down
8 changes: 6 additions & 2 deletions gen3discoveryai/topic_chains/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
from gen3discoveryai.topic_chains.question_answer_google import TopicChainGoogleQuestionAnswerRAG
from gen3discoveryai.topic_chains.question_answer_openai import TopicChainQuestionAnswerRAG
from gen3discoveryai.topic_chains.question_answer_google import (
TopicChainGoogleQuestionAnswerRAG,
)
from gen3discoveryai.topic_chains.question_answer_openai import (
TopicChainQuestionAnswerRAG,
)

# ... add more here
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ addopts = """
[tool.isort]
known_first_party = ["gen3discoveryai"]
profile = "black"
line_length = 120
line_length = 88

[build-system]
requires = ["poetry-core"]
Expand Down
4 changes: 3 additions & 1 deletion tests/test_qa_topic_chain_google.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
import chromadb
import pytest

from gen3discoveryai.topic_chains.question_answer_google import TopicChainGoogleQuestionAnswerRAG
from gen3discoveryai.topic_chains.question_answer_google import (
TopicChainGoogleQuestionAnswerRAG,
)


@patch("gen3discoveryai.topic_chains.question_answer_google.RetrievalQA")
Expand Down
4 changes: 3 additions & 1 deletion tests/test_qa_topic_chain_openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
import chromadb
import pytest

from gen3discoveryai.topic_chains.question_answer_openai import TopicChainQuestionAnswerRAG
from gen3discoveryai.topic_chains.question_answer_openai import (
TopicChainQuestionAnswerRAG,
)


def test_qa_topic_chain_openai_init_defaults():
Expand Down

0 comments on commit 842705b

Please sign in to comment.