matrix-nio icon indicating copy to clipboard operation
matrix-nio copied to clipboard

[docs] `AsyncClient()`'s `ssl` has incomplete type hint and docstring

Open opk12 opened this issue 3 years ago • 0 comments

aiohttp.ClientSession.request() (docs) takes ssl: Union[None, bool, ssl.SSLContext, aiohttp.Fingerprint]. The current AsyncClient treats ssl as an opaque value to be forwarded to aiohttp.ClientSession.request() (in AsyncClient.send()). But AsyncClient's ssl parameter type hint and docs do not match aiohttp.

  • The type hint should be complete (source link).
  • The docstring should mention that SSLContext allows for custom certificate validation (e.g. this is passed in by matrix-commander), and aiohttp.Fingerprint for fingerprint validation (Readthedocs link).

opk12 avatar May 23 '22 11:05 opk12