Goal
The public utility functions in pystore/utils.py currently lack PEP 484 type annotations. Add type hints to all public functions in the file.
Acceptance criteria
Out of scope
- Type hints on private functions (anything starting with
_)
- Refactoring or behavior changes
- Other files in the package
Verification
python -c "import pystore.utils; help(pystore.utils.set_path)" should show typed signature
- Existing tests still pass:
pytest tests/
- Optional:
mypy pystore/utils.py should not introduce regressions (it may already report unrelated issues — those are not part of this task)
Goal
The public utility functions in
pystore/utils.pycurrently lack PEP 484 type annotations. Add type hints to all public functions in the file.Acceptance criteria
pystore/utils.py:read_csv(urlpath, *args, **kwargs)datetime_to_int64(df)subdirs(d)path_exists(path)read_metadata(path)write_metadata(path, metadata={})make_path(*args)get_path(*args)set_path(path)list_stores()delete_store(store)delete_stores()set_client(scheduler=None)get_client()set_partition_size(size=None)get_partition_size()configure_logging(level=logging.INFO, format_string=None)pathlib.Pathfor path-typed args/returns where appropriate.pd.DataFrame(ordd.DataFramefor Dask) for dataframe types.Optional[X],Union[X, Y],Dict,List,Setfromtypingas needed (Python 3.7-compatible).from typing import ...import line near the top of the file.Out of scope
_)Verification
python -c "import pystore.utils; help(pystore.utils.set_path)"should show typed signaturepytest tests/mypy pystore/utils.pyshould not introduce regressions (it may already report unrelated issues — those are not part of this task)