Skip to content
This repository was archived by the owner on Sep 9, 2024. It is now read-only.

Commit 9fa79b1

Browse files
style: auto fixes from pre-commit hooks
1 parent b0535a4 commit 9fa79b1

File tree

3 files changed

+24
-18
lines changed

3 files changed

+24
-18
lines changed

.github/workflows/lint.py

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,42 @@
11
from __future__ import annotations
22

3-
import requests
43
import os
54

5+
import requests
6+
67

78
def job1() -> bool:
89
a = requests.request(
9-
"GET",
10-
f"https://api.github.com/repos/is-a-dev/orangcapp/pulls/{os.environ["PR_NUMBER"]}",
11-
headers={"Accept": "application/vnd.github+json"},
12-
timeout=60
13-
).json()
10+
"GET",
11+
f"https://api.github.com/repos/is-a-dev/orangcapp/pulls/{os.environ["PR_NUMBER"]}",
12+
headers={"Accept": "application/vnd.github+json"},
13+
timeout=60,
14+
).json()
15+
16+
return a["user"]["login"] == os.environ["LINT_CODE"]
1417

15-
return a['user']['login'] == os.environ["LINT_CODE"]
1618

1719
result_1 = job1()
1820

21+
1922
def job2() -> bool:
2023
a = requests.request(
21-
"GET",
22-
f"https://api.github.com/repos/is-a-dev/orangcapp/pulls/{os.environ["PR_NUMBER"]}/reviews",
23-
headers={"Accept": "application/vnd.github+json"},
24-
timeout=60
25-
).json()
26-
27-
l = [x for x in a if x['user']['login'] == os.environ["LINT_CODE"] and x['state'] == "APPROVED"]
24+
"GET",
25+
f"https://api.github.com/repos/is-a-dev/orangcapp/pulls/{os.environ["PR_NUMBER"]}/reviews",
26+
headers={"Accept": "application/vnd.github+json"},
27+
timeout=60,
28+
).json()
29+
30+
l = [
31+
x
32+
for x in a
33+
if x["user"]["login"] == os.environ["LINT_CODE"] and x["state"] == "APPROVED"
34+
]
2835
return len(l) > 0
2936

30-
result_2 = job2()
3137

38+
result_2 = job2()
3239

33-
if not (result_1 or result_2): raise Exception
3440

41+
if not (result_1 or result_2):
42+
raise Exception

.github/workflows/lint.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,3 @@ jobs:
2929
env:
3030
PR_NUMBER: ${{ github.event.number }}
3131
LINT_CODE: ${{ secrets.LINT_CODE }}
32-

.pre-commit-config.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,3 @@ repos:
3636
- id: trailing-whitespace
3737
name: Check for trailing whitespace.
3838
args: [--markdown-linebreak-ext=md]
39-

0 commit comments

Comments
 (0)