From 9471ae5b06a246e974133d73f8b09b458a2c4413 Mon Sep 17 00:00:00 2001 From: Mike Benza Date: Thu, 25 Mar 2021 06:52:07 -0700 Subject: [PATCH] Add operations to dir(...) result on clients (#94) Co-authored-by: Mike Benza --- almdrlib/client.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/almdrlib/client.py b/almdrlib/client.py index bf5e84d..40acd3a 100644 --- a/almdrlib/client.py +++ b/almdrlib/client.py @@ -783,6 +783,10 @@ def __getattr__(self, op_name): f"'{type(self).__name__}' object has no attribute '{op_name}'" ) + def __dir__(self): + # Add in operation names + return super().__dir__() + list(self._operations.keys()) + def _normalize_schema(name, schema, required=False): properties = schema.get(OpenAPIKeyWord.PROPERTIES)