4
1
Fork 1
This repository has been archived on 2024-08-07. You can view files and clone it, but cannot push or open issues or pull requests.
qBitDownload-Bot/tubot/static/abc.py

25 lines
558 B
Python

# -*- coding: utf-8 -*-
##########################################
# Shared Abstract classes and interfaces #
##########################################
# Imports
from abc import ABC, abstractmethod
class IValidatable(ABC):
"""
Interface initializing a class with a magic method for
checking the validity of its objects
"""
@abstractmethod
async def __validate__(self) -> bool:
"""
Checks if the object of the class is valid
:return: Object validity boolean
"""
raise NotImplementedError