code: def _list_syntax_error():
      
  
      _, e, _ = sys.exc_info()
      if isinstance(e, SyntaxError) and hasattr(e, 'filename'):
          yield path.dirname(e.filename)
docs: If we're going through a syntax error, add the directory of the error to
      the watchlist.