Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Su <[email protected]>
  • Loading branch information
pingsutw committed Oct 19, 2023
1 parent 0179767 commit e8badea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion flytekit/types/file/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from flytekit.models.literals import Blob, BlobMetadata, Literal, Scalar
from flytekit.models.types import LiteralType

Check warning on line 11 in flytekit/types/file/image.py

View check run for this annotation

Codecov / codecov/patch

flytekit/types/file/image.py#L7-L11

Added lines #L7 - L11 were not covered by tests


T = typing.TypeVar("T")

Check warning on line 13 in flytekit/types/file/image.py

View check run for this annotation

Codecov / codecov/patch

flytekit/types/file/image.py#L13

Added line #L13 was not covered by tests


Expand Down Expand Up @@ -73,6 +72,7 @@ def guess_python_type(self, literal_type: LiteralType) -> Type[T]:
def to_html(self, ctx: FlyteContext, python_val: PIL.Image.Image, expected_python_type: Type[T]) -> str:
import base64
from io import BytesIO

Check warning on line 74 in flytekit/types/file/image.py

View check run for this annotation

Codecov / codecov/patch

flytekit/types/file/image.py#L72-L74

Added lines #L72 - L74 were not covered by tests

buffered = BytesIO()
python_val.save(buffered, format="PNG")
img_base64 = base64.b64encode(buffered.getvalue()).decode()
Expand Down
3 changes: 2 additions & 1 deletion tests/flytekit/unit/types/file/test_image.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from flytekit import task, workflow
import PIL.Image

from flytekit import task, workflow


@task(disable_deck=False)
def t1() -> PIL.Image.Image:
Expand Down

0 comments on commit e8badea

Please sign in to comment.