Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Staircase' formatting #751

Open
robertHowlett opened this issue Jun 5, 2024 · 0 comments
Open

'Staircase' formatting #751

robertHowlett opened this issue Jun 5, 2024 · 0 comments

Comments

@robertHowlett
Copy link

robertHowlett commented Jun 5, 2024


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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant