mirror of
https://github.com/kennethreitz/httpbin.git
synced 2026-06-05 14:50:17 +00:00
pylint
This commit is contained in:
Vendored
+1
@@ -5,6 +5,7 @@ import os
|
||||
from fabric.api import *
|
||||
|
||||
|
||||
|
||||
CMD_TEMPLATE = '{0}'
|
||||
EPIO_TEMPLATE = 'epio {0}'
|
||||
|
||||
|
||||
@@ -18,12 +18,10 @@ class CaseInsensitiveDict(dict):
|
||||
def _lower_keys(self):
|
||||
return map(str.lower, self.keys())
|
||||
|
||||
|
||||
def __contains__(self, key):
|
||||
return key.lower() in self._lower_keys()
|
||||
|
||||
|
||||
def __getitem__(self, key):
|
||||
# We allow fall-through here, so values default to None
|
||||
if key in self:
|
||||
return self.items()[self._lower_keys().index(key.lower())][1]
|
||||
return self.items()[self._lower_keys().index(key.lower())][1]
|
||||
|
||||
Reference in New Issue
Block a user