obriencj / koji-smoky-dingo

Command line client plugins for koji
GNU General Public License v3.0
11 stars 2 forks source link

start using koji.ClientSession.multicall as a context manager #172

Closed obriencj closed 7 months ago

obriencj commented 7 months ago

since koji >= 1.18 multicall has been available to use as a context manager. Let's start taking advantage of that feature finally.

obriencj commented 7 months ago

we should also take care to finally document that interface in our typing stubs

obriencj commented 7 months ago

this makes it very difficult to work with mypy for type checking, as the managed interface context manager returns result wrappers rather than the normal values from the calls. I'd need to write some sort of specialty type that decorated the entire signature of the client session.

obriencj commented 7 months ago

solved the mypy issue with a custom plugin. nothing needs converting to context currently. closing.