mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
style(baseline): typehint call-return locals in CalculatorRebaseliner
PR feedback: annotate locals assigned from a method-call return or attribute access, even though pyright infers them — the type is visible at the assignment without chasing the callee. `result: SapResult` and `sap_version: Optional[float]` in rebaseline(). Local annotations are not evaluated at runtime, so the TYPE_CHECKING-only SapResult import stands. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
bce4a9f7ec
commit
389e39012d
1 changed files with 2 additions and 2 deletions
|
|
@ -59,8 +59,8 @@ class CalculatorRebaseliner(Rebaseliner):
|
|||
) -> tuple[Performance, RebaselineReason]:
|
||||
# A raise (UnmappedSapCode, etc.) propagates: the calculator is
|
||||
# load-bearing, so the batch aborts and the cert is fixed at once.
|
||||
result = self._calculator.calculate(effective_epc)
|
||||
sap_version = effective_epc.sap_version
|
||||
result: SapResult = self._calculator.calculate(effective_epc)
|
||||
sap_version: Optional[float] = effective_epc.sap_version
|
||||
if sap_version is not None and sap_version < _SAP10_2_FLOOR:
|
||||
return performance_from_sap_result(result), "pre_sap10"
|
||||
self._log_divergence(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue