Skip to content

Commit fd6ed57

Browse files
committed
Safe ruff fixes
1 parent 3acf0be commit fd6ed57

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+158
-109
lines changed

SECI_Config_Analyser/Directory_Operations.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
# 3. for each file, parse XML for required tag and add value to list
44
# 4. remove duplicates from list
55

6-
from os import listdir
7-
from fnmatch import fnmatch
86
import xml.etree.ElementTree as ET
7+
from fnmatch import fnmatch
8+
from os import listdir
99

1010

1111
class ReadConfigFiles:

SECI_Config_Analyser/SECI_Config_Analyser.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
Script to analyse SECI configurations and components and output results to file
33
"""
44

5-
from Directory_Operations import ReadConfigFiles
65
import argparse
76
from os import system
87

8+
from Directory_Operations import ReadConfigFiles
9+
910
if __name__ == '__main__':
1011

1112
parser = argparse.ArgumentParser(

build_tools/check_builds_are_recent.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
import json
12
import os
2-
from typing import Union
3-
from datetime import datetime
43
import sys
5-
import json
4+
from datetime import datetime
5+
from typing import Union
66

77
kits_root = r"\\isis\inst$\kits$\CompGroup\ICP"
88

@@ -64,7 +64,7 @@ def check_build_dirs(build_dirs):
6464
if __name__ == "__main__":
6565
builds_to_check = os.getenv("BUILDS_TO_CHECK")
6666
if builds_to_check is None:
67-
print (f"ERROR: BUILDS_TO_CHECK enviroment variable not set")
67+
print ("ERROR: BUILDS_TO_CHECK enviroment variable not set")
6868
sys.exit(1)
6969
try:
7070
builds_by_stale_times = json.loads(builds_to_check)

build_tools/purge_archive.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
import glob
12
import os
23
import shutil
34
import stat
4-
import glob
55
from datetime import datetime, timedelta
66

77
max_build_age_in_days = 30

data_gathering_scripts/data_sizes.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import getpass
88
import os
99
import subprocess
10+
1011
from six.moves import input
1112

1213
areas = {

data_gathering_scripts/nexus_file_sample_data_log.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,17 @@
55
"""
66

77
# std imports
8-
from argparse import ArgumentParser
9-
from collections import OrderedDict
10-
from datetime import datetime, timedelta
118
import logging
129
import os.path as osp
1310
import sys
14-
# third party imports
15-
from h5py import (File as HDF5File)
11+
from argparse import ArgumentParser
12+
from collections import OrderedDict
13+
from datetime import datetime, timedelta
14+
1615
import numpy as np
16+
17+
# third party imports
18+
from h5py import File as HDF5File
1719
from six import iteritems
1820

1921
# Logger for this module

data_gathering_scripts/nexus_files_with_changing_blocks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
Utility
33
"""
44

5+
import os
56
from datetime import datetime, timedelta
67

78
import h5py
8-
import os
99

1010
# List of machines to perform analysis for
1111
machines = ("NDXALF",

developer_support_script/build_dependencies.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"""
44

55
import argparse
6-
76
import os
87
import re
98

@@ -408,7 +407,7 @@ def get_entries(dependencies, macros):
408407
print("\n(Fix this by adding the dependency to the KNOWN_DEPENDENCIES dictionary in this script. ")
409408
print("A list of possible dependencies can be found in EPICS\\configure\\MASTER_RELEASE)")
410409
exit(1)
411-
sorted_lines = sorted([line for line in lines if line is not ""])
410+
sorted_lines = sorted([line for line in lines if line != ""])
412411
to_print = "\n".join(sorted_lines)
413412
print(" - Adding lines:\n {}".format(to_print.replace("\n", "\n ")))
414413
return sorted_lines

developer_support_script/check_build_stability.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
Checks for common failures as Jenkins only tracks continuous failures.
44
"""
55

6-
import requests
76
from collections import Counter, defaultdict
87
from typing import Any
98

9+
import requests
1010

1111
WARNING_THRESHOLD_PERCENTAGE = 10
1212
ERROR_THRESHOLD_PERCENTAGE = 50

developer_support_script/install_files.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import getpass
66
import os
77
import subprocess
8+
89
from six.moves import input
910

1011
areas = {

0 commit comments

Comments
 (0)