| Total Complexity | 3 | 
| Total Lines | 14 | 
| Duplicated Lines | 0 % | 
| 1 | # -*- coding: utf-8 -*-  | 
            ||
| 26 | class SNSMessageTranslator(object):  | 
            ||
| 27 | def translate(self, message):  | 
            ||
| 28 | try:  | 
            ||
| 29 | body = json.loads(message['Body'])  | 
            ||
| 30 | message = body['Message']  | 
            ||
| 31 | except (KeyError, TypeError):  | 
            ||
| 32 |             logger.error('Missing Body or Message key in SQS message. It really came from SNS ?') | 
            ||
| 33 |             return {'content': None} | 
            ||
| 34 | |||
| 35 | try:  | 
            ||
| 36 |             return {'content': json.loads(message)} | 
            ||
| 37 | except (json.decoder.JSONDecodeError, TypeError) as exc:  | 
            ||
| 
                                                                                                    
                         1 ignored issue 
                            –
                            show
                         | 
                |||
| 38 | logger.exception(exc)  | 
            ||
| 39 |             return {'content': None} | 
            ||
| 40 | 
This check looks for invalid names for a range of different identifiers.
You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.
If your project includes a Pylint configuration file, the settings contained in that file take precedence.
To find out more about Pylint, please refer to their site.