mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-12-17 05:11:15 +00:00
feat: use text-analysis to short-circuit strategy loading
This commit is contained in:
@@ -148,6 +148,9 @@ class IResolver:
|
|||||||
logger.debug("Ignoring broken symlink %s", entry)
|
logger.debug("Ignoring broken symlink %s", entry)
|
||||||
continue
|
continue
|
||||||
module_path = entry.resolve()
|
module_path = entry.resolve()
|
||||||
|
if entry.read_text().find(f"class {object_name}(") == -1:
|
||||||
|
logger.debug(f"Skipping {module_path} as it does not contain class {object_name}")
|
||||||
|
continue
|
||||||
|
|
||||||
if obj := next(cls._get_valid_object(module_path, object_name), None):
|
if obj := next(cls._get_valid_object(module_path, object_name), None):
|
||||||
obj[0].__file__ = str(entry)
|
obj[0].__file__ = str(entry)
|
||||||
|
|||||||
Reference in New Issue
Block a user