indentation breaks for multiple statements separated by semicolons in class __init__ oneliner
tandav opened this issue · comments
Alexander Rodionov commented
Python Code
This is working python code:
class K:
def __init__(self, x, *args, **kwargs): self.x = x; self.args = args; self.kwargs = kwargs
after running autopep8 it becomes:
class K:
def __init__(self, x, *args, **
kwargs): self.x = x
self.args = args
self.kwargs = kwargs
Indentation is broken: "self" is not defined
, "args" is not defined
, "kwargs" is not defined
.
Expected output should be something like this:
class K:
def __init__(self, x, *args, **
kwargs):
self.x = x
self.args = args
self.kwargs = kwargs
Command Line and Configuration
Command Line
$ autopep8 --in-place main.py
Your Environment
- Python version: python3.11
- autopep8 version: 2.0.2
- Platform: linux