Pycharm自动生成文件头部注释和函数注释

 

文件头部注释

#!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
@Project :JDCouponOffice 
@File :test.py
@Author :panda
@Date :2021/3/26 10:56 
"""

 

 

 函数自动注释

定义函数/方法后,输入三引号, 按回车, 自动填充参数的注释及返回值

def test(a,b,c):
    """
    :param a:
    :param b:
    :param c:
    :return:
    """

直接回车无效的,设置如下: File|Settings| Tools | Python Integrated Tools 

 

posted @ 2021-03-26 11:10  pandaly  阅读(996)  评论(0编辑  收藏  举报