INNER CODE UNIT · Python
_populate_channel_elements
nf-core/tools · nf_core/modules/lint/__init__.py:404
def _populate_channel_elements(io_type, correct_value, meta_value, mod_io_data, meta_yml_io, check_exists=True):
"""Populate input, output, or topic channel elements with metadata information.
Args:
io_type: "input", "output", or "topics" string for logging
correct_value: The correct value to compare against
meta_value: The current meta.yml value
mod_io_data: The module's input/output/topics data structure
meta_yml_io: The original meta.yml input/output/topics section
check_exists: If True, only process if io_type exists in meta_yml (for input/output).
If False, process if correct_value exists (for topics that can be added).
Returns:
Populated data structure or None if no changes needed
"""
# Check if we should process this section
if check_exists:
# For input/output: only process if already exists in meta.yml