style: drop inline comments in the template-field error path
the rationale they carried is already in the ValueError message; the lib convention is docstrings only. Signed-off-by: disqualifier <dev@disqualifier.me>
This commit is contained in:
parent
aa661bd6de
commit
f618b6a6a1
@ -9,9 +9,9 @@ edits. **Credentials are always injected — never hardcoded.**
|
|||||||
## Install
|
## Install
|
||||||
|
|
||||||
```
|
```
|
||||||
aioproxies @ git+ssh://git@git.rethinkstudios.io/rethink-public/aioproxies.git@v0.2.0
|
aioproxies @ git+ssh://git@git.rethinkstudios.io/rethink-public/aioproxies.git@v0.2.1
|
||||||
# network helpers (current_ip / reset) need the extra:
|
# network helpers (current_ip / reset) need the extra:
|
||||||
aioproxies[net] @ git+ssh://git@git.rethinkstudios.io/rethink-public/aioproxies.git@v0.2.0
|
aioproxies[net] @ git+ssh://git@git.rethinkstudios.io/rethink-public/aioproxies.git@v0.2.1
|
||||||
```
|
```
|
||||||
|
|
||||||
The core has no dependencies. The `net` extra adds `aiohttp` for `current_ip` /
|
The core has no dependencies. The `net` extra adds `aiohttp` for `current_ip` /
|
||||||
|
|||||||
@ -126,8 +126,6 @@ class AioProxies:
|
|||||||
try:
|
try:
|
||||||
filled = self.template.format(session=self.session_id(), **fields)
|
filled = self.template.format(session=self.session_id(), **fields)
|
||||||
except (KeyError, IndexError) as exc:
|
except (KeyError, IndexError) as exc:
|
||||||
# a template placeholder wasn't supplied in next(**fields) — fail loud
|
|
||||||
# but legible instead of leaking a bare KeyError from str.format
|
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
f"template placeholder {exc} not provided; pass it to next(**fields)"
|
f"template placeholder {exc} not provided; pass it to next(**fields)"
|
||||||
) from exc
|
) from exc
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user