Skip to content

Commit

Permalink
more long lines apparently
Browse files Browse the repository at this point in the history
  • Loading branch information
Comeani committed Nov 11, 2024
1 parent 3d842ab commit 91251e2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions apps/crc_sus.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,18 @@ def app_logic(self, args: Namespace) -> None:

Slurm.check_slurm_account_exists(account_name=args.account)
keystone_session = KeystoneClient(url=KEYSTONE_URL)
keystone_session.login(username=os.environ["USER"], password=getpass("Please enter your CRCD login password:\n"))
keystone_session.login(username=os.environ["USER"],
password=getpass("Please enter your CRCD login password:\n"))

group_id = get_team_id(keystone_session, args.account)
alloc_requests = get_active_requests(keystone_session, group_id)

if not alloc_requests:
print(f"\033[91m\033[1mNo active allocation information found in accounting system for '{args.account}'!\n")
print("Showing remaining service unit amounts for most recently expired Resource Allocation Request:\033[0m \n")
print(
"Showing remaining service unit amounts for most recently expired Resource Allocation Request:\033[0m \n")

Check notice on line 71 in apps/crc_sus.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

apps/crc_sus.py#L71

Line too long (122/120)
try:
alloc_requests = [get_most_recent_expired_request(keystone_session, group_id)]
alloc_requests = [get_most_recent_expired_request(keystone_session, group_id)]
except IndexError:
print("\033[91m\033[1mNo allocation information found. Either the group does not have any allocations, "
"or you do not have permissions to view them. If you believe this to be a mistake, please submit "
Expand Down
4 changes: 2 additions & 2 deletions apps/crc_usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

from prettytable import PrettyTable

from keystone_client import KeystoneClient
from .utils.cli import BaseParser
from .utils.keystone import *
from .utils.system_info import Slurm
Expand Down Expand Up @@ -98,7 +97,8 @@ def app_logic(self, args: Namespace) -> None:

Slurm.check_slurm_account_exists(account_name=args.account)
keystone_session = KeystoneClient(url=KEYSTONE_URL)
keystone_session.login(username=os.environ["USER"], password=getpass("Please enter your CRCD login password:\n"))
keystone_session.login(username=os.environ["USER"],
password=getpass("Please enter your CRCD login password:\n"))

# Gather AllocationRequests from Keystone
group_id = get_team_id(keystone_session, args.account)
Expand Down

0 comments on commit 91251e2

Please sign in to comment.