Skip to content

Commit ef5fe0c

Browse files
make the class appropriately abstract
1 parent 732a998 commit ef5fe0c

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/datacustomcode/common_config.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
15+
from abc import ABC, abstractmethod
1516
import os
1617
from typing import Any
1718

@@ -48,9 +49,9 @@ class BaseObjectConfig(ForceableConfig):
4849
)
4950

5051

51-
class BaseConfig(BaseModel):
52-
def update(self, other: Any) -> "BaseConfig":
53-
raise NotImplementedError("Subclasses must implement update method")
52+
class BaseConfig(ABC, BaseModel):
53+
@abstractmethod
54+
def update(self, other: Any) -> "BaseConfig": ...
5455

5556
def load(self, config_path: str) -> "BaseConfig":
5657
"""Load configuration from a YAML file and merge with existing config"""

0 commit comments

Comments
 (0)