python - pycharm 如何默认不换行
PHPz
PHPz 2017-04-18 10:09:04
0
1
813

merge 代码后,一行的代码会自动换行,folding什么的更改了也不行,有谁知道怎么设置吗

PHPz
PHPz

学习是最好的投资!

reply all(1)
PHPzhong

1. Your code is obviously not standardized. There is a dotted line at the end. You don’t break the line and continue writing. This is very unpythonic;

> 其他人看这样的代码,瞟一眼就不会想继续看的

2. I have used pycharm for so long, and I have never encountered it automatically wrapping lines unless it is automatically formatted;
3. Please be familiar with using Ctrl+Alt+F to format code;

Like the following line of code, if there is no line break, then when someone uses vim to read the code, they have to scroll a few screens to finish reading this line?

objects_data = Task \
            .objects.filter(state=0)\
                    .filter(asset__in=assets)\
                    .filter(Q(name__icontains=q) |
                            Q(user__username__icontains=q) |
                            Q(app_version__name__icontains=q) |
                            Q(asset__hostname__icontains=q)).all() \
            if q is not None else \
            Task.objects.filter(state=0).filter(asset__in=assets).all()
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!