Skip to content

Commit 998c15d

Browse files
committed
Merge branch 'master' into da/slice-support
2 parents 1147fbe + 1653508 commit 998c15d

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version: 2.1
44
jobs:
55
build_test:
66
docker:
7-
- image: python:3.9-slim-buster
7+
- image: python:3.6-slim-buster
88
resource_class: small
99
steps:
1010
- checkout # checkout source code to working directory

nucleus/annotation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ class AnnotationTypes(Enum):
113113
POLYGON = POLYGON_TYPE
114114

115115

116-
@dataclass
116+
@dataclass # pylint: disable=R0902
117117
class BoxAnnotation(Annotation): # pylint: disable=R0902
118118
label: str
119119
x: Union[float, int]

nucleus/prediction.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import annotations
2-
31
from typing import Dict, Optional, List, Any
42
from .annotation import (
53
BoxAnnotation,
@@ -30,7 +28,7 @@ class SegmentationPrediction(SegmentationAnnotation):
3028
# No need to define init or to_payload methods because
3129
# we default to functions defined in the parent class
3230
@classmethod
33-
def from_json(cls, payload: dict) -> SegmentationPrediction:
31+
def from_json(cls, payload: dict):
3432
return cls(
3533
mask_url=payload[MASK_URL_KEY],
3634
annotations=[
@@ -78,7 +76,7 @@ def to_payload(self) -> dict:
7876
return payload
7977

8078
@classmethod
81-
def from_json(cls, payload: dict) -> BoxPrediction:
79+
def from_json(cls, payload: dict):
8280
geometry = payload.get(GEOMETRY_KEY, {})
8381
return cls(
8482
label=payload.get(LABEL_KEY, 0),
@@ -123,7 +121,7 @@ def to_payload(self) -> dict:
123121
return payload
124122

125123
@classmethod
126-
def from_json(cls, payload: dict) -> PolygonPrediction:
124+
def from_json(cls, payload: dict):
127125
geometry = payload.get(GEOMETRY_KEY, {})
128126
return cls(
129127
label=payload.get(LABEL_KEY, 0),

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ python = "^3.6"
3636
grequests = "^0.6.0"
3737
requests = "^2.25.1"
3838
tqdm = "^4.60.0"
39+
boto3 = "^1.17.53"
40+
mypy = "^0.812"
41+
coverage = "^5.5"
42+
dataclasses = { version = "^0.7", python = "^3.6.1, <3.7" }
3943

4044
[tool.poetry.dev-dependencies]
4145
poetry = "^1.1.5"

0 commit comments

Comments
 (0)