An Emacs mode for editing Python code

spuriously indents whole line while making some portion inline comment

Reported by Yaroslav Halchenko on 2012-11-20
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-mode.el
Medium
Andreas Roehler

Bug Description

originally it actually added indentation level in my case so code became

        @sweepargs(clf=[kNN(5)]) #clfswh['multiclass'])
    def test_auc(self, clf):

but on example to reproduce

class A(object):
    def prev():
        pass

    @decorator(1) lkajsd
    def buga():
        pass

attempt to insert # before lkajsd actually dedented it and made it

class A(object):
    def prev():
        pass

@decorator(1) #lkajsd
    def buga():
        pass

imho making inline comment should not alter whole line indentation

Changed in python-mode:
milestone: none → 6.1.0
assignee: nobody → Andreas Roehler (a-roehler)
importance: Undecided → Medium
status: New → In Progress
Andreas Roehler (a-roehler) wrote :

Points at a bug in py-compute-indentation. Setting py-electric-comment-p to nil should help for the moment. Thanks for the report.

Changed in python-mode:
status: In Progress → Fix Committed
Changed in python-mode:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers