Enforce strict type checking and remove suppressions#212
Open
BeathovenGala wants to merge 1 commit into
Open
Conversation
1dae756 to
802a444
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Enable strict type checking and resolve pytype workarounds #206
Description:
This PR enforces strict type checking by removing the lenient configuration and cleaning up explicit suppressions in the codebase.
Changes:
Strict Configuration:
keep_going = true. This ensurespytypefails immediately on errors, enforcing a "zero tolerance" policy for new type violations.Engine Interface Fix:
Engine.next_actingin concordia/environment/engine.py to correctly support parallel engines that return lists of entities instead of just single tuples.tuple[Entity, ActionSpec]tuple[...] | Sequence[Entity] | tuple[Sequence[Entity], ...]Removed Suppressions:
pytype: disable=signature-mismatchfrom 3 engine implementations (parallel_questionnaire.py, sequential_questionnaire.py, simultaneous.py) as they now comply with the widened base class interface.pytype: disable=override-errorfrom entity_agent.py and simple_llm_agent.py.Verification:
Ran full test suite (
pytest --pyargs concordia). All tests passed,(Will work with the tempory fix from #211 or in some time ) confirming that the interface widening did not introduce runtime regressions.