Add missing modules in py2stdlib brain hashlib. Closes #123056

authorTorsten Marek <tmarek@google.com>
changeset7fdc570abc61
branchstable
phasepublic
hiddenno
parent revision#143fabd33f9e Use correct argument names in the py2stdlib brain urlparse module. Closes #123062
child revision#99125c558945 Fix inference for generator methods to correctly handle yields in lambdas. Closes #123068
files modified by this revision
ChangeLog
brain/py2stdlib.py
# HG changeset patch
# User Torsten Marek <tmarek@google.com>
# Date 1364383577 -3600
# Wed Mar 27 12:26:17 2013 +0100
# Branch stable
# Node ID 7fdc570abc61971b16195532cec3401c86f78552
# Parent 143fabd33f9e503bfdb46db850d6968e233caf70
Add missing modules in py2stdlib brain hashlib. Closes #123056

diff --git a/ChangeLog b/ChangeLog
@@ -2,10 +2,11 @@
1  ================================
2 
3  --
4 
5      * #123062 [pylint-brain]: Use correct names for keywords for urlparse
6 +    * #123056 [pylint-brain]: Add missing methods for hashlib
7 
8  2013-02-27  -- 0.24.2
9      * pylint-brain: more subprocess.Popen faking (see #46273)
10      * #109562 [jython]: java modules have no __doc__, causing crash
11      * #120646 [py3]: fix for python3.3 _ast changes which may cause crash
diff --git a/brain/py2stdlib.py b/brain/py2stdlib.py
@@ -13,15 +13,21 @@
12  def hashlib_transform(module):
13      fake = ASTNGBuilder(MANAGER).string_build('''
14 
15  class md5(object):
16    def __init__(self, value): pass
17 +  def digest():
18 +    return u''
19 +  def update(self, value): pass
20    def hexdigest(self):
21      return u''
22 
23  class sha1(object):
24    def __init__(self, value): pass
25 +  def digest():
26 +    return u''
27 +  def update(self, value): pass
28    def hexdigest(self):
29      return u''
30 
31  ''')
32      for hashfunc in ('sha1', 'md5'):