8000 Merge pull request #27 from tj-python/chore/upgrade-required-python-v… · tj-python/github-deploy@b8891a9 · GitHub
[go: up one dir, main page]

Skip to content

Commit b8891a9

Browse files
authored
Merge pull request #27 from tj-python/chore/upgrade-required-python-version-to-3.7
chore: upgrade required python version to 3.7
2 parents 7bebc15 + 64bdf48 commit b8891a9

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- name: Set up Python
2020
uses: actions/setup-python@v4
2121
with:
22-
python-version: '3.6.x'
22+
python-version: '3.7.x'
2323

2424
- name: Upgrade pip
2525
run: pip install -U pip

github_deploy/commands/_repo_utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
async def list_repos(*, session, org, token):
1212
url = REPOS_URL.format(org=org)
13-
click.echo("Retrieving repos at {}".format(url))
13+
click.echo(f"Retrieving repos at {url}")
1414
response = await get(session=session, url=url, headers=get_headers(token=token))
1515
return response
1616

@@ -25,7 +25,7 @@ async def delete_content(
2525
exists,
2626
current_sha,
2727
):
28-
data = {"message": "Deleted {}".format(dest)}
28+
data = {"message": f"Deleted {dest}"}
2929
if exists:
3030
data["sha"] = current_sha
3131

@@ -75,9 +75,9 @@ async def upload_content(
7575
return
7676

7777
data = {
78-
"message": "Updated {}".format(dest)
78+
"message": f"Updated {dest}"
7979
if exists
80-
else "Added {}".format(dest),
80+
else f"Added {dest}",
8181
"content": base64_content,
8282
}
8383
if exists:

github_deploy/commands/_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
def get_repo(*, org, project):
2-
return "{org}/{project}".format(project=project, org=org)
2+
return f"{org}/{project}"
33

44

55
def can_upload(*, repo, include_private):
@@ -12,6 +12,6 @@ def can_upload(*, repo, include_private):
1212

1313
def get_headers(*, token):
1414
return {
15-
"Authorization": "Bearer {token}".format(token=token),
15+
"Authorization": f"Bearer {token}",
1616
"Accept": "application/vnd.github+json",
1717
}

github_deploy/commands/delete.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ async def handle_file_delete(*, repo, dest, token, semaphore, session):
5151
)
5252

5353
return click.style(
54-
"No content found at {repo}/{dest}".format(repo=repo, dest=dest),
54+
f"No content found at {repo}/{dest}",
5555
fg="blue",
5656
bold=True,
5757
)
@@ -100,7 +100,7 @@ async def main(org, token, dest):
100100
)
101101
click.echo(
102102
click.style(
103-
'Deleting "{path}" for all repositories:'.format(path=dest),
103+
f'Deleting "{dest}" for all repositories:',
104104
fg="blue",
105105
)
106106
)

github_deploy/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def get_command(self, ctx, name):
2828
eval(code, ns, ns)
2929
return ns["main"]
3030

31-
ctx.fail("Invalid Command \"{name}\"".format(name=name))
31+
ctx.fail(f"Invalid Command \"{name}\"")
3232

3333

3434
main = GithubDeploy(

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
author_email="jtonye@ymail.com",
4646
license="MIT",
4747
packages=find_packages(),
48-
python_requires=">=3.6",
48+
python_requires=">=3.7",
4949
extras_require=extras_require,
5050
install_requires=[
5151
"asyncclick",

0 commit comments

Comments
 (0)
0