PyCharm 1.5.4: Reformat Code: strange result

I tried "Reformat Code" and got some strange result. Should it be this way? Could i be missing something?

If the code below is not very readable, there a couple of screenshots attached.

BEFORE:

==============================================

urlpatterns = patterns('',

    (r'^$',
        ListView.as_view(
            queryset=Poll.objects.order_by('-pub_date')[:5],
            context_object_name='latest_poll_list',
            template_name='polls/index.html')),
    (r'^(?P<pk>\d+)/$',
        DetailView.as_view(
            model=Poll,
            template_name='polls/detail.html')),
    url(r'^(?P<pk>\d+)/results/$',
        DetailView.as_view(
            model=Poll,
            template_name='polls/results.html'),
        name='poll_results'),
    (r'^(?P<poll_id>\d+)/vote/$', 'polls.views.vote'),
)

==============================================

AFTER:

==============================================

urlpatterns = patterns('',
    (r'^$',
     ListView.as_view(
         queryset=Poll.objects.order_by('-pub_date')[:5],
         context_object_name='latest_poll_list',
         template_name='polls/index.html')),
    (r'^(?P<pk>\d+)/$',
     DetailView.as_view(
         model=Poll,
         template_name='polls/detail.html')),
                       url(r'^(?P<pk>\d+)/results/$',
                           DetailView.as_view(
                               model=Poll,
                               template_name='polls/results.html'),
                           name='poll_results'),
    (r'^(?P<poll_id>\d+)/vote/$', 'polls.views.vote'),
                       )

==============================================

Thank you,

-igor



Attachment(s):
p2.png
p1.png

Please sign in to leave a comment.