-
Notifications
You must be signed in to change notification settings - Fork 5.8k
[CodeStyle] remove some yapf: disable
#46410
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
@@ -653,10 +652,19 @@ def to_safe_name(s): | |||
('test_2d_input2', rand_x(2, np.float64, shape=[8, 150]), 50, 15, -1), | |||
('test_3d_input1', rand_x(3, np.float64, shape=[150, 4, 2]), 50, 15, 0), | |||
('test_3d_input2', rand_x(3, np.float64, shape=[4, 2, 150]), 50, 15, -1), | |||
]) | |||
]) # yapf: disable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个文件使用第二种方式,仅在 test case 参数部分取消格式化,避免格式化后的参数看起来非常凌乱的问题
yapf: disable
yapf: disable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* remove `yapf: disable` from math.py * disable test case only * remove useless disable * remove useless disable * revert no_grad_set_white_list
PR types
Others
PR changes
Others
Describe
对错误的
yapf: disable
进行调整yapf 会停止单行
# yapf: disable
到单行# yapf: enable
之间的格式化,一些文件使用了这种方式但却没有重新 enable,因此很多没必要 disable 的都被 disable 了此外,yapf 支持行内使用
# yapf: disable
来禁用某一个字面量的格式化,可以通过这种方式避免大面积被 disable 掉参考:https://github.com/google/yapf#why-does-yapf-destroy-my-awesome-formatting