fix(annotations): derive the suggestion cap from the image tag set cap
py/autotag.py now takes MAX_SUGGESTION_LIMIT from database.annotations MAX_IMAGE_TAGS. The two copies that cannot import it (py/config.py loads before the database, utils/inspection_response.py stays storage-free) are pinned equal by a test, so the 100 limits cannot drift apart.
This commit is contained in:
@@ -13,7 +13,8 @@ if TYPE_CHECKING:
|
||||
|
||||
MAX_RESPONSE_BYTES = 8 * 1024 * 1024
|
||||
MAX_LIBRARY_BYTES = 32 * 1024
|
||||
# The image tag set cap (database/annotations.py MAX_IMAGE_TAGS).
|
||||
# The image tag set cap (database/annotations.py MAX_IMAGE_TAGS; pinned equal
|
||||
# by tests/test_config.py).
|
||||
MAX_IMAGE_TAGS = 100
|
||||
_IMAGE_TAG_STATES = frozenset({"current", "none", "unavailable"})
|
||||
_MAX_SAFE_INTEGER = 2**53 - 1
|
||||
|
||||
Reference in New Issue
Block a user