mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-01 20:36:21 -05:00
Remove unused code found by vulture (#885)
Deletes functions, methods, classes, schema dataclasses, error classes, Events senders, and module-level constants that nothing references, including tests. Also drops the unused `doc_cleanup(test_directory)` and `_wait_for_sub_job_with_progress(collection_idx)` parameters, and the imports that only served removed code. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
a248104b2f
commit
22ada7eb57
34 changed files with 9 additions and 586 deletions
|
|
@ -5,14 +5,12 @@ All files are loaded into one shared, cross-worker dict keyed by slug. Unit mat
|
|||
frontend (mathjs), so this module treats item field values as opaque strings/numbers.
|
||||
"""
|
||||
from dataclasses import dataclass, field
|
||||
from pathlib import Path
|
||||
from typing import List, Optional
|
||||
|
||||
from wrolpi.common import logger, MultiFileConfig, read_config_data
|
||||
from wrolpi.errors import ValidationError
|
||||
from .defaults import (DEFAULT_INVENTORIES, FIELD_TYPES, default_fields, slugify)
|
||||
|
||||
MY_DIR: Path = Path(__file__).parent
|
||||
|
||||
logger = logger.getChild(__name__)
|
||||
|
||||
|
|
|
|||
|
|
@ -94,7 +94,6 @@ DEFAULT_FIELD_SETS = {
|
|||
# The first/default type used when a type is not specified (e.g. legacy migration).
|
||||
DEFAULT_TYPE = 'food'
|
||||
|
||||
INVENTORY_TYPES = tuple(DEFAULT_FIELD_SETS.keys())
|
||||
|
||||
# Recommended package counts for a one-adult, one-year (~3,000 kcal/day) food supply, keyed by the shipped
|
||||
# food-catalog id (see catalog_defaults.yaml). Transcribed from the same "One-Year Emergency Food Supply for One
|
||||
|
|
|
|||
|
|
@ -9,12 +9,6 @@ class UnknownInventory(APIError):
|
|||
status_code = HTTPStatus.NOT_FOUND
|
||||
|
||||
|
||||
class InvalidFieldSchema(APIError):
|
||||
code = 'INVALID_FIELD_SCHEMA'
|
||||
summary = 'The inventory field schema is invalid'
|
||||
status_code = HTTPStatus.BAD_REQUEST
|
||||
|
||||
|
||||
class InventoryConflict(APIError):
|
||||
code = 'INVENTORY_CONFLICT'
|
||||
summary = 'The inventory was modified since it was loaded'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue