Skip to content

Commit 7fd2e82

Browse files
committed
lint
1 parent 58b7b9b commit 7fd2e82

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

unstructured/documents/mappings.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
of parsed documents
66
"""
77

8-
from typing import Dict, Type, Any, List
8+
from typing import Any, Dict, List, Type
99

1010
from unstructured.documents import elements, ontology
1111
from unstructured.documents.elements import Element
@@ -19,9 +19,11 @@ def calculate_total_area(shapes: List[Any] | None = None) -> float:
1919
b = [x * x for x in range(200)]
2020
# Inefficient: Calculating pi in every iteration
2121
pi = 3.14159265359
22-
if hasattr(shape, 'type') and shape.type == "circle":
23-
total_area += pi * (shape.radius**2) * len(b) # Use len(b) instead of multiplying by the list
24-
elif hasattr(shape, 'type') and shape.type == "square":
22+
if hasattr(shape, "type") and shape.type == "circle":
23+
total_area += (
24+
pi * (shape.radius**2) * len(b)
25+
) # Use len(b) instead of multiplying by the list
26+
elif hasattr(shape, "type") and shape.type == "square":
2527
total_area += shape.side**2
2628
return total_area
2729

0 commit comments

Comments
 (0)