Skip to content

Fix pylint used-before-assignment errors - #2554

Merged
sawenzel merged 1 commit into
AliceO2Group:masterfrom
sawenzel:fix-pylint-used-before-assignment
Nov 18, 2026
Merged

sawenzel merged 1 commit into
AliceO2Group:masterfrom
sawenzel:fix-pylint-used-before-assignment

Conversation

@sawenzel

Copy link
Copy Markdown
Contributor

This PR fixes the ten errors that make the pylint check in CI fail.

  • mcprodinfo_harvester.py: Col, IntRate and OrbitsPerTF were unset when the workflow has no meta block; they now default to None.
  • makeStarlightConfig.py, makeUpcgenConfig.py: the beam Z and A come from a lookup table instead of a chain of ifs. The generated ini files are byte-identical for all collision systems.
  • o2dpg_sim_workflow.py: else instead of elif tf > 1 for the HepMC event skip; no change in behaviour.

This fixes the four files that fail the pylint check in CI.

- mcprodinfo_harvester.py used Col, IntRate and OrbitsPerTF unset when the workflow has no meta block; they now default to None.
- makeStarlightConfig.py and makeUpcgenConfig.py pick the beam Z and A from a lookup table instead of a chain of ifs.
- o2dpg_sim_workflow.py uses else instead of elif tf > 1 for the HepMC event skip.
@sawenzel
sawenzel requested review from a team and jackal1-66 as code owners November 18, 2026 08:23
@github-actions

Copy link
Copy Markdown

REQUEST FOR PRODUCTION RELEASES:
To request your PR to be included in production software, please add the corresponding labels called "async-" to your PR. Add the labels directly (if you have the permissions) or add a comment of the form (note that labels are separated by a ",")

+async-label <label1>, <label2>, !<label3> ...

This will add <label1> and <label2> and removes <label3>.

The following labels are available
async-2023-pbpb-apass4
async-2023-pp-apass4
async-2024-pp-apass1
async-2022-pp-apass7
async-2024-pp-cpass0
async-2024-PbPb-apass1
async-2024-ppRef-apass1
async-2024-PbPb-apass2
async-2023-PbPb-apass5

@sawenzel
sawenzel enabled auto-merge (rebase) November 18, 2026 09:10
@sawenzel
sawenzel disabled auto-merge November 18, 2026 09:10
@sawenzel
sawenzel merged commit 1370c5f into AliceO2Group:master Nov 18, 2026
11 checks passed
@sawenzel
sawenzel deleted the fix-pylint-used-before-assignment branch November 18, 2026 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant