Skip to content
This repository has been archived by the owner on Jun 23, 2020. It is now read-only.

Commit

Permalink
trio.run() does not accept keyword-only arguments (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
brettcannon authored Apr 5, 2020
1 parent cfbd203 commit 00e832a
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions release_often/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,20 +94,18 @@ def upload(output_dir, pypi_token):
)


async def make_release(releases_url, version, changelog_entry, *, oauth_token):
async def make_release(releases_url, version, changelog_entry, oauth_token):
async with gidgethub.httpx.AsyncClient() as client:
gh = gidgethub.httpx.GitHubAPI(
client, "brettcannon/release_often", oauth_token=oauth_token
)
return await release.create(gh, releases_url, version, changelog_entry)


def create_release(version, changelog_entry, *, oauth_token):
def create_release(version, changelog_entry, oauth_token):
event = gidgethub.actions.event()
releases_url = event["repository"]["releases_url"]
return trio.run(
make_release, releases_url, version, changelog_entry, oauth_token=oauth_token
)
return trio.run(make_release, releases_url, version, changelog_entry, oauth_token)


if __name__ == "__main__":
Expand All @@ -125,6 +123,4 @@ def create_release(version, changelog_entry, *, oauth_token):
gidgethub.actions.command(
"debug", "PyPI uploading skipped; no API token provided"
)
upload_url = create_release(
new_version, changelog_entry, oauth_token=args.github_token
)
upload_url = create_release(new_version, changelog_entry, args.github_token)

0 comments on commit 00e832a

Please sign in to comment.