Skip to content

'Staircase' formatting #751

Open
Open
@robertHowlett

Description

@robertHowlett

Python Code

def some_func():
    foo = (
        [
            [
                1, 2, 3], [
                1, 2, 3], [
                    1, 2, 3], [
                        1, 2, 3], [
                            1, 2, 3], [
                                1, 2, 3], [
                                    1, 2, 3], [
                                        1, 2, 3], [
                                            1, 2, 3], [
                                                1, 2, 3], [
                                                    1, 2, 3], [
                                                        1, 2, 3], [
                                                            1, 2, 3], [
                                                                1, 2, 3], [
                                                                    1, 2, 3], [
                                                                        1, 2, 3], [
                                                                            1, 2, 3], [
                                                                                1, 2, 3], [
                                                                                    1, 2, 3], [
                                                                                        1, 2, 3], [
                                                                                            1, 2, 3], [
                                                                                                1, 2, 3], [
                                                                                                    1, 2, 3], [
                                                                                                        1, 2, 3], [
                                                                                                            1, 2, 3], [
                                                                                                                1, 2, 3], [
                                                                                                                    1, 2, 3], [
                                                                                                                        1, 2, 3], [
                                                                                                                            1, 2, 3], [
                                                                                                                                1, 2, 3], [
                                                                                                                                    1, 2, 3], [
                                                                                                                                        1, 2, 3], [
                                                                                                                                            1, 2, 3], [
                                                                                                                                                1, 2, 3], [
                                                                                                                                                    1, 2, 3], [
                                                                                                                                                        1, 2, 3], [
                                                                                                                                                            1, 2, 3], [
                                                                                                                                                                1, 2, 3], [
                                                                                                                                                                    1, 2, 3], [
                                                                                                                                                                        1, 2, 3], [
                                                                                                                                                                            1, 2, 3], [
                                                                                                                                                                                1, 2, 3], [
                                                                                                                                                                                    1, 2, 3], [
                                                                                                                                                                                        1, 2, 3], [
                                                                                                                                                                                            1, 2, 3], [
                                                                                                                                                                                                1, 2, 3], [
                                                                                                                                                                                                    1, 2, 3], [
                                                                                                                                                                                                        1, 2, 3]])

When I run autopep8, it seems to think that this is correct formatting. I expect the indent of every row to be the same, and for each row of the data to begin with an open square bracket.

Command Line and Configuration

No file configuration

Command Line

$ autopep8 --diff --max-line-length=120 path/to/file.py

Your Environment

  • Python version: 3.12.3
  • autopep8 version: autopep8 2.1.1 (pycodestyle: 2.11.1)
  • Platform: windows 11

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions