mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
1) Remove Python's 'Six' package completely. #5357
2) Replace deprecated @abstractproperty with @property, @abstractmethod.
This commit is contained in:
@@ -9,7 +9,6 @@
|
||||
|
||||
"""External 2FA Authentication Registry."""
|
||||
from abc import abstractmethod, abstractproperty
|
||||
import six
|
||||
from typing import Union
|
||||
|
||||
import flask
|
||||
@@ -50,8 +49,7 @@ MultiFactorAuthRegistry = create_registry_metaclass(
|
||||
)
|
||||
|
||||
|
||||
@six.add_metaclass(MultiFactorAuthRegistry)
|
||||
class BaseMFAuth():
|
||||
class BaseMFAuth(metaclass=MultiFactorAuthRegistry):
|
||||
"""
|
||||
Base Multi-Factor Authentication (MFA) class
|
||||
|
||||
@@ -60,7 +58,8 @@ class BaseMFAuth():
|
||||
available as a MFA method.
|
||||
"""
|
||||
|
||||
@abstractproperty
|
||||
@property
|
||||
@abstractmethod
|
||||
def name(self) -> str:
|
||||
"""
|
||||
Represents the short name for the authentiation method. It can be used
|
||||
@@ -74,7 +73,8 @@ class BaseMFAuth():
|
||||
"""
|
||||
pass
|
||||
|
||||
@abstractproperty
|
||||
@property
|
||||
@abstractmethod
|
||||
def label(self) -> str:
|
||||
"""
|
||||
Represents the user visible name for the authentiation method. It will
|
||||
|
||||
Reference in New Issue
Block a user