Skip to content

Commit a1d49ec

Browse files
committed
Format code with current Black
1 parent 0a090c9 commit a1d49ec

47 files changed

Lines changed: 40 additions & 170 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

deepeval/cli/inspect.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import typer
1515
from rich import print
1616

17-
1817
_INSTALL_HINT = (
1918
"[bold red]deepeval inspect[/bold red] requires extras that are not "
2019
"installed.\n"

deepeval/inspect/widgets/_styling.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
from deepeval.inspect.types import Trace, TraceOrSpan
1414

15-
1615
# `(glyph, tag, rich style)` per span type. Tags are full words rather
1716
# than abbreviations because the tree pane is wide enough to spell them
1817
# out, and "RETRIEVER" reads instantly while "RET" trips users into

deepeval/inspect/widgets/details.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
type_prefix,
3131
)
3232

33-
3433
# Matches the TRACE tag so the eye learns "cyan = structure markers".
3534
_HEADER_ACCENT = "#8be9fd"
3635
_CTA_ACCENT = "#bd93f9"

deepeval/inspect/widgets/help_modal.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
from textual.screen import ModalScreen
1010
from textual.widgets import Static
1111

12-
1312
_HELP_ROWS = [
1413
("↑ ↓ / k j", "move selection in the tree"),
1514
("h / l", "go to parent / select child in the tree"),

deepeval/inspect/widgets/span_tree.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
type_prefix,
2626
)
2727

28-
2928
# Minimum gap (in cells) between the left content (name + metric badge +
3029
# optional ERRORED pill) and the right-aligned duration. Below this the
3130
# right column gives up trying to right-align and just leaves the

deepeval/metrics/contextual_relevancy/contextual_relevancy.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,10 @@ def _contextual_relevancy_verdict_kwargs(multimodal: bool) -> Dict[str, str]:
3030
context_type = "context (image or string)" if multimodal else "context"
3131
statement_or_image = "statement or image" if multimodal else "statement"
3232
if multimodal:
33-
extraction_instructions = textwrap.dedent(
34-
"""
33+
extraction_instructions = textwrap.dedent("""
3534
If the context is textual, you should first extract the statements found in the context if the context, which are high level information found in the context, before deciding on a verdict and optionally a reason for each statement.
3635
If the context is an image, `statement` should be a description of the image. Do not assume any information not visibly available.
37-
"""
38-
).strip()
36+
""").strip()
3937
empty_context_instruction = ""
4038
else:
4139
extraction_instructions = (

deepeval/metrics/dag/serialization/registry.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
from .types import NodeType
1717

18-
1918
NODE_CLASSES: Dict[bool, Dict[NodeType, Type]] = {
2019
False: {
2120
NodeType.TASK: TaskNode,

deepeval/metrics/dag/serialization/serialization.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@
6161
from .registry import CLASS_TO_NODE_TYPE, NODE_CLASSES
6262
from .types import ChildType, NodeType
6363

64-
6564
# ----------------------------------------------------------------------------
6665
# Public API
6766
# ----------------------------------------------------------------------------

deepeval/metrics/multimodal_metrics/image_editing/image_editing.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -287,15 +287,13 @@ def is_successful(self) -> bool:
287287
def _generate_reason(
288288
self,
289289
) -> str:
290-
return textwrap.dedent(
291-
f"""
290+
return textwrap.dedent(f"""
292291
The overall score is {self.score:.2f} because the lowest score from semantic consistency was {min(self.SC_scores)}
293292
and the lowest score from perceptual quality was {min(self.PQ_scores)}. These scores were combined to reflect the
294293
overall effectiveness and quality of the AI-generated image(s).
295294
Reason for Semantic Consistency score: {self.SC_reasoning}
296295
Reason for Perceptual Quality score: {self.PQ_reasoning}
297-
"""
298-
)
296+
""")
299297

300298
@property
301299
def __name__(self):

deepeval/metrics/multimodal_metrics/text_to_image/text_to_image.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -289,15 +289,13 @@ def is_successful(self) -> bool:
289289
return self.success
290290

291291
def _generate_reason(self) -> str:
292-
return textwrap.dedent(
293-
f"""
292+
return textwrap.dedent(f"""
294293
The overall score is {self.score:.2f} because the lowest score from semantic consistency was {min(self.SC_scores)}
295294
and the lowest score from perceptual quality was {min(self.PQ_scores)}. These scores were combined to reflect the
296295
overall effectiveness and quality of the AI-generated image(s).
297296
Reason for Semantic Consistency score: {self.SC_reasoning}
298297
Reason for Perceptual Quality score: {self.PQ_reasoning}
299-
"""
300-
)
298+
""")
301299

302300
@property
303301
def __name__(self):

0 commit comments

Comments
 (0)