state: implement cmdstate.__contains__()
authorAnton Shestakov <av6@dwimlabs.net>
Fri, 12 Apr 2019 02:55:34 +0800
changeset 4504 4d8db57e24fc
parent 4503 fa05bac811f9
child 4505 cc2bbe2701a3
state: implement cmdstate.__contains__()
hgext3rd/evolve/state.py
--- 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]