[code-quality] Python source analyzer which is able to detect TypeError when using `in` with dict.get()

2015-08-01 Thread Александр Чекунков
Hi there! Recently I submitted such piece of code to one of my projects: if 'text' in d.get('a'): # do something Obviously that was expected to be something like: if 'text' in d.get('a', ''): # do something because .get() might return None, and checking if something is

Re: [code-quality] Python source analyzer which is able to detect TypeError when using `in` with dict.get()

2015-08-01 Thread Florian Bruhin
* Александр Чекунков [2015-08-01 20:13:34 +0300]: > Hi there! > > Recently I submitted such piece of code to one of my projects: > > if 'text' in d.get('a'): > # do something > > Obviously that was expected to be something like: > > if 'text' in d.get('a', ''): > # do s