def check_spelling():
 words = {'[Bb]ehaviour', '[Qq]uitted', 'Ll]ikelyhood', '[Ss]ucessfully', '[Oo]ccur[^rs .]', '[Ss]eperator', '[Ee]xplicitely', '[Aa]uxillary', '[Aa]ccidentaly', '[Aa]mbigious', '[Ll]oosly', '[Ii]nitialis', '[Cc]onvienence', '[Ss]imiliar', '[Uu]ncommited', '[Rr]eproducable', '[Aa]n [Uu]ser', '[Cc]onvienience', '[Ww]ether', '[Pp]rogramatically', '[Ss]plitted', '[Ee]xitted', '[Mm]ininum', '[Rr]esett?ed', '[Rr]ecieved', '[Rr]egularily', '[Uu]nderlaying', '[Ii]nexistant', '[Ee]lipsis', 'commiting', 'existant', '[Rr]esetted'}
 words |= {'[Ww]ebelements', '[Mm]ouseevent', '[Kk]eysequence', '[Nn]ormalmode', '[Ee]ventloops', '[Ss]izehint', '[Ss]tatemachine', '[Mm]etaobject', '[Ll]ogrecord', '[Ff]iletype'}
 ignored = [os.path.join('.', 'scripts', 'dev', 'misc_checks.py'), os.path.join('.', 'qutebrowser', '3rdparty', 'pdfjs'), os.path.join('.', 'tests', 'end2end', 'data', 'hints', 'ace', 'ace.js')]
 seen = collections.defaultdict(list)
 try:
  ok = True
  for fn in _get_files():
   with tokenize.open(fn) as f:
    if any((fn.startswith(i) for i in ignored)):
     continue
    for line in f:
     for w in words:
      if (re.search(w, line) and (fn not in seen[w]) and ('# pragma: no spellcheck' not in line)):
       print 'Found "{}" in {}!'.format(w, fn)
       seen[w].append(fn)
       ok = False
  print ()
  return ok
 except Exception:
  traceback.print_exc()
  return None

def check_spelling ( ) : words = { '[Bb]ehaviour' , '[Qq]uitted' , 'Ll]ikelyhood' , '[Ss]ucessfully' , '[Oo]ccur[^rs .]' , '[Ss]eperator' , '[Ee]xplicitely' , '[Aa]uxillary' , '[Aa]ccidentaly' , '[Aa]mbigious' , '[Ll]oosly' , '[Ii]nitialis' , '[Cc]onvienence' , '[Ss]imiliar' , '[Uu]ncommited' , '[Rr]eproducable' , '[Aa]n [Uu]ser' , '[Cc]onvienience' , '[Ww]ether' , '[Pp]rogramatically' , '[Ss]plitted' , '[Ee]xitted' , '[Mm]ininum' , '[Rr]esett?ed' , '[Rr]ecieved' , '[Rr]egularily' , '[Uu]nderlaying' , '[Ii]nexistant' , '[Ee]lipsis' , 'commiting' , 'existant' , '[Rr]esetted' } words |= { '[Ww]ebelements' , '[Mm]ouseevent' , '[Kk]eysequence' , '[Nn]ormalmode' , '[Ee]ventloops' , '[Ss]izehint' , '[Ss]tatemachine' , '[Mm]etaobject' , '[Ll]ogrecord' , '[Ff]iletype' } ignored = [ os . path . join ( '.' , 'scripts' , 'dev' , 'misc_checks.py' ) , os . path . join ( '.' , 'qutebrowser' , '3rdparty' , 'pdfjs' ) , os . path . join ( '.' , 'tests' , 'end2end' , 'data' , 'hints' , 'ace' , 'ace.js' ) ] seen = collections . defaultdict ( list ) try : ok = True for fn in _get_files ( ) : with tokenize . open ( fn ) as f : if any ( ( fn . startswith ( i ) for i in ignored ) ) : continue for line in f : for w in words : if ( re . search ( w , line ) and ( fn not in seen [ w ] ) and ( '# pragma: no spellcheck' not in line ) ) : print 'Found "{}" in {}!' . format ( w , fn ) seen [ w ] . append ( fn ) ok = False print ( ) return ok except Exception : traceback . print_exc ( ) return None
check spelling .