Skip to content

Commit

Permalink
Finish docstrings in dataset_parser.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mmwinther committed Aug 2, 2024
1 parent b67bb15 commit ce0d15c
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/datadoc/backend/dataset_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@ def transform_data_type(data_type: str) -> DataType | None:
If we encounter a data type we don't know, we just ignore it and let
the user handle it in the GUI.
Arguments:
data_type: The concrete data type to map.
"""
return TYPE_MAP.get(data_type.lower(), None)

Expand All @@ -165,7 +168,11 @@ class DatasetParserParquet(DatasetParser):
"""Concrete implementation for parsing parquet files."""

def __init__(self, dataset: pathlib.Path | CloudPath) -> None:
"""Use the super init method."""
"""Call the super init method for initialization.
Args:
dataset: Path to the dataset to parse.
"""
super().__init__(dataset)

def get_fields(self) -> list[Variable]:
Expand All @@ -187,7 +194,11 @@ class DatasetParserSas7Bdat(DatasetParser):
"""Concrete implementation for parsing SAS7BDAT files."""

def __init__(self, dataset: pathlib.Path | CloudPath) -> None:
"""Use the super init method."""
"""Call the super init method for initialization.
Args:
dataset: Path to the dataset to parse.
"""
super().__init__(dataset)

def get_fields(self) -> list[Variable]:
Expand Down

0 comments on commit ce0d15c

Please sign in to comment.