Skip to content
Snippets Groups Projects
Commit 388aed29 authored by Yoann Schneider's avatar Yoann Schneider :tennis: Committed by Erwan Rouchet
Browse files

Introduce UP014

parent 58ad87e7
No related branches found
No related tags found
1 merge request!2307Introduce pyupgrade
......@@ -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