Skip to content

Commit

Permalink
Add some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell committed Aug 9, 2024
1 parent 3faacd1 commit 005dd3e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion k4FWCore/python/k4FWCore/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@ def check_wrong_imports(code: str) -> None:
code (str): The code to check for wrong imports.
Raises:
R
ImportError: If the code contains an import of IOSvc or ApplicationMgr from Configurables.
"""
# Check first that IOSvc is being used, in that case
# Importing either ApplicationMgr or IOSvc from Configurables is not allowed
iosvc_regex = re.compile(
r"^\s*from\s+(Configurables|k4FWCore)\s+import\s+\(?.*IOSvc.*\)?", re.MULTILINE
)
Expand Down
2 changes: 2 additions & 0 deletions python/k4FWCore/ApplicationMgr.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,13 @@ def __init__(self, **kwargs):
reader = alg
elif isinstance(alg, Writer):
writer = alg
# Remove "input" when the corresponding property is removed from IOSvc
if reader is None and (props["input"][0] or props["Input"][0]):
reader = Reader("k4FWCore__Reader")
add_reader = True
# It seems for a single string the default without a value is '<no value>'
# while for a list it's an empty list
# Remove "output" when the corresponding property is removed from IOSvc
if (
writer is None
and (props["output"][0] and props["output"][0] != "<no value>")
Expand Down

0 comments on commit 005dd3e

Please sign in to comment.