49
49
import pwd
50
50
import grp
51
51
import stat
52
- from typing import List
53
52
import re
54
53
import traceback
55
54
import pkg_resources
@@ -1543,14 +1542,14 @@ def set_slurm(self, args):
1543
1542
message = f'Select the Slurm partition for jobs that last up to { slurm_walltime_days } days and { slurm_walltime_hours } hours' ,
1544
1543
default = self .__get_configuration_entry (
1545
1544
'SLURM' , 'slurm_partition' ),
1546
- choices = List (parts .keys ()))
1545
+ choices = list (parts .keys ()))
1547
1546
1548
1547
# Ask the user to select the Slurm QOS
1549
1548
slurm_qos = inquirer .list_input (
1550
1549
message = f'Select the Slurm QOS for jobs that last up to { slurm_walltime_days } days and { slurm_walltime_hours } hours' ,
1551
1550
default = self .__get_configuration_entry (
1552
1551
'SLURM' , 'slurm_qos' ),
1553
- choices = List (parts [slurm_partition ]))
1552
+ choices = list (parts [slurm_partition ]))
1554
1553
1555
1554
# Set the Slurm configuration in the config file
1556
1555
self .__set_configuration_entry (
@@ -2895,7 +2894,7 @@ def send_email_ses(self, sender, to, subject, body):
2895
2894
log (f'Other Error: { e } ' )
2896
2895
2897
2896
checks = [sender , to ]
2898
- checks = List (set (checks )) # remove duplicates
2897
+ checks = list (set (checks )) # remove duplicates
2899
2898
email_list = []
2900
2899
2901
2900
try :
@@ -3656,7 +3655,7 @@ def _index_locally(self, folder):
3656
3655
writer .writerow ([col [0 ] for col in header ])
3657
3656
# 0:Usr,1:AccD,2:ModD,3:GiB,4:MiBAvg,5:Folder,6:Grp,7:TiB,8:FileCount,9:DirSize
3658
3657
for r in rows :
3659
- row = List (r )
3658
+ row = list (r )
3660
3659
if row [3 ] >= self .thresholdGB and row [4 ] >= self .thresholdMB :
3661
3660
atime = self ._get_newest_file_atime (row [5 ], row [1 ])
3662
3661
mtime = self ._get_newest_file_mtime (row [5 ], row [2 ])
@@ -5445,7 +5444,7 @@ def on_button_pressed(self, event: Button.Pressed) -> None:
5445
5444
self .dismiss (result = event .button .id )
5446
5445
5447
5446
5448
- class TableHotspots (App [List ]):
5447
+ class TableHotspots (App [list ]):
5449
5448
5450
5449
BINDINGS = [("q" , "request_quit" , "Quit" )]
5451
5450
@@ -5486,11 +5485,11 @@ def action_request_quit(self) -> None:
5486
5485
self .app .exit ()
5487
5486
5488
5487
5489
- class TextualStringListSelector (App [List ]):
5488
+ class TextualStringListSelector (App [list ]):
5490
5489
5491
5490
BINDINGS = [("q" , "request_quit" , "Quit" )]
5492
5491
5493
- def __init__ (self , title : str , items : List [str ]):
5492
+ def __init__ (self , title : str , items : list [str ]):
5494
5493
super ().__init__ ()
5495
5494
self .title = title
5496
5495
self .items = items
@@ -5517,11 +5516,11 @@ def action_request_quit(self) -> None:
5517
5516
self .app .exit ()
5518
5517
5519
5518
5520
- class TableArchive (App [List ]):
5519
+ class TableArchive (App [list ]):
5521
5520
5522
5521
BINDINGS = [("q" , "request_quit" , "Quit" )]
5523
5522
5524
- def __init__ (self , files : List [str ]):
5523
+ def __init__ (self , files : list [str ]):
5525
5524
super ().__init__ ()
5526
5525
self .files = files
5527
5526
@@ -5548,7 +5547,7 @@ def action_request_quit(self) -> None:
5548
5547
self .app .exit ()
5549
5548
5550
5549
5551
- class TableNIHGrants (App [List ]):
5550
+ class TableNIHGrants (App [list ]):
5552
5551
5553
5552
DEFAULT_CSS = """
5554
5553
Input.-valid {
@@ -5748,7 +5747,7 @@ def copy(self, src, dst, *args):
5748
5747
'''Copy files from source to destination using Rclone'''
5749
5748
try :
5750
5749
# Build the copy command
5751
- command = [self .rc , 'copy' ] + List (args )
5750
+ command = [self .rc , 'copy' ] + list (args )
5752
5751
command .append (src )
5753
5752
command .append (dst )
5754
5753
command .append ('-vvv' )
@@ -5762,7 +5761,7 @@ def copy(self, src, dst, *args):
5762
5761
def checksum (self , md5file , dst , * args ):
5763
5762
'''Check the checksum of a file using Rclone'''
5764
5763
try :
5765
- command = [self .rc , 'checksum' ] + List (args )
5764
+ command = [self .rc , 'checksum' ] + list (args )
5766
5765
command .append ('md5' )
5767
5766
command .append (md5file )
5768
5767
command .append (dst )
@@ -5783,7 +5782,7 @@ def mount(self, src, dst, *args):
5783
5782
5784
5783
try :
5785
5784
# Build the copy command
5786
- command = [self .rc , 'mount' ] + List (args )
5785
+ command = [self .rc , 'mount' ] + list (args )
5787
5786
command .append ('--allow-non-empty' )
5788
5787
command .append ('--default-permissions' )
5789
5788
command .append ('--read-only' )
@@ -6034,7 +6033,7 @@ def _reorder_sbatch_lines(self, script_buffer):
6034
6033
# we need to make sure that all #BATCH are at the top
6035
6034
script_buffer .seek (0 )
6036
6035
lines = script_buffer .readlines ()
6037
- # Remove the shebang line from the List of lines
6036
+ # Remove the shebang line from the list of lines
6038
6037
shebang_line = lines .pop (0 )
6039
6038
sbatch_lines = [
6040
6039
line for line in lines if line .startswith ("#SBATCH" )]
0 commit comments