From 86ffac8d670a66dc09ff843f47c56572548ae0db Mon Sep 17 00:00:00 2001 From: Daniel Tomlinson Date: Mon, 24 Jan 2022 21:25:02 +0000 Subject: [PATCH] chore: remove duplicate abstract `Page` from pages submodule --- tembo/journal/pages.py | 56 ------------------------------------------ 1 file changed, 56 deletions(-) diff --git a/tembo/journal/pages.py b/tembo/journal/pages.py index 5f94622..f3f0523 100644 --- a/tembo/journal/pages.py +++ b/tembo/journal/pages.py @@ -4,7 +4,6 @@ from __future__ import annotations import pathlib import re -from abc import ABCMeta, abstractmethod from dataclasses import dataclass from typing import Collection, Optional @@ -356,61 +355,6 @@ class ScopedPageCreator(PageCreator): return tokenified_string -class Page(metaclass=ABCMeta): - """ - Abstract Page class. - - This interface is used to define a `Page` object. - - A `Page` represents a note/page that will be saved to disk. - - !!! abstract - This object is an abstract base class and should be implemented for each `Page` type. - """ - - @abstractmethod - def __init__(self, path: pathlib.Path, page_content: str) -> None: - """ - When implemented this should initalise a Page object. - - Args: - path (pathlib.Path): the full path of the page including the filename as a - [Path][pathlib.Path]. - page_content (str): the contents of the page. - - !!! abstract - This method is abstract and should be implemented for each `Page` type. - """ - raise NotImplementedError - - @property - @abstractmethod - def path(self) -> pathlib.Path: - """ - When implemented this should return the full path of the page including the filename. - - Returns: - pathlib.Path: the path as a [Path][pathlib.Path] object. - - !!! abstract - This property is abstract and should be implemented for each `Page` type. - """ - raise NotImplementedError - - @abstractmethod - def save_to_disk(self) -> tembo.utils.Success: - """ - When implemented this should save the page to disk. - - Returns: - tembo.utils.Success: A Tembo [Success][tembo.utils.__init__.Success] object. - - !!! abstract - This method is abstract and should be implemented for each `Page` type. - """ - raise NotImplementedError - - class ScopedPage(Page): """ A page that uses substitute tokens.