virtual/lib/python3.9/site-packages/click/utils.py
def open_file(filename, mode='r', encoding=None, errors='strict',
              lazy=False, atomic=False):
    """This is similar to how the :class:`File` works but for manual
    usage.  Files are opened non lazy by default.  This can open regular
    files as well as stdin/stdout if ``'-'`` is passed.

    If stdin/stdout is returned the stream is wrapped so that the context
    manager will not close the stream accidentally.  This makes it possible
    to always use the function like this without having to worry to
    accidentally close a standard stream::

        with open_file(filename) as f:
            ...

    .. versionadded:: 3.0

    :param filename: the name of the file to open (or ``'-'`` for stdin/stdout).
    :param mode: the mode in which to open the file.
    :param encoding: the encoding to use.
    :param errors: the error handling for this file.
    :param lazy: can be flipped to true to open the file lazily.
    :param atomic: in atomic mode writes go into a temporary file and it's
                   moved on close.
    """
    if lazy:
        return LazyFile(filename, mode, encoding, errors, atomic=atomic)
    f, should_close = open_stream(filename, mode, encoding, errors,
                                  atomic=atomic)
    if not should_close:
        f = KeepOpenFile(f)
    return f
This is similar to how the :class:`File` works but for manual
    usage.  Files are opened non lazy by default.  This can open regular
    files as well as stdin/stdout if ``'-'`` is passed.

    If stdin/stdout is returned the stream is wrapped so that the context
    manager will not close the stream accidentally.  This makes it possible
    to always use the function like this without having to worry to
    accidentally close a standard stream::

        with open_file(filename) as f:
            ...

    .. versionadded:: 3.0

    :param filename: the name of the file to open (or ``'-'`` for stdin/stdout).
    :param mode: the mode in which to open the file.
    :param encoding: the encoding to use.
    :param errors: the error handling for this file.
    :param lazy: can be flipped to true to open the file lazily.
    :param atomic: in atomic mode writes go into a temporary file and it's
                   moved on close.
    
This is similar to how the :class:`File` works but for manual
usage.  Files are opened non lazy by default.  This can open regular
files as well as stdin/stdout if ``'-'`` is passed.

If stdin/stdout is returned the stream is wrapped so that the context
manager will not close the stream accidentally.  This makes it possible
to always use the function like this without having to worry to
accidentally close a standard stream:.




This is similar to how the : class : ` File ` works but for manual usage . Files are opened non lazy by default . This can open regular files as well as stdin / stdout if ` ` ' - ' ` ` is passed . If stdin / stdout is returned the stream is wrapped so that the context manager will not close the stream accidentally . This makes it possible to always use the function like this without having to worry to accidentally close a standard stream : .
def open_file(filename, mode='r', encoding=None, errors='strict',
              lazy=False, atomic=False):
    if lazy:
        return LazyFile(filename, mode, encoding, errors, atomic=atomic)
    f, should_close = open_stream(filename, mode, encoding, errors,
                                  atomic=atomic)
    if not should_close:
        f = KeepOpenFile(f)
    return f
def open_file ( filename , mode = 'r' , encoding = None , errors = 'strict' , lazy = False , atomic = False ) : if lazy : return LazyFile ( filename , mode , encoding , errors , atomic = atomic ) f , should_close = open_stream ( filename , mode , encoding , errors , atomic = atomic ) if not should_close : f = KeepOpenFile ( f ) return f
This is similar to how the :class:`File` works but for manual
usage.
This is similar to how the : class : ` File ` works but for manual usage .
"""This is similar to how the :class:`File` works but for manual
    usage.  Files are opened non lazy by default.  This can open regular
    files as well as stdin/stdout if ``'-'`` is passed.

    If stdin/stdout is returned the stream is wrapped so that the context
    manager will not close the stream accidentally.  This makes it possible
    to always use the function like this without having to worry to
    accidentally close a standard stream::

        with open_file(filename) as f:
            ...

    .. versionadded:: 3.0

    :param filename: the name of the file to open (or ``'-'`` for stdin/stdout).
    :param mode: the mode in which to open the file.
    :param encoding: the encoding to use.
    :param errors: the error handling for this file.
    :param lazy: can be flipped to true to open the file lazily.
    :param atomic: in atomic mode writes go into a temporary file and it's
                   moved on close.
    """
filename
the name of the file to open (or ``'-'`` for stdin/stdout).
the name of the file to open ( or ` ` ' - ' ` ` for stdin / stdout ) .
mode
the mode in which to open the file.
the mode in which to open the file .
encoding
the encoding to use.
the encoding to use .
errors
the error handling for this file.
the error handling for this file .
lazy
can be flipped to true to open the file lazily.
can be flipped to true to open the file lazily .
atomic
in atomic mode writes go into a temporary file and it's
moved on close.
in atomic mode writes go into a temporary file and it ' s moved on close .