fix(viewer): drop undefined MAX_ENTITIES_PER_ANNOTATION from __all__ - #31
Merged
NiJingzhe merged 1 commit intoSep 11, 2026
Merged
Conversation
viewer/server/runtime.py lists MAX_ENTITIES_PER_ANNOTATION in __all__, but the name is not defined in the module -- it appears nowhere else in the repository. The other 8 entries all resolve. `from viewer.server.runtime import *` therefore fails with AttributeError: module has no attribute 'MAX_ENTITIES_PER_ANNOTATION'.
Owner
|
Thanks @Anai-Guo — nice catch and a textbook bug report: verified the reproduction, confirmed the stale entry, and appreciated that you checked the other 8 names in |
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.
Problem
viewer/server/runtime.pyexportsMAX_ENTITIES_PER_ANNOTATIONin__all__, but no such name exists — it is not defined in the module, andgrepover the whole repository finds exactly one occurrence: the__all__entry itself. There is also no annotation-limit logic anywhere that such a constant would serve, so it looks like a leftover from a constant that was planned or removed (MAX_ADJACENCY_IDS, right above it, does exist).Checked the rest of the list with an AST pass — the other 8 entries all resolve:
Impact
__all__is whatimport *iterates, so the star-import form of this module raises. The module imports only stdlib, so this reproduces standalone:Before
After
The existing importers (
viewer/server/server.py,tests/test_viewer_re_server.py) all use explicitfrom ... import (...)lists, so nothing in the repo hits this today — but it also means the entry silently breaksimport *,help(), and any autodoc pass over the module.Fix
Removes the one stale line. No other changes.
🤖 Generated with Claude Code