From 6f6001b65a08ba9a75e1aee67014ee3d4e3bf8c1 Mon Sep 17 00:00:00 2001 From: "David H. Irving" Date: Thu, 26 Oct 2023 10:52:48 -0700 Subject: [PATCH] Use __all__ instead of import by name --- python/lsst/daf/butler/remote_butler/__init__.py | 2 +- python/lsst/daf/butler/remote_butler/_remote_butler.py | 2 ++ python/lsst/daf/butler/remote_butler/server/__init__.py | 4 ++-- python/lsst/daf/butler/remote_butler/server/_factory.py | 2 ++ python/lsst/daf/butler/remote_butler/server/_server.py | 2 +- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/python/lsst/daf/butler/remote_butler/__init__.py b/python/lsst/daf/butler/remote_butler/__init__.py index 98bb440c81..56a73ebef3 100644 --- a/python/lsst/daf/butler/remote_butler/__init__.py +++ b/python/lsst/daf/butler/remote_butler/__init__.py @@ -25,4 +25,4 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from ._remote_butler import RemoteButler +from ._remote_butler import * diff --git a/python/lsst/daf/butler/remote_butler/_remote_butler.py b/python/lsst/daf/butler/remote_butler/_remote_butler.py index 5f21417a21..a9a0273618 100644 --- a/python/lsst/daf/butler/remote_butler/_remote_butler.py +++ b/python/lsst/daf/butler/remote_butler/_remote_butler.py @@ -25,6 +25,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +__all__ = ("RemoteButler",) + from collections.abc import Collection, Iterable, Sequence from contextlib import AbstractContextManager from typing import Any, TextIO diff --git a/python/lsst/daf/butler/remote_butler/server/__init__.py b/python/lsst/daf/butler/remote_butler/server/__init__.py index a3fea4f9c3..d63badaf11 100644 --- a/python/lsst/daf/butler/remote_butler/server/__init__.py +++ b/python/lsst/daf/butler/remote_butler/server/__init__.py @@ -25,5 +25,5 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from ._factory import Factory -from ._server import app, factory_dependency +from ._factory import * +from ._server import * diff --git a/python/lsst/daf/butler/remote_butler/server/_factory.py b/python/lsst/daf/butler/remote_butler/server/_factory.py index da5ff1b1c9..7d57c9c246 100644 --- a/python/lsst/daf/butler/remote_butler/server/_factory.py +++ b/python/lsst/daf/butler/remote_butler/server/_factory.py @@ -27,6 +27,8 @@ from lsst.daf.butler import Butler +__all__ = ("Factory",) + class Factory: def __init__(self, *, butler: Butler): diff --git a/python/lsst/daf/butler/remote_butler/server/_server.py b/python/lsst/daf/butler/remote_butler/server/_server.py index c27b394c3d..3be9348223 100644 --- a/python/lsst/daf/butler/remote_butler/server/_server.py +++ b/python/lsst/daf/butler/remote_butler/server/_server.py @@ -27,7 +27,7 @@ from __future__ import annotations -__all__ = () +__all__ = ("app", "factory_dependency") import logging from functools import cache