Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Aug 1, 2023
1 parent 33be0bd commit 8ea23c6
Show file tree
Hide file tree
Showing 60 changed files with 283 additions and 303 deletions.
3 changes: 1 addition & 2 deletions build/ReleaseManager/ReleaseManagerLib.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def __init__(self, rel, python_version, use_mock=True):
"_binary_filedigest_algorithm": "md5",
#'global __python': '%%{__python2}',
#'py_byte_compile': '',
#%py_byte_compile %{__python2} %{buildroot}%{_datadir}/mypackage/foo
# %py_byte_compile %{__python2} %{buildroot}%{_datadir}/mypackage/foo
}

# __init__
Expand Down Expand Up @@ -394,7 +394,6 @@ def execute(self):

class PackageExcludes:
def __init__(self):

self.commonPattern = [
"CVS",
".DS_Store",
Expand Down
2 changes: 1 addition & 1 deletion creation/lib/cWDictFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -1769,6 +1769,7 @@ def __init__(self, monitor_dir, work_dir, work_subdir="monitor", monitordir_name
#
################################################


# helper class, used below
class fileCommonDicts:
def __init__(self):
Expand Down Expand Up @@ -2235,7 +2236,6 @@ def erase(self, destroy_old_subs=True): # if false, the sub names will be prese
return

def load(self, destroy_old_subs=True): # if false, overwrite the subs you load, but leave the others as they are

self.main_dicts.load()
if destroy_old_subs:
self.sub_list = []
Expand Down
2 changes: 2 additions & 0 deletions creation/lib/cgWDictFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ def is_equal(
#
################################################


# internal, do not use from outside the module
def get_common_dicts(submit_dir, stage_dir):
common_dicts = {
Expand Down Expand Up @@ -266,6 +267,7 @@ def get_entry_dicts(entry_submit_dir, entry_stage_dir, entry_name):
#
################################################


# internal, do not use from outside the module
def load_common_dicts(dicts, description_el): # update in place
# first submit dir ones (mutable)
Expand Down
4 changes: 2 additions & 2 deletions creation/lib/cgWParamDict.py
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,7 @@ def sortit(self, unsorted_dict):
i = i + 1
temp_list = sorted((x[1][1], x[0]) for x in list(d.items()))
sortedList = []
for (tmp, key) in temp_list:
for tmp, key in temp_list:
sortedList.append(d[key][0])
return sortedList

Expand All @@ -927,6 +927,7 @@ def new_SubDicts(self, sub_name):
#
############################################################


#############################################
# Add a user file residing in the stage area
# file as described by Params.file_defaults
Expand Down Expand Up @@ -1099,7 +1100,6 @@ def iter_to_dict(dictObject):
def populate_factory_descript(
work_dir, glidein_dict, active_sub_list, disabled_sub_list, conf # will be modified # will be modified
):

down_fname = os.path.join(work_dir, "glideinWMS.downtimes")

sec_el = conf.get_child("security")
Expand Down
1 change: 1 addition & 0 deletions creation/lib/cgWParams.py
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,7 @@ def get_xml_format(self):
#
############################################################


#####################################
# try to find out the base condor dir
def find_condor_base_dir():
Expand Down
2 changes: 1 addition & 1 deletion creation/lib/cvWCreate.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def create_client_mapfile(mapfile_fname, my_DN, factory_DNs, schedd_DNs, collect
with open(mapfile_fname, "w") as fd:
if my_DN:
fd.write('GSI "^{}$" {}\n'.format(re.escape(my_DN), "me"))
for (uid, dns) in (
for uid, dns in (
("factory", factory_DNs),
("schedd", schedd_DNs),
("collector", collector_DNs),
Expand Down
2 changes: 2 additions & 0 deletions creation/lib/cvWDictFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ def parse_val(self, line):
#
################################################


# internal, do not use from outside the module
def get_common_dicts(work_dir, stage_dir, simple_work_dir): # if True, do not create params
common_dicts = {
Expand Down Expand Up @@ -148,6 +149,7 @@ def get_group_dicts(group_work_dir, group_stage_dir, group_name, simple_work_dir
#
################################################


# internal, do not use from outside the module
def load_common_dicts(dicts, description_el): # update in place
# first work dir ones (mutable)
Expand Down
4 changes: 1 addition & 3 deletions creation/lib/cvWParamDict.py
Original file line number Diff line number Diff line change
Expand Up @@ -763,6 +763,7 @@ def new_SubDicts(self, sub_name):
#
############################################################


#######################
# Register an attribute
# attr_obj as described by Params.attr_defaults
Expand Down Expand Up @@ -833,7 +834,6 @@ def add_attr_unparsed_real(attr_name, params, dicts):
###################################
# Create the frontend descript file
def populate_frontend_descript(work_dir, frontend_dict, active_sub_list, params): # will be modified

frontend_dict.add("DowntimesFile", params.downtimes_file)
frontend_dict.add("FrontendName", params.frontend_name)
frontend_dict.add("WebURL", params.web_url)
Expand Down Expand Up @@ -891,7 +891,6 @@ def populate_frontend_descript(work_dir, frontend_dict, active_sub_list, params)
#######################
# Populate group descript
def populate_group_descript(work_dir, group_descript_dict, sub_name, sub_params): # will be modified

group_descript_dict.add("GroupName", sub_name)

group_descript_dict.add("MapFile", os.path.join(work_dir, cvWConsts.GROUP_MAP_FILE))
Expand Down Expand Up @@ -923,7 +922,6 @@ def populate_group_descript(work_dir, group_descript_dict, sub_name, sub_params)


def apply_group_singularity_policy(descript_dict, sub_params, params):

glidein_singularity_use = None
query_expr = descript_dict["FactoryQueryExpr"]
match_expr = descript_dict["MatchExpr"]
Expand Down
1 change: 1 addition & 0 deletions creation/lib/cvWParams.py
Original file line number Diff line number Diff line change
Expand Up @@ -796,6 +796,7 @@ def update_match_attrs(self):
# Use the class method instead
####################################################################


# return attribute value in the proper python format
def extract_attr_val(attr_obj):
if not attr_obj.type in ("string", "int", "expr"):
Expand Down
22 changes: 11 additions & 11 deletions creation/web_base/factoryCompletedStats.html
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
"aggwsum",
"aggavgf",
"affwsumf",
"fail"
"fail",
);
var ENTRY;

Expand Down Expand Up @@ -224,7 +224,7 @@
for (var entry in entries) {
if (ec_added < groups_starting_idx) {
entries_select.appendChild(
new Option(entries[entry], entries[entry])
new Option(entries[entry], entries[entry]),
);
ec_added++;
} else {
Expand Down Expand Up @@ -254,7 +254,7 @@
fes.appendChild(new Option("total", "total"));
for (var frontend in frontend_list[entry]) {
frontends_select.appendChild(
new Option(frontend_list[entry][frontend])
new Option(frontend_list[entry][frontend]),
);
}
}
Expand Down Expand Up @@ -831,7 +831,7 @@
for (var i = 0; i < gtype_filtered_list.length; i++) {
rrd_filtered_data = new RRDFilterDS(
rrd_data1,
gtype_DSs[gtype_filtered_list[i]]
gtype_DSs[gtype_filtered_list[i]],
);
var DS_list = [];
for (var j = 0; j < rrd_filtered_data.getNrDSs(); j++) {
Expand All @@ -849,7 +849,7 @@
rrd_data1,
null,
gtype_formats[gtype_id],
null
null,
);
} else if (gtype_id == "fail") {
var DS_list = [];
Expand All @@ -872,16 +872,16 @@
op_list.push(
new FractionDS(
rrd_data1.getDS(failed_idx).getName(),
rrd_data1.getDS(glidein_idx).getName()
)
rrd_data1.getDS(glidein_idx).getName(),
),
);
rrd_data1 = new RRDFilterOp(rrd_data1, op_list);
var f = new rrdFlot(
"mygraph",
rrd_data1,
null,
gtype_formats[gtype_id],
null
null,
);
}
//Non-Aggregated InfoGroups
Expand All @@ -903,12 +903,12 @@
continue;
}
op_list.push(
new RelativeDS(DS_list, rrd_data1.getDS(i).getName(), i)
new RelativeDS(DS_list, rrd_data1.getDS(i).getName(), i),
);
}
if (flag == 1) {
op_list.push(
new RelativeDS(DS_list, rrd_data1.getDS(0).getName(), 0)
new RelativeDS(DS_list, rrd_data1.getDS(0).getName(), 0),
);
}

Expand Down Expand Up @@ -950,7 +950,7 @@
rrd_data1,
null,
gtype_formats[gtype_id],
{ num_cb_rows: x }
{ num_cb_rows: x },
);
}

Expand Down
Loading

0 comments on commit 8ea23c6

Please sign in to comment.