Remove constructor, it's not needed in the baseclass
This commit is contained in:
parent
20de8c82e4
commit
a3477e07eb
@ -14,16 +14,9 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
class IResolver(object):
|
||||
"""
|
||||
This class contains all the logic to load custom hyperopt class
|
||||
This class contains all the logic to load custom classes
|
||||
"""
|
||||
|
||||
def __init__(self, object_type, config: Optional[Dict] = None) -> None:
|
||||
"""
|
||||
Load the custom class from config parameter
|
||||
:param config: configuration dictionary or None
|
||||
"""
|
||||
config = config or {}
|
||||
|
||||
@staticmethod
|
||||
def _get_valid_objects(object_type, module_path: Path,
|
||||
object_name: str) -> Optional[Type[Any]]:
|
||||
@ -54,7 +47,7 @@ class IResolver(object):
|
||||
:param directory: relative or absolute directory path
|
||||
:return: object instance
|
||||
"""
|
||||
logger.debug('Searching for %s %s in \'%s\'', object_type.__name__, object_name, directory)
|
||||
logger.debug('Searching for %s %s in \'%s\'', object_type.__name__, object_name, directory)
|
||||
for entry in directory.iterdir():
|
||||
# Only consider python files
|
||||
if not str(entry).endswith('.py'):
|
||||
|
Loading…
Reference in New Issue
Block a user