Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add has_value method to Context class

  • Loading branch information...
commit 0cb563d9e1604de62a1e547be6fd07755b6b9dba 1 parent 10b55c4
@yumike authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 project/lint/analyzers/context.py
View
6 project/lint/analyzers/context.py
@@ -39,5 +39,11 @@ def has_key(self, key):
return True
return False
+ def has_value(self, value):
+ dict_ = {}
+ for d in self.dicts:
+ dict_.update(d)
+ return value in dict_.values()
+
def __contains__(self, key):
return self.has_key(key)
Please sign in to comment.
Something went wrong with that request. Please try again.