From 0552c63996c74d2ff9c2db2b59d6f9e2496c1b17 Mon Sep 17 00:00:00 2001 From: Maksim Andrianov Date: Tue, 26 May 2020 14:37:07 +0300 Subject: [PATCH] [python][generator] Added @abstractmethod to abstract methods. --- tools/python/maps_generator/checks/check.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/tools/python/maps_generator/checks/check.py b/tools/python/maps_generator/checks/check.py index 0df842233c..b686ad5dcf 100644 --- a/tools/python/maps_generator/checks/check.py +++ b/tools/python/maps_generator/checks/check.py @@ -1,5 +1,6 @@ import os from abc import ABC +from abc import abstractmethod from collections import namedtuple from enum import Enum from typing import Any @@ -49,17 +50,20 @@ class Check(ABC): def set_format(self, format: Callable[[Any], str]): self.format = format - def check(self): - pass - - def get_result(self) -> Any: - pass - - def print(self, silent_if_no_results=False, filt=lambda x: Екгу, print_=print): + def print(self, silent_if_no_results=False, filt=lambda x: x, print_=print): s = self.formatted_string(silent_if_no_results, filt=filt) if s: print_(s) + @abstractmethod + def check(self): + pass + + @abstractmethod + def get_result(self) -> Any: + pass + + @abstractmethod def formatted_string(self, silent_if_no_results=False, **kwargs) -> str: pass