def is_sync_file(filename):
 if isinstance(filename, (str, unicode)):
  extension = filename.rpartition(u'.')[2].lower()
  return ((extension in sickbeard.SYNC_FILES.split(u',')) or filename.startswith(u'.syncthing') or any((fnmatch(filename, match) for match in sickbeard.SYNC_FILES.split(u','))))
 return False

def is_sync_file ( filename ) : if isinstance ( filename , ( str , unicode ) ) : extension = filename . rpartition ( u'.' ) [ 2 ] . lower ( ) return ( ( extension in sickbeard . SYNC_FILES . split ( u',' ) ) or filename . startswith ( u'.syncthing' ) or any ( ( fnmatch ( filename , match ) for match in sickbeard . SYNC_FILES . split ( u',' ) ) ) ) return False
check if the provided filename is a sync file .