eli02 commited on
Commit
1d4e0ad
·
1 Parent(s): e0a23e1

update: Reform.

Browse files
Files changed (1) hide show
  1. utility.py +6 -6
utility.py CHANGED
@@ -3,9 +3,9 @@ import os
3
  import argparse
4
 
5
  def retrieve_secrets(
6
- file_path: str | os.PathLike = "~/.ssh/lab_access.txt",
7
- secret_from: str = "Hugging Face Authentication",
8
- access_type: str = "default"
9
  ) -> str:
10
  with open(file_path, 'r') as file:
11
  lines = file.read().split('\n\n')
@@ -26,9 +26,9 @@ def retrieve_secrets(
26
 
27
  def main():
28
  parser = argparse.ArgumentParser(description='Retrieve secrets from a file.')
29
- parser.add_argument('--file-path', type=str, help='Path to the secrets file')
30
- parser.add_argument('--secret-from', type=str, help='Source of the secret')
31
- parser.add_argument('--access-type', type=str, default='default', help='Type of access')
32
 
33
  args = parser.parse_args()
34
  secret = retrieve_secrets(args.file_path, args.secret_from, args.access_type)
 
3
  import argparse
4
 
5
  def retrieve_secrets(
6
+ file_path: str | os.PathLike,
7
+ secret_from: str,
8
+ access_type: str
9
  ) -> str:
10
  with open(file_path, 'r') as file:
11
  lines = file.read().split('\n\n')
 
26
 
27
  def main():
28
  parser = argparse.ArgumentParser(description='Retrieve secrets from a file.')
29
+ parser.add_argument('--file-path', type=str, default="../.ssh/lab_access.txt", help='Path to the secrets file')
30
+ parser.add_argument('--secret-from', type=str, default="Hugging Face Authentication", help='Source of the secret')
31
+ parser.add_argument('--access-type', type=str, default="write", help='Type of access')
32
 
33
  args = parser.parse_args()
34
  secret = retrieve_secrets(args.file_path, args.secret_from, args.access_type)