mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-09-10 13:29:35 +00:00
ci: make ci happy lint the code, delete unused imports
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
This commit is contained in:
@@ -5,10 +5,12 @@
|
||||
import abc
|
||||
from typing import Any
|
||||
|
||||
|
||||
class Singleton(abc.ABCMeta, type):
|
||||
""" Singleton metaclass for ensuring only one instance of a class"""
|
||||
"""Singleton metaclass for ensuring only one instance of a class"""
|
||||
|
||||
_instances = {}
|
||||
|
||||
def __call__(cls, *args: Any, **kwargs: Any) -> Any:
|
||||
"""Call method for the singleton metaclass"""
|
||||
if cls not in cls._instances:
|
||||
@@ -18,4 +20,5 @@ class Singleton(abc.ABCMeta, type):
|
||||
|
||||
class AbstractSingleton(abc.ABC, metaclass=Singleton):
|
||||
"""Abstract singleton class for ensuring only one instance of a class"""
|
||||
pass
|
||||
|
||||
pass
|
||||
|
Reference in New Issue
Block a user