首页 | 编程语言 | 网站建设 | 游戏天堂 | 冲浪宝典 | 网络安全 | 操作系统 | 软件时空 | 硬件指南 | 病毒相关 | IT 认证
软讯网络 > 编程语言 > 其他编程语言 > My .pylintrc
【标  题】:My .pylintrc
【关键字】:My,.pylintrc
【来  源】:http://www.cublog.cn/u/23408/showart.php?id=250826

My .pylintrc

My .pylintrc

Created: Fang lungang 02-27-2007 Modified: Fang lungang 02-27-2007 22:16>

首先,用命令行选项 "—generate-rcfile" 产生一个 .pylintrc 模板。

$ pylint --generate-rcfile > default-pylintrc

$ cp default-pylintrc .pylintrc

然后根据自己偏好、习惯修改这个模板。我最大部分修改都和命名规则有关。默认 的命名规则和我现在用差别太大了,汗。幸好我对正则表达式还算熟悉,哈哈。

下面是 diff -c3 的输出。如果你的命名习惯和我的一样,你可以用 patch 命令 把它打到你的 .pylintrc 上。

*** default-pylintrc	Tue Feb 27 20:11:34 2007
--- .pylintrc Tue Feb 27 21:10:09 2007
***************
*** 19,25 ****
ignore=CVS

# Pickle collected data for later comparisons.
! persistent=yes

# Set the cache size for astng objects.
cache-size=500
--- 19,25 ----
ignore=CVS

# Pickle collected data for later comparisons.
! persistent=no

# Set the cache size for astng objects.
cache-size=500
***************
*** 49,55 ****
#enable-msg=

# Disable the message(s) with the given id(s).
! #disable-msg=


[REPORTS]
--- 49,55 ----
#enable-msg=

# Disable the message(s) with the given id(s).
! disable-msg=W0603


[REPORTS]
***************
*** 59,65 ****
output-format=text

# Include message's id in output
! include-ids=no

# Put messages in a separate file for each module / package specified on the
# command line instead of printing them on stdout. Reports (if any) will be
--- 59,65 ----
output-format=text

# Include message's id in output
! include-ids=yes

# Put messages in a separate file for each module / package specified on the
# command line instead of printing them on stdout. Reports (if any) will be
***************
*** 67,73 ****
files-output=no

# Tells wether to display a full report or only the messages
! reports=yes

# Python expression which should return a note less than 10 (10 is the highest
# note).You have access to the variables errors warning, statement which
--- 67,73 ----
files-output=no

# Tells wether to display a full report or only the messages
! reports=no

# Python expression which should return a note less than 10 (10 is the highest
# note).You have access to the variables errors warning, statement which
***************
*** 110,122 ****
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$

# Regular expression which should only match correct module level names
! const-rgx=(([A-Z_][A-Z1-9_]*)|(__.*__))$

# Regular expression which should only match correct class names
class-rgx=[A-Z_][a-zA-Z0-9]+$

# Regular expression which should only match correct function names
! function-rgx=[a-z_][a-z0-9_]{2,30}$

# Regular expression which should only match correct method names
method-rgx=[a-z_][a-z0-9_]{2,30}$
--- 110,122 ----
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$

# Regular expression which should only match correct module level names
! const-rgx=(([A-Z][A-Z0-9_]*)|(g_[a-z][A-Za-z0-9_]*)|(__.*__))$

# Regular expression which should only match correct class names
class-rgx=[A-Z_][a-zA-Z0-9]+$

# Regular expression which should only match correct function names
! function-rgx=[a-z][A-Za-z0-9]{2,30}$

# Regular expression which should only match correct method names
method-rgx=[a-z_][a-z0-9_]{2,30}$
***************
*** 125,134 ****
attr-rgx=[a-z_][a-z0-9_]{2,30}$

# Regular expression which should only match correct argument names
! argument-rgx=[a-z_][a-z0-9_]{2,30}$

# Regular expression which should only match correct variable names
! variable-rgx=[a-z_][a-z0-9_]{2,30}$

# Regular expression which should only match correct list comprehension /
# generator expression variable names
--- 125,134 ----
attr-rgx=[a-z_][a-z0-9_]{2,30}$

# Regular expression which should only match correct argument names
! argument-rgx=[a-z][A-Za-z0-9]{2,30}$

# Regular expression which should only match correct variable names
! variable-rgx=[a-z][A-Za-z0-9]{2,30}$

# Regular expression which should only match correct list comprehension /
# generator expression variable names
Python应用:邪恶力量S01E09字幕时间调整:【上一篇】
Best practices for using composite baselines in UC:【下一篇】
【相关文章】
  • Ubuntu - Edgy Eft 下安装配置Java开发环境(JDK 6 + Eclipse WTP + Tomcat + MySQL)
  • PHP5.2+APACHE2.2+mysql4.1.21+BugFree1.0的安装
  • My SpamAssassin MySQL How-To
  • as4+postfix+cyrus-sasl+mysql+postfixadmin+courier-
  • mysql clustering (Mysql 集群) 2-1 管理节点的配置
  • mysql clustering (Mysql 集群) 2-3 SQL节点的配置和多管理节点配置
  • .Net+MySQL组合开发(三) 乱码篇
  • mysql clustering (Mysql 集群) 5-1 性能之 概述 基准 索引
  • linux下 can't connet mysql database问题
  • 菜鸟JSP数据库学习笔记之一:Tomcat配置JDBC连接MySQL
  • 【随机文章】
  • Linux命令Man解释:man.conf:man的配置文件
  • [截图]关于结构体的数据对齐(Structure Alignment Examples )
  • 牛人强贴
  • J2EE配置傻瓜篇(一):配置J2SE
  • [转帖]中海油员工:让我告诉你一个真实的东海石油
  • 关于javascript的资料
  • 用resetlogs点之前的备份恢复数据库
  • Gama的Effective C++ 学习笔记 -- E04
  • 小叮当也战江湖—VB实例七日谈(三)
  • OpenBSD―另类安装法
  • 【相关评论】
    没有相关评论
    【发表评论】
    姓名:
    邮件:
    随机码*
    评论*
          
    |  首 页  |  版权声明  |  联系我们   |  网站地图  |
    CopyRight © 2004-2007 软讯网络 All Rigths Reserved.