Comments (7)
The correct indentation (to distinguish the parameters from the function body), would be:
def long_function_name(
var_one, var_two, var_three,
var_four):
print(var_one)
The reason we end up with current output is due to pep8. It doesn't complain about the output you are getting.
from autopep8.
By the way, I added this to the pep8 issue list.
from autopep8.
Thank you for looking into this.
from autopep8.
See the issue on pep8's issue list.
from autopep8.
Is this only indenting the 2nd continued line for the same reason?
$ pep8 --version
1.3.3
$ ../autopep8/autopep8.py --version
autopep8: 0.8.1
$ ../autopep8/autopep8.py -r --select=E122 --diff sympy/solvers/ode.py
--- original/sympy/solvers/ode.py
+++ fixed/sympy/solvers/ode.py
@@ -1533,7 +1533,7 @@
for o in other:
b, e = o.as_base_exp()
if b.is_Add and \
- all(a.args_cnc(cset=True, warn=False)[0] & \
+ all(a.args_cnc(cset=True, warn=False)[0] & \
con_set for a in b.args):
expr = sign(Mul(*num))*Mul._from_args(other)
break
from autopep8.
No, I think the culprit is --select=E122
. If you want to only fix alignment issues, try --select=E12
.
from autopep8.
I'm going to close this since we are doing to correct thing given pep8
's output. If pep8
eventually changes to mark this case as incorrect, then autopep8
will automatically fix it.
from autopep8.
Related Issues (20)
- Argument parser errors are printed without a trailing newline HOT 2
- Should be able to run autopep8 independently of global pycodestyle config
- Some messages written to stdout instead of stderr HOT 1
- --max-line-length not working.
- ModuleNotFoundError: No module named 'lib2to3' (python3.12) HOT 2
- How to ignore the two-spaces-before-comment rule ? HOT 1
- Dismatch between autopep8 and pep8? HOT 1
- Comments are always formatted at 80 characters maximum
- autopep8 line length not working with async def function
- Questions about Copilot + Open Source Software Hierarchy HOT 1
- Please delete this useless lib
- Inserting newlines into triple-quoted f-strings on Python 3.12 HOT 1
- --experimental --max-line-length does not work on Python 3.12 with f-strings inside of a dict HOT 1
- How to stop <- from becomming < - HOT 6
- 'Staircase' formatting
- Splitting long f strings containing hash sign (#) into multiple lines breaks code syntax HOT 1
- IndexError: string index out of range HOT 2
- --experimental adds spaces inside an f-string, which exceeds the max length
- Visual indent changed for certain continued strings
- misformatted `type` keyword
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from autopep8.