Bibo-Joshi · GitHub

Addresses the second part of and closes #2901.

I double checked: numbers and strings are indeed different things in json, so this won't be a problem. My concerns in #2901 (comment) probably came from my subconscious recalling that keys can only be strings in json, which is why json.dumps({1: '1'}) == '{"1": 1}' and json.loads('{"1": 1}') == {"1": 1}.

This also makes RetryAfter.retry_after an integer b/c that's what TG documents (this is a tiny breaking change) and adds some missing docs to the error module.

Checklist for PRs

  • Added .. versionadded:: version, .. versionchanged:: version or .. deprecated:: version to the docstrings for user facing changes (for methods/class descriptions, arguments and attributes)
  • Created new or adapted existing unit tests
  • Documented code changes according to the CSI standard
  • Added myself alphabetically to AUTHORS.rst (optional)
  • Added new classes & modules to the docs and all suitable __all__ s

Read the original on github.com ↗