Pylint and the Module hashlib has no md5 member Error

How to avoid PyLint's Module 'hashlib' has no 'md5' member error when using hashlib's md5() function in your code, and the consequences of doing so.

I do not use md5 much at all these days, as it is known to be fairly unsafe; having said that, md5 does still have its uses when it comes to comparing file likeness in non-critical applications. It just so happens that PyLint does not seem to like invoking hashlib with specific constructors and will therefore mark down code ratings as a result. See the example below:

>>> import hashlib
>>> HASH = hashlib.md5()
>>> HASH.update('Test my hash')
>>> HASH.hexdigest()

View comments.

more ...