Skip to content

Commit

Permalink
Run codespell
Browse files Browse the repository at this point in the history
  • Loading branch information
erikogabrielsson committed Nov 22, 2023
1 parent df3615d commit 8c6dd80
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion tests/test_wsidicom_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def test_image_type_property(
self,
test_file: WsiDicomFile,
):
# Arrage
# Arrange

# Act
image_type = test_file.image_type
Expand Down
2 changes: 1 addition & 1 deletion tests/test_wsidicom_file_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ def test_write_encapsulated_pixel_data(
frame_offsets = [
position + TAG_BYTES + LENGTH_BYTES for position in writen_frame_positions
]
frame_lengths = [ # Lengths are divisable with 2
frame_lengths = [ # Lengths are divisible with 2
2 * math.ceil(len(frame) / 2) for frame in frames
]
expected_frame_positons = [
Expand Down
2 changes: 1 addition & 1 deletion wsidicom/codec/decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def select_decoder(
if config.settings.prefered_decoder is not None:
if config.settings.prefered_decoder not in decoders:
raise ValueError(
f"Unknown prefered decoder: {config.settings.prefered_decoder}."
f"Unknown preferred decoder: {config.settings.prefered_decoder}."
)
decoder = decoders[config.settings.prefered_decoder]
if not decoder.is_available() or not decoder.is_supported(
Expand Down
2 changes: 1 addition & 1 deletion wsidicom/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def focal_plane_distance_threshold(self, value: float) -> None:

@property
def prefered_decoder(self) -> Optional[str]:
"""Name of prefered decoder to use."""
"""Name of preferred decoder to use."""
return self._prefered_decoder

@prefered_decoder.setter
Expand Down
6 changes: 3 additions & 3 deletions wsidicom/instance/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def tile_type(self) -> TileType:
# By the standard it should be tiled full.
return TileType.FULL
if "PerFrameFunctionalGroupsSequence" in self:
# If no per frame functional sequence we cant make a sparse tile index.
# If no per frame functional sequence we can't make a sparse tile index.
return TileType.SPARSE
if self.image_type == ImageType.LABEL:
# Labels are expected to only have one frame and can be treated as tiled full.
Expand Down Expand Up @@ -331,7 +331,7 @@ def spacing_between_slices(self) -> Optional[float]:

@cached_property
def frame_sequence(self) -> DicomSequence:
"""Return per frame functional group sequene if present, otherwise
"""Return per frame functional group sequence if present, otherwise
shared functional group sequence.
Returns
Expand Down Expand Up @@ -384,7 +384,7 @@ def image_size(self) -> Size:
raise WsiDicomError("Image size is zero")
if self.tile_type == TileType.FULL and self.uids.concatenation is None:
# Check that the number of frames match the image size and tile size.
# Dont check concantenated instances as the frame count is ambiguous.
# Dont check concatenated instances as the frame count is ambiguous.
expected_tiled_size = image_size.ceil_div(self.tile_size)
number_of_focal_planes = getattr(self, "TotalPixelMatrixFocalPlanes", 1)
number_of_optical_paths = getattr(self, "NumberOfOpticalPaths", 1)
Expand Down
2 changes: 1 addition & 1 deletion wsidicom/instance/image_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def transfer_syntax(self) -> UID:
@property
@abstractmethod
def image_size(self) -> Size:
"""Retur the pixel size of the image."""
"""Return the pixel size of the image."""
raise NotImplementedError()

@property
Expand Down
2 changes: 1 addition & 1 deletion wsidicom/instance/tile_index/full_tile_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def _read_focal_planes_from_datasets(
self,
) -> List[float]:
"""Return list of focal planes in datasets. Values in Pixel Measures
Sequene are in mm.
Sequence are in mm.
Returns
----------
Expand Down

0 comments on commit 8c6dd80

Please sign in to comment.