Fix deferred_format kwargs access && typing
Fix deferred_format kwargs access && typing

- `in kwargs` must be `in kwargs.items()`
- args/kwargs was renamed a/kw because changing types of variables in
  the middle of their lifetime is not something mypy handles well.
  Thusly, the function call `(kw)args` can be distinguished from the
  local variables `(kw)args`
- also, fix some `type[base]` invocations

agdsn/hades,agdsn/hades,agdsn/hades,agdsn/hades,agdsn/hades