同步操作将从 openEuler/tp-libvirt 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
This doc summarize the most common review comments in tp-libvirt open source project.
For beginners or practice executor, it may provide some self-check before submitting to normal review in github.
More common issues during reviewing can be categorized as below.
- trailing whitespaces
- indent alignment
- variable reusable
- variable name (upper or lower case letter)
- module import order (better similar module stay together)
- spelling errors
- imported module one blank line
- missing doc comments
- doc comments need one empty line between comment and parameter
- doc comments start with #<space>'
- comments include multiple lines, need care ','
- indent issue
- trailing whitespace
- unused variable
- remove comment code (#...)
- comment upper and lower letter issues
- logging.debug("Find snapshots: %s", snap_names)
- spelling errors
- escape sequences, should prepend regex patterns with 'r'
- name should be meaningful
- should be defined on the very top (avoids local redefinition and undefined names during tear down in case of error)
- test.skip (remove raise)
- autotest.client import utils
- libvirt_vm.check_exit_status
- vm_connection_session close(exception gracefully close)
- vm_backup.sync() called before any change
- extreme situation: variable not definition such as conditional
- Use autoflake to remove unused parameters
- make sure that your list index
- when code was called twice, better package them into one method
- miss do assert in throwing exception
conjunction two folders:use os.path.join(xx,xx)
avoid too generic logging message
not recommended to use mutable default value as an argument see <https://docs.quantifiedcode.com/python-anti-patterns/correctness/mutable_default_value_as_argument.html>
without timeout value in infinite loop
use with
to open files
either use global constants for timeouts or test params
to set values for timeouts (e.g. wait_for_loging(..., timeout=LOGIN_TIMEOUT)
);
this way it is easier for others to tweak timeouts on slower systems
make sure this is run before sending patch:
inspekt checkall --disable-style E501,E265,W601,E402,E722,E741 --no-license-check <test-script-name>.py
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。