Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
chore: upgrade required python version to 3.7
  • Loading branch information
jackton1 committed Oct 28, 2022
commit 64bdf4846dd79c82b091243da4d79b86e1773031
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.6.x'
python-version: '3.7.x'

- name: Upgrade pip
run: pip install -U pip
Expand Down
8 changes: 4 additions & 4 deletions github_deploy/commands/_repo_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

async def list_repos(*, session, org, token):
url = REPOS_URL.format(org=org)
click.echo("Retrieving repos at {}".format(url))
click.echo(f"Retrieving repos at {url}")
response = await get(session=session, url=url, headers=get_headers(token=token))
return response

Expand All @@ -25,7 +25,7 @@ async def delete_content(
exists,
current_sha,
):
data = {"message": "Deleted {}".format(dest)}
data = {"message": f"Deleted {dest}"}
if exists:
data["sha"] = current_sha

Expand Down Expand Up @@ -75,9 +75,9 @@ async def upload_content(
return

data = {
"message": "Updated {}".format(dest)
"message": f"Updated {dest}"
if exists
else "Added {}".format(dest),
else f"Added {dest}",
"content": base64_content,
}
if exists:
Expand Down
4 changes: 2 additions & 2 deletions github_deploy/commands/_utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
def get_repo(*, org, project):
return "{org}/{project}".format(project=project, org=org)
return f"{org}/{project}"


def can_upload(*, repo, include_private):
Expand All @@ -12,6 +12,6 @@ def can_upload(*, repo, include_private):

def get_headers(*, token):
return {
"Authorization": "Bearer {token}".format(token=token),
"Authorization": f"Bearer {token}",
"Accept": "application/vnd.github+json",
}
4 changes: 2 additions & 2 deletions github_deploy/commands/delete.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ async def handle_file_delete(*, repo, dest, token, semaphore, session):
)

return click.style(
"No content found at {repo}/{dest}".format(repo=repo, dest=dest),
f"No content found at {repo}/{dest}",
fg="blue",
bold=True,
)
Expand Down Expand Up @@ -100,7 +100,7 @@ async def main(org, token, dest):
)
click.echo(
click.style(
'Deleting "{path}" for all repositories:'.format(path=dest),
f'Deleting "{dest}" for all repositories:',
fg="blue",
)
)
Expand Down
2 changes: 1 addition & 1 deletion github_deploy/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def get_command(self, ctx, name):
eval(code, ns, ns)
return ns["main"]

ctx.fail("Invalid Command \"{name}\"".format(name=name))
ctx.fail(f"Invalid Command \"{name}\"")


main = GithubDeploy(
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
author_email="jtonye@ymail.com",
license="MIT",
packages=find_packages(),
python_requires=">=3.6",
python_requires=">=3.7",
extras_require=extras_require,
install_requires=[
"asyncclick",
Expand Down