From b16106a11acad7803147c55ef9d53668db0c96bd Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Mon, 6 May 2024 20:27:50 -0500 Subject: [PATCH] Define `__all__` for `rattail.trainwreck.db.model.defaults` module i.e. so custom projects can do this if needed: from rattail.trainwreck.db.model.defaults import * --- CHANGES.rst | 2 ++ rattail/trainwreck/db/model/defaults.py | 14 +++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 79098972..197a23a1 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -7,6 +7,8 @@ Unreleased * Cleanup alembic scripts for trainwreck. +* Define ``__all__`` for ``rattail.trainwreck.db.model.defaults`` module. + 0.11.12 (2024-04-28) -------------------- diff --git a/rattail/trainwreck/db/model/defaults.py b/rattail/trainwreck/db/model/defaults.py index 67f35342..a0256a40 100644 --- a/rattail/trainwreck/db/model/defaults.py +++ b/rattail/trainwreck/db/model/defaults.py @@ -2,7 +2,7 @@ ################################################################################ # # Rattail -- Retail Software Framework -# Copyright © 2010-2022 Lance Edgar +# Copyright © 2010-2024 Lance Edgar # # This file is part of Rattail. # @@ -24,8 +24,6 @@ Trainwreck *default* data models """ -from __future__ import unicode_literals, absolute_import - from rattail.trainwreck.db import model @@ -33,6 +31,16 @@ from rattail.trainwreck.db import model # from rattail.trainwreck.db.model import defaults as trainwreck_model Base = model.Base +# nb. this is here for projects which need to do: +# from rattail.trainwreck.db.model.defaults import * +__all__ = [ + 'Base', + 'Transaction', + 'TransactionOrderMarker', + 'TransactionItem', + 'TransactionItemDiscount', +] + class Transaction(model.TransactionBase, model.Base): """