changeset 4504:4d8db57e24fc

state: implement cmdstate.__contains__()
author Anton Shestakov <av6@dwimlabs.net>
date Fri, 12 Apr 2019 02:55:34 +0800
parents fa05bac811f9
children cc2bbe2701a3
files hgext3rd/evolve/state.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/state.py	Thu Apr 11 21:19:01 2019 +0200
+++ b/hgext3rd/evolve/state.py	Fri Apr 12 02:55:34 2019 +0800
@@ -45,6 +45,9 @@
     def __nonzero__(self):
         return self.exists()
 
+    def __contains__(self, key):
+        return key in self.opts
+
     def __getitem__(self, key):
         return self.opts[key]