Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
csst-pipeline
csst_common
Commits
40fab6cc
Commit
40fab6cc
authored
Dec 15, 2023
by
BO ZHANG
🏀
Browse files
add decorator to __all__
parent
6b8d9e80
Pipeline
#2429
running with stage
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
csst_common/__init__.py
View file @
40fab6cc
...
...
@@ -17,4 +17,9 @@ from .status import CsstResult, CsstStatus
__version__
=
"0.0.2"
__all__
=
[
"Pipeline"
,
"File"
,
"CsstResult"
]
__all__
=
[
"Pipeline"
,
"File"
,
"CsstResult"
,
"parameterized_module_decorator"
,
]
csst_common/decorator.py
View file @
40fab6cc
...
...
@@ -32,6 +32,22 @@ class ModuleResult(NamedTuple):
def
parameterized_module_decorator
(
logger
:
Optional
[
logging
.
Logger
]
=
None
,
)
->
Callable
:
"""
Parameterized module decorator.
This is designed for wrapping modules.
Parameters
----------
logger : Optional[logging.Logger]
The logger.
Returns
-------
Callable
A wrapped module.
"""
# use default logger
if
logger
is
None
:
logger
=
get_logger
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment