mirror of
https://github.com/PaiGramTeam/SIMNet.git
synced 2024-11-21 21:58:05 +00:00
🎨 Rename list
attribute in CalculatorArtifactResult
The `list` attribute in the `CalculatorArtifactResult` class was renamed to `consumable_list`. This was done to avoid confusion and potential issues with the use of `list`, which is a built-in name in Python.
This commit is contained in:
parent
d0f7ec35c3
commit
cc06be92fb
@ -315,12 +315,12 @@ class CalculatorArtifactResult(APIModel):
|
||||
|
||||
Attributes:
|
||||
artifact_id (int): The ID of the artifact.
|
||||
list (List[CalculatorConsumable]): A list of CalculatorConsumable objects representing the consumables
|
||||
used by this artifact.
|
||||
consumable_list (List[CalculatorConsumable]): A list of CalculatorConsumable objects representing the
|
||||
consumables used by this artifact.
|
||||
"""
|
||||
|
||||
artifact_id: int = Field(alias="reliquary_id")
|
||||
list: List[CalculatorConsumable] = Field(alias="id_consume_list")
|
||||
consumable_list: List[CalculatorConsumable] = Field(alias="id_consume_list")
|
||||
|
||||
|
||||
class CalculatorResult(APIModel):
|
||||
@ -347,7 +347,7 @@ class CalculatorResult(APIModel):
|
||||
List[CalculatorConsumable]: A list of CalculatorConsumable objects representing the total
|
||||
consumables used across all categories.
|
||||
"""
|
||||
artifacts = [i for a in self.artifacts for i in a.list]
|
||||
artifacts = [i for a in self.artifacts for i in a.consumable_list]
|
||||
combined = self.character + self.weapon + self.talents + artifacts
|
||||
|
||||
grouped: Dict[int, List[CalculatorConsumable]] = collections.defaultdict(list)
|
||||
|
Loading…
Reference in New Issue
Block a user