Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions code_generation/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,18 @@
sample_parameters["is_{}".format(sampletype)] = True
else:
sample_parameters["is_{}".format(sampletype)] = False
if "data" in self.sample:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can save some lines of code by shortening the if-else statements to:

sample_parameters["is_data"] = "data" in self.sample

The same can be done for the "is_dyjets" and "is_wjets" flags.

sample_parameters["is_data"] = True
else:
sample_parameters["is_data"] = False
if "dyjets" in self.sample:
sample_parameters["is_dyjets"] = True
else:

Check notice on line 168 in code_generation/configuration.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

code_generation/configuration.py#L168

Trailing whitespace
sample_parameters["is_dyjets"] = False
if "wjets" in self.sample:
sample_parameters["is_wjets"] = True
else:
sample_parameters["is_wjets"] = False
for scope in self.scopes:
self.config_parameters[scope].update(sample_parameters)

Expand Down
2 changes: 1 addition & 1 deletion data/jsonpog-integration
Submodule jsonpog-integration updated from ea5e2a to 773fd6
Loading