From 60fe420ead7e78f381fb6fbec59f1cd4f3421ed5 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Thu, 11 Jul 2024 09:53:46 -0700 Subject: [PATCH] Flesh out __all__ for all modules Add __all__ where it was missing and add some symbols to it that should have been listed. --- src/vocutouts/cli.py | 6 ++++++ src/vocutouts/main.py | 4 ++-- src/vocutouts/models/cutout.py | 1 + src/vocutouts/uws/config.py | 1 + src/vocutouts/uws/exceptions.py | 1 + src/vocutouts/uws/models.py | 1 + 6 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/vocutouts/cli.py b/src/vocutouts/cli.py index 1bc887c..ed09eac 100644 --- a/src/vocutouts/cli.py +++ b/src/vocutouts/cli.py @@ -9,6 +9,12 @@ from .config import uws +__all__ = [ + "help", + "init", + "main", +] + @click.group(context_settings={"help_option_names": ["-h", "--help"]}) @click.version_option(message="%(version)s") diff --git a/src/vocutouts/main.py b/src/vocutouts/main.py index 8ad92cc..8dd075c 100644 --- a/src/vocutouts/main.py +++ b/src/vocutouts/main.py @@ -27,7 +27,7 @@ @asynccontextmanager -async def lifespan(app: FastAPI) -> AsyncIterator[None]: +async def _lifespan(app: FastAPI) -> AsyncIterator[None]: """Set up and tear down the application.""" await uws_dependency.initialize(config.uws_config) yield @@ -47,7 +47,7 @@ async def lifespan(app: FastAPI) -> AsyncIterator[None]: openapi_url=f"{config.path_prefix}/openapi.json", docs_url=f"{config.path_prefix}/docs", redoc_url=f"{config.path_prefix}/redoc", - lifespan=lifespan, + lifespan=_lifespan, ) """The main FastAPI application for vo-cutouts.""" diff --git a/src/vocutouts/models/cutout.py b/src/vocutouts/models/cutout.py index ebcfc40..4d05524 100644 --- a/src/vocutouts/models/cutout.py +++ b/src/vocutouts/models/cutout.py @@ -39,6 +39,7 @@ "PolygonStencil", "Range", "RangeStencil", + "Stencil", ] diff --git a/src/vocutouts/uws/config.py b/src/vocutouts/uws/config.py index 725b0a3..7599a53 100644 --- a/src/vocutouts/uws/config.py +++ b/src/vocutouts/uws/config.py @@ -35,6 +35,7 @@ "ExecutionDurationValidator", "ParametersDependency", "ParametersModel", + "T", "UWSConfig", ] diff --git a/src/vocutouts/uws/exceptions.py b/src/vocutouts/uws/exceptions.py index bd32a84..0346bfd 100644 --- a/src/vocutouts/uws/exceptions.py +++ b/src/vocutouts/uws/exceptions.py @@ -25,6 +25,7 @@ __all__ = [ "DataMissingError", "InvalidPhaseError", + "MultiValuedParameterError", "ParameterError", "PermissionDeniedError", "SyncJobFailedError", diff --git a/src/vocutouts/uws/models.py b/src/vocutouts/uws/models.py index 34bcfd1..5df6e37 100644 --- a/src/vocutouts/uws/models.py +++ b/src/vocutouts/uws/models.py @@ -12,6 +12,7 @@ from enum import Enum, StrEnum __all__ = [ + "ACTIVE_PHASES", "Availability", "ErrorCode", "ExecutionPhase",