Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
openEuler-Advisor
提交
24e7977e
O
openEuler-Advisor
项目概览
openeuler
/
openEuler-Advisor
通知
32
Star
4
Fork
4
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
openEuler-Advisor
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
24e7977e
编写于
7月 06, 2020
作者:
J
jiang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
The problem of modifying ASCI in Example
上级
42f0c6ba
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
18 addition
and
13 deletion
+18
-13
packageship/example/annotation_specifications.py
packageship/example/annotation_specifications.py
+18
-13
未找到文件。
packageship/example/annotation_specifications.py
浏览文件 @
24e7977e
...
...
@@ -2,15 +2,19 @@
description: Function and class annotation specifications in the project
functions: test
"""
# py文件中,如果全部为函数,顶部信息格式如上,description填写描述信息,functions填写函数名称
# In the PY file, if all are functions, the format of the top information is as above,
# the description information is filled in, and the function name is filled in functions
# Args:
# 列出每个参数的名字, 并在名字后使用一个冒号和一个空格,
# 分隔对该参数的描述.如果描述太长超过了单行80字符,使用2或者4个空格的悬挂缩进(与文件其他部分保持一致).
# 描述应该包括所需的类型和含义.
# List the name of each parameter with a colon and a space after the name,
# Separate the description of this parameter.
# If the description is too long than 80 characters in a single line,
# use a hanging indent of 2 or 4 spaces (consistent with the rest of the file)
# The description should include the type and meaning required
# Returns:
# 描述返回值的类型和语义. 如果函数返回None, 这一部分可以省略.
# Describes the type and semantics of the return value. If the function returns none,
# this part can be omitted
# Raises:
#
可能产生的异常
#
Possible anomalies
def
test
(
name
,
age
):
...
...
@@ -31,13 +35,14 @@ def test(name, age):
# description: Function and class annotation specifications in the project
# class: SampleClass
# py文件中,如果全部为类,顶部信息格式如上,description填写描述信息,class填写类名称,用 三引号,不用#
# 类应该在其定义下有一个用于描述该类的文档字符串.
# 如果你的类有公共属性(Attributes),
# 那么文档中应该有一个属性(Attributes)段.
# 并且应该遵守和函数参数相同的格式.
# In the PY file, if all are classes, the top information format is as above,
# description fills in the description information, class fills in the class name,
# uses three quotation marks, does not need#
# Class should have a document string under its definition that describes
# the class
# If your class has attributes,
# Then there should be an attribute section in the document
# And it should follow the same format as function parameters
class
SampleClass
():
"""
Summary of class here.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录