Skip to content

Implement async functions, async with, await #12

Description

@maldil
async def run_clang_format_on_file(filename, semaphore, verbose=False):
    """
    Run clang-format on the provided file.
    """
    # -style=file picks up the closest .clang-format, -i formats the files inplace.
    cmd = "{} -style=file -i {}".format(CLANG_FORMAT_PATH, filename)
    async with semaphore:
        proc = await asyncio.create_subprocess_shell(cmd)
        _ = await proc.wait()
    if verbose:
        print("Formatted {}".format(filename))

Activity

  1. changed the title [-]async functions[/-] [+]async functions and async with[/+] on Dec 29, 2020
  2. changed the title [-]async functions and async with[/-] [+]Implement async functions, async with, await[/+] on Dec 29, 2020
  3. maldil commented on Dec 29, 2020

    @maldil
    OwnerAuthor

    file2() - TestPyTorch.java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions