parameters: (self, result)
docstring: Fix comparison with None.
docstring_summary: Fix comparison with None.
docstring_tokens: Fix comparison with None .
function: def fix_e711(self, result):
          """Fix comparison with None."""
          (line_index, offset, target) = get_index_offset_contents(result,
                                                                   self.source)
  
          right_offset = offset + 2
          if right_offset >= len(target):
              return []
  
          left = target[:offset].rstrip()
          center = target[offset:right_offset]
          right = target[right_offset:].lstrip()
  
          if not right.startswith('None'):
              return []
  
          if center.strip() == '==':
              new_center = 'is'
          elif center.strip() == '!=':
              new_center = 'is not'
          else:
              return []
  
          self.source[line_index] = ' '.join([left, new_center, right])
function_tokens: def fix_e711 ( self , result ) : ( line_index , offset , target ) = get_index_offset_contents ( result , self . source ) right_offset = offset + 2 if right_offset >= len ( target ) : return [ ] left = target [ : offset ] . rstrip ( ) center = target [ offset : right_offset ] right = target [ right_offset : ] . lstrip ( ) if not right . startswith ( 'None' ) : return [ ] if center . strip ( ) == '==' : new_center = 'is' elif center . strip ( ) == '!=' : new_center = 'is not' else : return [ ] self . source [ line_index ] = ' ' . join ( [ left , new_center , right ] )