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_proto
Commits
ceee76c5
Commit
ceee76c5
authored
Oct 05, 2022
by
BO ZHANG
🏀
Browse files
added a demo class
parent
25f65192
Pipeline
#176
passed with stages
in 13 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
csst_proto/some_other_modules.py
View file @
ceee76c5
...
...
@@ -14,3 +14,42 @@ def a_demo_function(*args):
>>> a_demo_function(None)
"""
return
None
class
ADemoClass
:
"""
A demo class.
This class is a demo.
This is a second-line comment for extended summary.
Parameters
----------
first_name : str
The first name.
last_name : str
The last name.
Attributes
----------
first_name : str
The first name.
last_name : str
The last name.
Methods
-------
say_hello()
Print hello message.
Examples
--------
>>> a = ADemoClass("Jane", "Doe")
>>> a.say_hello()
"""
def
__init__
(
self
,
first_name
,
last_name
):
self
.
first_name
=
first_name
self
.
last_name
=
last_name
def
say_hello
(
self
):
print
(
"Hello, {} {}!"
.
format
(
self
.
first_name
,
self
.
last_name
))
csst_proto/top_level_interface.py
View file @
ceee76c5
from
.flip_image
import
flip_image
,
read_test_image
from
.some_other_modules
import
a_demo_function
from
.some_other_modules
import
a_demo_function
,
ADemoClass
__all__
=
[
"flip_image"
,
"read_test_image"
,
"a_demo_function"
]
__all__
=
[
"flip_image"
,
"read_test_image"
,
"a_demo_function"
,
"ADemoClass"
]
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