def is_view_dart_script(view):
    """Checks whether @view looks like a Dart script file.

    Returns `True` if @view's file name ends with '.dart'.
    Returns `False` if @view isn't saved on disk.
    """
    try:
        if view.file_name() is None:
            return False
        return is_dart_script(view.file_name())
    except __HOLE__:
        # view is a path
        return is_dart_script(view)
dataset/ETHPy150Open guillermooo/dart-sublime-bundle/lib/path.py/is_view_dart_script