Skip to content

Formatter instability: Leading clause header comments with preceding function #7465

@MichaReiser

Description

@MichaReiser

Input

try:
    def test():
        pass
    #import chardet.constants
    #chardet.constants._debug = 1
except ImportError:
    pass

Format 1

try:

    def test():
        pass

    # import chardet.constants
    # chardet.constants._debug = 1
except ImportError:
    pass

Format 2

try:

    def test():
        pass

    # import chardet.constants
    # chardet.constants._debug = 1

except ImportError:
    pass

Sourced by #7455

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingformatterRelated to the formatter

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions