Skip to content

Commit

Permalink
fix: ruff errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ArslanSaleem committed Jan 9, 2025
1 parent 967a15f commit 8fc1efa
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 14 deletions.
8 changes: 4 additions & 4 deletions pandasai/core/response/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from .parser import ResponseParser
from .base import BaseResponse
from .string import StringResponse
from .number import NumberResponse
from .dataframe import DataFrameResponse
from .chart import ChartResponse
from .dataframe import DataFrameResponse
from .number import NumberResponse
from .parser import ResponseParser
from .string import StringResponse

__all__ = [
"ResponseParser",
Expand Down
2 changes: 1 addition & 1 deletion pandasai/core/response/base.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from typing import Any
import json
from typing import Any


class BaseResponse:
Expand Down
5 changes: 3 additions & 2 deletions pandasai/core/response/chart.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from typing import Any
from PIL import Image
import base64
import io
from typing import Any

from PIL import Image

from .base import BaseResponse

Expand Down
1 change: 1 addition & 0 deletions pandasai/core/response/dataframe.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from typing import Any

import pandas as pd

from .base import BaseResponse
Expand Down
4 changes: 2 additions & 2 deletions pandasai/core/response/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
from pandasai.exceptions import InvalidOutputValueMismatch

from .base import BaseResponse
from .chart import ChartResponse
from .dataframe import DataFrameResponse
from .number import NumberResponse
from .string import StringResponse
from .dataframe import DataFrameResponse
from .chart import ChartResponse


class ResponseParser:
Expand Down
2 changes: 1 addition & 1 deletion pandasai/dataframe/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@

import pandasai as pai
from pandasai.config import Config
from pandasai.core.response import BaseResponse
from pandasai.exceptions import DatasetNotFound, PandasAIApiKeyError
from pandasai.helpers.dataframe_serializer import (
DataframeSerializer,
DataframeSerializerType,
)
from pandasai.helpers.path import find_project_root
from pandasai.helpers.request import get_pandaai_session
from pandasai.core.response import BaseResponse

if TYPE_CHECKING:
from pandasai.agent.base import Agent
Expand Down
2 changes: 1 addition & 1 deletion tests/unit_tests/helpers/test_responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

import pandas as pd

from pandasai.core.response.parser import ResponseParser
from pandasai.core.response import (
ChartResponse,
DataFrameResponse,
NumberResponse,
StringResponse,
)
from pandasai.core.response.parser import ResponseParser
from pandasai.exceptions import InvalidOutputValueMismatch


Expand Down
6 changes: 4 additions & 2 deletions tests/unit_tests/response/test_chart_response.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import pytest
from PIL import Image
import base64
import io

import pytest
from PIL import Image

from pandasai.core.response.chart import ChartResponse


Expand Down
3 changes: 2 additions & 1 deletion tests/unit_tests/response/test_dataframe_response.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import pytest
import pandas as pd
import pytest

from pandasai.core.response.dataframe import DataFrameResponse


Expand Down

0 comments on commit 8fc1efa

Please sign in to comment.