Skip to content

Commit

Permalink
fix: Ruff fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ramedina86 committed Nov 22, 2024
1 parent 8bdc66f commit 695a65d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/writer/blocks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
from writer.blocks.runworkflow import RunWorkflow
from writer.blocks.setstate import SetState
from writer.blocks.writeraddchatmessage import WriterAddChatMessage
from writer.blocks.writeraddtokg import WriterAddToKG
from writer.blocks.writerchat import WriterChat
from writer.blocks.writerclassification import WriterClassification
from writer.blocks.writercompletion import WriterCompletion
from writer.blocks.writerinitchat import WriterInitChat
from writer.blocks.writernocodeapp import WriterNoCodeApp
from writer.blocks.writeraddtokg import WriterAddToKG

SetState.register("workflows_setstate")
WriterClassification.register("workflows_writerclassification")
Expand Down
3 changes: 2 additions & 1 deletion src/writer/blocks/writeraddtokg.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from typing import Any

from writer.abstract import register_abstract_template
from writer.blocks.base_block import WorkflowBlock
from writer.ss_types import AbstractTemplate, WriterConfigurationError
Expand Down Expand Up @@ -47,7 +48,7 @@ def _get_prepared_file(self, raw_file: Any):
if not isinstance(raw_file, dict):
raise WriterConfigurationError("Files must be dictionaries and contain `data`, `type` and `name` attributes.")

if not "data" in raw_file or not "type" in raw_file or not "name" in raw_file:
if "data" not in raw_file or "type" not in raw_file or "name" not in raw_file:
raise WriterConfigurationError("A file specified as a dictionary must contain `data`, `type` and `name` attributes.")

return raw_file
Expand Down

0 comments on commit 695a65d

Please sign in to comment.