Skip to content

fix(agents): add default None values to RetrieverTools class attributes#306

Merged
luarss merged 1 commit into
The-OpenROAD-Project:masterfrom
luarss:fix/retriever-tools-class-attributes
Jun 20, 2026
Merged

fix(agents): add default None values to RetrieverTools class attributes#306
luarss merged 1 commit into
The-OpenROAD-Project:masterfrom
luarss:fix/retriever-tools-class-attributes

Conversation

@luarss

@luarss luarss commented Jun 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Bare type annotations without default values (e.g. install_retriever: Optional[...]) do not create class attributes in Python — they only populate __annotations__
  • This caused hasattr(RetrieverTools, "install_retriever") to return False, breaking TestRetrieverTools.test_class_attributes_structure in CI
  • Added = None defaults to all six retriever class attributes to match the existing None-check guards already present in the code

Test plan

  • pytest tests/test_retriever_tools.py::TestRetrieverTools::test_class_attributes_structure passes
  • Full unit test suite passes

Bare type annotations without default values do not create class
attributes in Python — they only populate __annotations__. This caused
hasattr(RetrieverTools, "install_retriever") to return False, breaking
TestRetrieverTools.test_class_attributes_structure.

Signed-off-by: Jack Luar <jluar@precisioninno.com>
@luarss luarss force-pushed the fix/retriever-tools-class-attributes branch from 9ea639a to 5ef776a Compare June 20, 2026 01:28
@luarss luarss merged commit 3312fe4 into The-OpenROAD-Project:master Jun 20, 2026
6 checks passed
@luarss luarss deleted the fix/retriever-tools-class-attributes branch June 20, 2026 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant