diff --git a/gt/_base_api.py b/gt/_base_api.py deleted file mode 100644 index c71506457..000000000 --- a/gt/_base_api.py +++ /dev/null @@ -1,16 +0,0 @@ -from typing import cast - -from ._tbl_data import TblData, TblDataAPI - - -class BaseAPI: - # It's important that we never keep state in this class, as - # we will be multiply inheriting from it. I think. --jcheng - - def _get_tbl_data(self) -> TblData: - result = cast(TblDataAPI, self)._tbl_data - if result is None: - raise AssertionError( - "BaseAPI._data was called before TblDataAPI was initialized" - ) - return result diff --git a/gt/_boxhead.py b/gt/_boxhead.py index 86d77b323..b0e50ef6c 100644 --- a/gt/_boxhead.py +++ b/gt/_boxhead.py @@ -2,13 +2,12 @@ import pandas as pd -from ._base_api import BaseAPI from ._tbl_data import get_column_names from ._utils import _assert_list_is_subset -class BoxheadAPI(BaseAPI): +class BoxheadAPI(): def cols_label(self, **kwargs: str): """ Relabel one or more columns. diff --git a/gt/_gt_data.py b/gt/_gt_data.py index 0cbaa9421..1f0a47df7 100644 --- a/gt/_gt_data.py +++ b/gt/_gt_data.py @@ -46,7 +46,6 @@ def render_formats( from enum import Enum, auto import pandas as pd -from ._base_api import BaseAPI from ._tbl_data import TblData, get_column_names from ._utils import _assert_list_is_subset @@ -142,7 +141,6 @@ def _get_effective_number_of_columns(self) -> int: from typing import Optional -from ._base_api import BaseAPI from ._tbl_data import TblData, n_rows @@ -395,7 +393,6 @@ def __init__(self, locale: str = ""): from typing import Any, Callable, TypeVar, Union, List, cast, Optional, Tuple -from ._base_api import BaseAPI from ._tbl_data import n_rows FormatFn = Callable[[Any], str] diff --git a/gt/_stub.py b/gt/_stub.py index 5c0a78a24..4f909e4b6 100644 --- a/gt/_stub.py +++ b/gt/_stub.py @@ -1,6 +1,5 @@ from __future__ import annotations -from ._base_api import BaseAPI -class StubAPI(BaseAPI): +class StubAPI(): pass