From 831fab9ff482cfa6b8f69dab2e1ae72d8183e238 Mon Sep 17 00:00:00 2001 From: David Stansby Date: Wed, 27 Nov 2024 18:35:20 +0000 Subject: [PATCH] Document input/output for parse_url --- CHANGELOG.md | 1 + ome_zarr/io.py | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 82937b72..08d94148 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Unreleased - Drop support for Python 3.8. +- Document parameters and return value of `parse_url`. # 0.9.0 (May 2024) diff --git a/ome_zarr/io.py b/ome_zarr/io.py index 55f91b98..b8c720d1 100644 --- a/ome_zarr/io.py +++ b/ome_zarr/io.py @@ -211,6 +211,14 @@ def parse_url( ) -> Optional[ZarrLocation]: """Convert a path string or URL to a ZarrLocation subclass. + :param path: Path to parse. + :param mode: Mode to open in. + :param fmt: Version of the OME-NGFF spec to open path with. + + :return: `ZarrLocation`. + If mode is 'r', and the path does not exist returns None. + If there is an error opening the path, also returns None. + >>> parse_url('does-not-exist') """ try: