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
a3521701
Commit
a3521701
authored
Dec 19, 2023
by
BO ZHANG
🏀
Browse files
update CsstStatus example
parent
ceb12b0b
Pipeline
#2526
failed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
csst_common/status.py
View file @
a3521701
...
@@ -8,6 +8,7 @@ Modified-History:
...
@@ -8,6 +8,7 @@ Modified-History:
2022-10-04, Bo Zhang, created
2022-10-04, Bo Zhang, created
2022-10-04, Bo Zhang, added CsstStatus
2022-10-04, Bo Zhang, added CsstStatus
2022-10-07, Bo Zhang, added Numpydoc docstring
2022-10-07, Bo Zhang, added Numpydoc docstring
2023-12-19, Bo Zhang, updated example
"""
"""
from
enum
import
IntEnum
from
enum
import
IntEnum
from
typing
import
Optional
,
Any
from
typing
import
Optional
,
Any
...
@@ -22,16 +23,15 @@ class CsstStatus(IntEnum):
...
@@ -22,16 +23,15 @@ class CsstStatus(IntEnum):
Examples
Examples
--------
--------
>>> def f(num):
>>> CsstStatus(0) # SUCCESS
>>> if num > 0:
>>> CsstStatus(1) # WARNING
>>> return CsstStatus.PERFECT
>>> CsstStatus(2) # ERROR
>>> return CsstStatus.ERROR
"""
"""
# status list to be completed
PERFECT
=
0
PERFECT
=
0
WARNING
=
1
WARNING
=
1
ERROR
=
2
ERROR
=
2
# status list to be completed
class
CsstResult
:
class
CsstResult
:
...
...
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