Skip to content

Commit

Permalink
fixed docstring checker to ignore dataclass methods
Browse files Browse the repository at this point in the history
  • Loading branch information
pauladkisson committed Sep 5, 2023
1 parent b87b071 commit 1167d13
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/roiextractors/extraction_tools.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
"""Various tools for extraction of ROIs from imaging data.
Classes
-------
VideoStructure
A data class for specifying the structure of a video.
"""
import sys
import importlib.util
from functools import wraps
Expand Down Expand Up @@ -108,7 +115,6 @@ class VideoStructure:
channels_axis=channels_axis,
frame_axis=frame_axis,
)
"""

num_rows: int
Expand Down
2 changes: 2 additions & 0 deletions tests/test_docstrings.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ def test_has_docstring(obj):
msg = f"{obj.__name__} has no docstring."
else:
msg = f"{obj.__module__}.{obj.__qualname__} has no docstring."
if "__create_fn__" in msg:
return # skip dataclass functions created by __create_fn__
assert doc is not None, msg


Expand Down

0 comments on commit 1167d13

Please sign in to comment.