Skip to content

Commit f3dbcc5

Browse files
author
Victor Machado
committed
Revert "Make froster compatible with python3.8"
This reverts commit a64975a.
1 parent 1461915 commit f3dbcc5

File tree

1 file changed

+14
-15
lines changed

1 file changed

+14
-15
lines changed

Diff for: froster/froster.py

+14-15
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
import pwd
5050
import grp
5151
import stat
52-
from typing import List
5352
import re
5453
import traceback
5554
import pkg_resources
@@ -1543,14 +1542,14 @@ def set_slurm(self, args):
15431542
message=f'Select the Slurm partition for jobs that last up to {slurm_walltime_days} days and {slurm_walltime_hours} hours',
15441543
default=self.__get_configuration_entry(
15451544
'SLURM', 'slurm_partition'),
1546-
choices=List(parts.keys()))
1545+
choices=list(parts.keys()))
15471546

15481547
# Ask the user to select the Slurm QOS
15491548
slurm_qos = inquirer.list_input(
15501549
message=f'Select the Slurm QOS for jobs that last up to {slurm_walltime_days} days and {slurm_walltime_hours} hours',
15511550
default=self.__get_configuration_entry(
15521551
'SLURM', 'slurm_qos'),
1553-
choices=List(parts[slurm_partition]))
1552+
choices=list(parts[slurm_partition]))
15541553

15551554
# Set the Slurm configuration in the config file
15561555
self.__set_configuration_entry(
@@ -2895,7 +2894,7 @@ def send_email_ses(self, sender, to, subject, body):
28952894
log(f'Other Error: {e}')
28962895

28972896
checks = [sender, to]
2898-
checks = List(set(checks)) # remove duplicates
2897+
checks = list(set(checks)) # remove duplicates
28992898
email_list = []
29002899

29012900
try:
@@ -3656,7 +3655,7 @@ def _index_locally(self, folder):
36563655
writer.writerow([col[0] for col in header])
36573656
# 0:Usr,1:AccD,2:ModD,3:GiB,4:MiBAvg,5:Folder,6:Grp,7:TiB,8:FileCount,9:DirSize
36583657
for r in rows:
3659-
row = List(r)
3658+
row = list(r)
36603659
if row[3] >= self.thresholdGB and row[4] >= self.thresholdMB:
36613660
atime = self._get_newest_file_atime(row[5], row[1])
36623661
mtime = self._get_newest_file_mtime(row[5], row[2])
@@ -5445,7 +5444,7 @@ def on_button_pressed(self, event: Button.Pressed) -> None:
54455444
self.dismiss(result=event.button.id)
54465445

54475446

5448-
class TableHotspots(App[List]):
5447+
class TableHotspots(App[list]):
54495448

54505449
BINDINGS = [("q", "request_quit", "Quit")]
54515450

@@ -5486,11 +5485,11 @@ def action_request_quit(self) -> None:
54865485
self.app.exit()
54875486

54885487

5489-
class TextualStringListSelector(App[List]):
5488+
class TextualStringListSelector(App[list]):
54905489

54915490
BINDINGS = [("q", "request_quit", "Quit")]
54925491

5493-
def __init__(self, title: str, items: List[str]):
5492+
def __init__(self, title: str, items: list[str]):
54945493
super().__init__()
54955494
self.title = title
54965495
self.items = items
@@ -5517,11 +5516,11 @@ def action_request_quit(self) -> None:
55175516
self.app.exit()
55185517

55195518

5520-
class TableArchive(App[List]):
5519+
class TableArchive(App[list]):
55215520

55225521
BINDINGS = [("q", "request_quit", "Quit")]
55235522

5524-
def __init__(self, files: List[str]):
5523+
def __init__(self, files: list[str]):
55255524
super().__init__()
55265525
self.files = files
55275526

@@ -5548,7 +5547,7 @@ def action_request_quit(self) -> None:
55485547
self.app.exit()
55495548

55505549

5551-
class TableNIHGrants(App[List]):
5550+
class TableNIHGrants(App[list]):
55525551

55535552
DEFAULT_CSS = """
55545553
Input.-valid {
@@ -5748,7 +5747,7 @@ def copy(self, src, dst, *args):
57485747
'''Copy files from source to destination using Rclone'''
57495748
try:
57505749
# Build the copy command
5751-
command = [self.rc, 'copy'] + List(args)
5750+
command = [self.rc, 'copy'] + list(args)
57525751
command.append(src)
57535752
command.append(dst)
57545753
command.append('-vvv')
@@ -5762,7 +5761,7 @@ def copy(self, src, dst, *args):
57625761
def checksum(self, md5file, dst, *args):
57635762
'''Check the checksum of a file using Rclone'''
57645763
try:
5765-
command = [self.rc, 'checksum'] + List(args)
5764+
command = [self.rc, 'checksum'] + list(args)
57665765
command.append('md5')
57675766
command.append(md5file)
57685767
command.append(dst)
@@ -5783,7 +5782,7 @@ def mount(self, src, dst, *args):
57835782

57845783
try:
57855784
# Build the copy command
5786-
command = [self.rc, 'mount'] + List(args)
5785+
command = [self.rc, 'mount'] + list(args)
57875786
command.append('--allow-non-empty')
57885787
command.append('--default-permissions')
57895788
command.append('--read-only')
@@ -6034,7 +6033,7 @@ def _reorder_sbatch_lines(self, script_buffer):
60346033
# we need to make sure that all #BATCH are at the top
60356034
script_buffer.seek(0)
60366035
lines = script_buffer.readlines()
6037-
# Remove the shebang line from the List of lines
6036+
# Remove the shebang line from the list of lines
60386037
shebang_line = lines.pop(0)
60396038
sbatch_lines = [
60406039
line for line in lines if line.startswith("#SBATCH")]

0 commit comments

Comments
 (0)