- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
Lab实验手册
实验手册 软件工程 实验手册 Lab2:代码评审与程序性能优化 实验要求 针对Lab1所完成的代码,进行代码评审(走查)和性能分析,从时间性能角度对代码进行优化; 练习代码评审的两个方面:静态分析、动态分析(profiling); 使用以下三个工具完成实验: Pylint PyChecker Profile 按Lab1的分组方式,两人一组,随机分配另一组的代码作为本组评审和分析的对象,实验期间不能与原作者进行沟通。 Pylint Pylint是一个Python代码检查工具,可以帮助程序员方便地检查程序代码的语法和风格/ Coding Standard checking line-codes length, checking if variable names are well-formed according to your coding standard checking if imported modules are used Error detection checking if declared interfaces are truly implemented checking if modules are imported Refactoring help Pylint detects duplicated code Fully customizable Modify your?pylint?to customize which errors or conventions are important to you. The big advantage with Pylint is that it is configurable, customizable, and you can easily write a small plugin to add a personal feature. IDE integration Install Pylint setuptools Download ez_install.py pip install pylint (windows) Pylint Results Pylint+Pydev Pylint+Pydev PyChecker PyChecker is a tool for finding bugs in?python?source code. It finds problems that are typically caught by a compiler for less dynamic languages, like C and C++. It is similar to lint. Because of the dynamic nature of python, some warnings may be incorrect; however, spurious warnings should be fairly infrequent. / Types of problems that can be found include: No global found (e.g., using a module without importing it) Passing the wrong number of parameters to functions/methods/constructors Passing the wrong number of parameters to builtin functions methods Using format strings that dont match arguments Using class methods and attributes that dont exist Changing signature when overriding a method Redefining a function/class/method in the same scope Using a variable before setting it self is not the first parameter defined for a method Unused globals and locals (module or variable) Unused function/method arguments (can ignore self) No doc strings in modules, classes, functions, and methods PyChecker 下载地址:/projects/pych
您可能关注的文档
最近下载
- Q/GDW 13239.1—2018 35kV电力电缆采购标准(第1部分:通用技术规范).pdf VIP
- 水电解质酸碱代谢失衡病人的护理失衡.ppt VIP
- Q∕GDW 13247.2-2018 35kV电力电缆附件采购标准 第二部分:专用技术规范(高清-可复制).pdf VIP
- 2024届高考英语一轮总复习选择性必修第二册Unit3FoodandCulture教师用书.doc VIP
- 医学检验生物安全培训课件.pptx VIP
- 高三化学教学反思15篇.pdf VIP
- 河南成人2024学位英语考试真题及答案.docx VIP
- 中药新药临床研究.pptx VIP
- 2024届高考英语一轮总复习选择性必修第二册Unit1ScienceandScientists教师用书.doc VIP
- 农田喷灌工程施工方案(3篇).docx VIP
文档评论(0)