📝 docs: WeatherProxy.forecast can raise ComwattAuthError on a proxy 401 #202

Merged
mat merged 1 commit from docs/weather-autherror into main 2026-10-27 14:36:31 +00:00
Owner

Summary

Docstring now matches behavior (#183):

_forecast docstring
- "ComwattAuthError is never raised here"          (false claim)
+ "a 401 from the proxy surfaces as ComwattAuthError through the shared error mapping"

+ test_forecast_proxy_401_raises_auth_error        (pins the actual behavior)

Evidence

  • Before: the docstring promised ComwattAuthError is never raised, but _api_error maps any 401 to it — proven by the new pin test passing against the unmodified code.
    After: docstring states the truth; the pin test locks it in. pytest -q → 243 passed, mypy → clean.

Merge Danger

Door: two-way

Blast Radius: none — documentation + a pin test, zero behavior change.

Closes #183.

## Summary Docstring now matches behavior (#183): ```text _forecast docstring - "ComwattAuthError is never raised here" (false claim) + "a 401 from the proxy surfaces as ComwattAuthError through the shared error mapping" + test_forecast_proxy_401_raises_auth_error (pins the actual behavior) ``` ## Evidence - **Before:** the docstring promised `ComwattAuthError` is never raised, but `_api_error` maps any 401 to it — proven by the new pin test passing against the *unmodified* code. **After:** docstring states the truth; the pin test locks it in. `pytest -q` → 243 passed, `mypy` → clean. ## Merge Danger **Door:** two-way **Blast Radius:** none — documentation + a pin test, zero behavior change. Closes #183.
📝 docs: WeatherProxy.forecast can raise ComwattAuthError on a proxy 401
All checks were successful
Tests / forgejo-pytest (push) Successful in 44s
Tests / forgejo-pytest (pull_request) Successful in 57s
d5de7d7b5c
mat changed title from WIP: 📝 docs: WeatherProxy.forecast can raise ComwattAuthError on a proxy 401 to 📝 docs: WeatherProxy.forecast can raise ComwattAuthError on a proxy 401 2026-10-27 14:36:30 +00:00
mat merged commit 3ed6e0dec9 into main 2026-10-27 14:36:31 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
mat/python-comwatt-client!202
No description provided.