mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-12-14 11:51:19 +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)
|
||||
continue
|
||||
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):
|
||||
obj[0].__file__ = str(entry)
|
||||
|
||||
Reference in New Issue
Block a user