1. 定義不為空的列表時,如果使用append()會報警告
this list creation could be rewritten as a list literal
推薦定義時直接賦值
list1 = [1,2,3] # 這么用好
list1 = [1,2,3] # 這么用不好
list1.append(4)
2. 打開普通文件不要用b,直接w
TypeError: a bytes-like object is required, not 'str'
with open('aoao.cnf', 'wb') as cfg # 這么用不對
3. 函數參數報如下警告,請檢查文檔注釋參數名稱是否未定義或寫錯
This inspection detects mismatched parameters in a docstring.
Please note that it doesn’t warn you of missing parameters, if none of them is mentioned in a docstring
待更新..