Skip to content

Commit

Permalink
clean:
Browse files Browse the repository at this point in the history
typos
fix docstrings
rmv unused import
  • Loading branch information
bendichter committed Jan 22, 2024
1 parent bd18e5b commit d411749
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/roiextractors/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Python-based module for extracting from, converting between, and handling recorded and optical imaging data from several file formats."""
# Keeping __version__ accessible only to maintain backcompatability.
# Modern appraoch (Python >= 3.8) is to use importlib
# Modern approach (Python >= 3.8) is to use importlib
try:
from importlib.metadata import version

Expand Down
2 changes: 1 addition & 1 deletion src/roiextractors/extraction_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def _validate_video_structure(self) -> None:
"each property axis should be unique value between 0 and 3 (inclusive)"
)

axis_values = set((self.rows_axis, self.columns_axis, self.channels_axis, self.frame_axis))
axis_values = {self.rows_axis, self.columns_axis, self.channels_axis, self.frame_axis}
axis_values_are_not_unique = len(axis_values) != 4
if axis_values_are_not_unique:
raise ValueError(exception_message)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from pathlib import Path
from typing import Optional
from warnings import warn
import os
import numpy as np

from ...extraction_tools import PathType
Expand All @@ -33,7 +32,7 @@ def get_available_channels(cls, folder_path: PathType):
Parameters
----------
file_path : PathType
folder_path : PathType
Path to Suite2p output path.
Returns
Expand Down
2 changes: 1 addition & 1 deletion src/roiextractors/segmentationextractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ def frame_to_time(self, frames: Union[IntType, ArrayType]) -> Union[FloatType, A
Parameters
----------
frame_indices: int or array-like
frames: int or array-like
The frame or frames to be converted to times
Returns
Expand Down
2 changes: 2 additions & 0 deletions src/roiextractors/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ def generate_dummy_imaging_extractor(
sampling frequency of the video, by default 30.
dtype : DtypeType, optional
dtype of the video, by default "uint16".
channel_names : list, optional
list of channel names.
Returns
-------
Expand Down
2 changes: 1 addition & 1 deletion tests/test_internals/test_extraction_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def test_invalid_structure_with_repeated_axis(self):
"^Invalid structure: (.*?) each property axis should be unique value between 0 and 3 (inclusive)?"
)
with self.assertRaisesRegex(ValueError, reg_expression):
video_structure = VideoStructure(
VideoStructure(
num_rows=self.num_rows,
num_columns=self.num_columns,
num_channels=self.num_channels,
Expand Down

0 comments on commit d411749

Please sign in to comment.