Skip to content
Snippets Groups Projects
Verified Commit 5f702c9a authored by Yoann Schneider's avatar Yoann Schneider :tennis:
Browse files

Introduce UP014

parent 74907fed
No related branches found
No related tags found
No related merge requests found
This commit is part of merge request !2307. Comments created here will be created in the context of that merge request.
......@@ -7,9 +7,11 @@ from arkindex.documents.models import ElementType
from arkindex.project.argparse import CorpusArgument
# x and y of top left and bottom right points
BBox = NamedTuple(
"BBox", [("left", int), ("top", int), ("right", int), ("bottom", int)]
)
class BBox(NamedTuple):
left: int
top: int
right: int
bottom: int
def compute_polygon_area(polygon: BBox):
......
......@@ -29,6 +29,8 @@ select = [
"UP004",
# unnecessary-encode-utf8
"UP012",
# convert-named-tuple-functional-to-class
"UP014",
]
ignore = ["E501", "RET502", "RET503"]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment