Remove list_files tool
This commit is contained in:
13
nanocode.py
13
nanocode.py
@@ -226,6 +226,19 @@ class RLMCodingConfig(PrecompiledConfig):
|
||||
class RLMCodingProgram(PrecompiledProgram):
|
||||
config: RLMCodingConfig
|
||||
|
||||
def ensure_config(self, config):
|
||||
"""Override to fix Python 3.14 compatibility issue with __annotations__ access."""
|
||||
ConfigClass = self.__class__.__annotations__.get("config", PrecompiledConfig)
|
||||
if config is None:
|
||||
config = ConfigClass()
|
||||
elif isinstance(config, dict):
|
||||
config = ConfigClass(**config)
|
||||
elif type(config) is not ConfigClass:
|
||||
raise ValueError(
|
||||
f"config must be an instance of {self.__class__.__name__}.config, got {type(config)}"
|
||||
)
|
||||
return config
|
||||
|
||||
def __init__(self, config: RLMCodingConfig, **kwargs):
|
||||
super().__init__(config, **kwargs)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user