Skip to content

Commit 4136797

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 7b8f40f commit 4136797

File tree

9 files changed

+8
-18
lines changed

9 files changed

+8
-18
lines changed

.github/workflows/codeql.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ name: "CodeQL"
55

66
on:
77
push:
8-
branches: [ "master", "1.0", "1.1", "1.2", "1.3", "1.4", "1.5", "1.6", "1.7" ]
8+
branches: ["master", "1.0", "1.1", "1.2", "1.3", "1.4", "1.5", "1.6", "1.7"]
99
pull_request:
10-
branches: [ "master" ]
10+
branches: ["master"]
1111
schedule:
1212
- cron: "59 17 * * 6"
1313

@@ -23,7 +23,7 @@ jobs:
2323
strategy:
2424
fail-fast: false
2525
matrix:
26-
language: [ python ]
26+
language: [python]
2727

2828
steps:
2929
- name: Checkout

src/decisionengine_modules/AWS/transforms/AwsBurnRate.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ def __init__(self, config):
1717
super().__init__(config)
1818

1919
def transform(self, data_block):
20-
2120
spot_prices = self.provisioner_resource_spot_prices(data_block).fillna(0)
2221
occupancy = self.AWS_Occupancy(data_block).fillna(0)
2322

src/decisionengine_modules/GCE/transforms/GceFigureOfMerit.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ def __init__(self, config):
2222
super().__init__(config)
2323

2424
def transform(self, data_block):
25-
2625
self.logger.debug("in GceFigureOfMerit transform")
2726
performance = self.GCE_Instance_Performance(data_block)
2827
performance["PricePerformance"] = np.where(

src/decisionengine_modules/glideinwms/classads.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66

77
class GlideClientClassad(classadSupport.Classad):
8-
98
# Class variable: Counter for classad counter.
109
# key = (name)
1110
classad_counter = {}

src/decisionengine_modules/glideinwms/configure_gwms_frontend.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ def get_arg_parser():
8484
############################################################
8585

8686
if __name__ == "__main__":
87-
8887
noroot_msg = "NOTE: Executing this command as user root is not allowed. Use the decisionengine user instead."
8988

9089
if os.geteuid() == 0:

src/decisionengine_modules/glideinwms/glide_frontend_element.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,6 @@ def create_glideclient_classads(
436436
entry_name="condor",
437437
glidein_site="Unknown",
438438
):
439-
440439
if glidein_params is None:
441440
glidein_params = {}
442441
if glidein_monitors is None:
@@ -664,7 +663,7 @@ def create_glideclientglobal_classads(self, glidefactory_classad, key_builder):
664663
}
665664
for cred in credentials:
666665
if cred.advertize:
667-
for (fname, data) in cred.loaded_data:
666+
for fname, data in cred.loaded_data:
668667
classad_attrs_to_encrypt[cred.file_id(fname)] = data
669668
if hasattr(cred, "security_class"):
670669
# Convert security_class to string for factory
@@ -935,7 +934,7 @@ def count_match(self, job_types, job_type, entries):
935934
# Get group of jobs based on request cpus
936935
job_groups = jobs.groupby("RequestCpus")
937936

938-
for (req_cpus, group) in job_groups:
937+
for req_cpus, group in job_groups:
939938
# Group jobs by matching criteria: RequestCpus for now
940939
# We care about job counts for each group
941940
job_count = len(group)
@@ -1059,7 +1058,6 @@ def identify_limits_triggered(
10591058
global_total_idle_glideins,
10601059
limits_triggered,
10611060
):
1062-
10631061
# Identify the limits triggered for advertising in glideresource
10641062
if count_status["Total"] >= self.entry_max_glideins: # max_running
10651063
limits_triggered[
@@ -1117,7 +1115,6 @@ def compute_glidein_min_idle(
11171115
or (global_total_glideins >= self.global_total_max_slots)
11181116
or (global_total_idle_glideins >= self.global_total_max_slots_idle)
11191117
):
1120-
11211118
# Do not request more glideins under following conditions:
11221119
# 1. Have all the running jobs I wanted
11231120
# 2. Have enough idle vms/slots
@@ -1793,7 +1790,7 @@ def count_match_fom_bff(self, job_types, job_type, entries):
17931790

17941791
dbg_info.append(f"{len(job_groups)} job groups")
17951792

1796-
for (req_cpus, job_group) in job_groups:
1793+
for req_cpus, job_group in job_groups:
17971794
# Group jobs by matching criteria: RequestCpus for now
17981795
# We only care about job counts for each group
17991796
job_count = len(job_group)
@@ -1897,7 +1894,7 @@ def count_match_fom_dff(self, job_types, job_type, entries):
18971894
# Get group of jobs based on request cpus
18981895
job_groups = jobs.groupby("RequestCpus")
18991896

1900-
for (req_cpus, job_group) in job_groups:
1897+
for req_cpus, job_group in job_groups:
19011898
# Group jobs by matching criteria: RequestCpus for now
19021899
# We care about job counts for each group
19031900
job_count = len(job_group)
@@ -1934,7 +1931,7 @@ def count_match_fom_dff(self, job_types, job_type, entries):
19341931
# Start with entries with lowest FOM and fill them first
19351932
job_count_matched = 0
19361933

1937-
for (_fom, fom_group_entries) in fom_matches:
1934+
for _fom, fom_group_entries in fom_matches:
19381935
job_count_unmatched = job_count - job_count_matched
19391936
if job_count_unmatched > 0:
19401937
# Distribute the jobs equally among this entry group

src/decisionengine_modules/glideinwms/security.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,6 @@ def __str__(self):
227227

228228

229229
class CredentialCache:
230-
231230
# Cache the credential ids so we do not create again unless required
232231
# Specially expensive to create id for proxy which uses DN in hash
233232
def __init__(self):

src/decisionengine_modules/glideinwms/transforms/gwms_to_aws_data.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ def __init__(self, config):
2020
super().__init__(config)
2121

2222
def transform(self, datablock):
23-
2423
# Get the dataframe containing AWS entries
2524
self.logger.debug("in AWSFactoryEntryData transform")
2625
aws_entries = self.Factory_Entries(datablock).xs("AWS")

src/decisionengine_modules/glideinwms/transforms/job_clustering.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ def __init__(self, config):
4949
)
5050

5151
def transform(self, datablock):
52-
5352
self.logger.info("*** Starting job clustering ***")
5453
# TODO not sure if metadata is propagated or if this is the right attrs to id a datablock
5554

0 commit comments

Comments
 (0)