Skip to content

Commit f29ddfc

Browse files
committed
Fix linter errors
1 parent 743d0ae commit f29ddfc

2 files changed

Lines changed: 8 additions & 9 deletions

File tree

skills/rhdh-test-plan-review/scripts/check_gsheets.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
import shutil
88
import subprocess
99
import sys
10-
from pathlib import Path
11-
1210

1311
_no_color = os.environ.get("NO_COLOR") is not None
1412
_is_tty = sys.stderr.isatty() and not _no_color
@@ -24,19 +22,20 @@ def get_gcloud_token():
2422
gcloud = shutil.which("gcloud")
2523
if not gcloud:
2624
for candidate in [
27-
Path.home() / "Downloads/google-cloud-sdk/bin/gcloud",
28-
Path("/usr/lib/google-cloud-sdk/bin/gcloud"),
29-
Path("/opt/homebrew/bin/gcloud"),
25+
os.path.expanduser("~/Downloads/google-cloud-sdk/bin/gcloud"),
26+
"/usr/lib/google-cloud-sdk/bin/gcloud",
27+
"/opt/homebrew/bin/gcloud",
3028
]:
31-
if candidate.exists():
32-
gcloud = str(candidate)
29+
if os.path.exists(candidate):
30+
gcloud = candidate
3331
break
3432
if not gcloud:
3533
return None, "gcloud not found in PATH"
3634

3735
result = subprocess.run(
3836
[gcloud, "auth", "print-access-token"],
39-
capture_output=True, text=True
37+
capture_output=True,
38+
text=True,
4039
)
4140
token = result.stdout.strip()
4241
if token:

skills/rhdh-test-plan-review/scripts/fetch_schedule.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ def get_gcloud_token():
6767

6868

6969
def get_sheets_service():
70-
from googleapiclient.discovery import build
7170
from google.oauth2.credentials import Credentials
71+
from googleapiclient.discovery import build
7272

7373
token = get_gcloud_token()
7474
if not token:

0 commit comments

Comments
 (0)