fix(lingbot): drop undefined name from runtime __all__ - #505
Draft
rootkiller6788 wants to merge 1 commit into
Draft
fix(lingbot): drop undefined name from runtime __all__#505rootkiller6788 wants to merge 1 commit into
rootkiller6788 wants to merge 1 commit into
Conversation
__all__ listed replay_inputs_from_inference_input, but the module never defined it (only the inverse inference_input_from_replay_inputs exists). from lingbot.runtime import * would fail with AttributeError on the missing export. Remove the dangling entry and add a regression test that asserts every __all__ name is defined.
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.
What
integrations/lingbot/lingbot/runtime.pydeclares"replay_inputs_from_inference_input"in__all__, but the module (and the whole repo) never defines that name — the implemented conversion isinference_input_from_replay_inputs, the opposite direction.Why it matters
from lingbot.runtime import *iterates__all__and raisesAttributeError: module 'lingbot.runtime' has no attribute 'replay_inputs_from_inference_input'on the first missing name. The dangling entry also fails pyflakes (undefined name ... in __all__) and ruff's F822, so lint breaks on the file.LingbotReplayInputsrequirescamera_poses_path/camera_intrinsics_paththatInferenceInputnever carries, so a faithful inverse cannot be implemented — the entry is simply stale.Changes
replay_inputs_from_inference_inputentry from__all__.integrations/lingbot/tests/test_runtime_public_api.py(ci_cpu) asserting every__all__name resolves on the module, guarding against future drift.Verification
python -m pyflakes integrations/lingbot/lingbot/runtime.pyno longer reportsundefined name 'replay_inputs_from_inference_input' in __all__.__all__lists an undefined name failsfrom <mod> import *withAttributeError.