Skip to content

Commit

Permalink
fix(typing): correct typing
Browse files Browse the repository at this point in the history
  • Loading branch information
seankmartin committed Jul 11, 2024
1 parent 90362bf commit 7170e1a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions cryoet_data_portal_neuroglancer/precompute/points.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,11 @@ def _prepare_writer_specifications(self):
],
)

def process_data_to_writer_specifications(self, data: list[dict[str, Any]], metadata: dict[str, Any]):
def process_data_to_writer_specifications(
self,
data: list[dict[str, Any]],
metadata: dict[str, Any],
):
# Using 10nm as default size
diameter = metadata["annotation_object"].get("diameter", 100) / 10
for index, point in enumerate(data):
Expand All @@ -124,10 +128,10 @@ def encode_annotation(
output_path: Path,
resolution: float,
is_oriented: bool = False,
names_by_id: dict[int, str] = None,
names_by_id: Optional[dict[int, str]] = None,
label_key_mapper: Callable[[dict[str, Any]], int] = lambda x: 0,
color_mapper: Callable[[dict[str, Any]], tuple[int, int, int]] = lambda x: (255, 255, 255),
shard_by_id: Optional[tuple[int, int]] = (0, 10),
shard_by_id: Optional[tuple[int, int] | bool] = (0, 10),
oriented_line_parameters: tuple[float, LineLengthMethod] = (1.5, LineLengthMethod.SCALE),
) -> None:
"""Encode annotation data to Neuroglancer format.
Expand Down

0 comments on commit 7170e1a

Please sign in to comment.