Cannot make autopep8 and wemake-python-styleguide agree on formatting
See original GitHub issueWhat’s wrong
Files formatted via autopep8 trigger a violation to wemake-python-styleguide:
./tests/test_config_factory.py:7:38: WPS318 Found extra indentation ./tests/test_config_factory.py:7:61: WPS319 Found bracket in wrong position
def do_something(
table_1: pyspark.sql.DataFrame,
table_2: pyspark.sql.DataFrame,
config: Config):
The offending problem seems to be table_1 tabbing and the last bracket
How it should be
I should either be able to configure autopep8 to respect those issues, or to fix that automatically in some other way 😃
Flake8 version and plugins
{
"dependencies": [],
"platform": {
"python_implementation": "CPython",
"python_version": "3.9.7",
"system": "Darwin"
},
"plugins": [
{
"is_local": false,
"plugin": "flake8-bandit",
"version": "2.1.2"
},
{
"is_local": false,
"plugin": "flake8-broken-line",
"version": "0.4.0"
},
{
"is_local": false,
"plugin": "flake8-bugbear",
"version": "21.11.29"
},
{
"is_local": false,
"plugin": "flake8-comprehensions",
"version": "3.7.0"
},
{
"is_local": false,
"plugin": "flake8-darglint",
"version": "1.8.1"
},
{
"is_local": false,
"plugin": "flake8-debugger",
"version": "4.0.0"
},
{
"is_local": false,
"plugin": "flake8-docstrings",
"version": "1.6.0, pydocstyle: 6.1.1"
},
{
"is_local": false,
"plugin": "flake8-eradicate",
"version": "1.2.0"
},
{
"is_local": false,
"plugin": "flake8-string-format",
"version": "0.3.0"
},
{
"is_local": false,
"plugin": "flake8_commas",
"version": "2.1.0"
},
{
"is_local": false,
"plugin": "flake8_isort",
"version": "4.1.1"
},
{
"is_local": false,
"plugin": "flake8_quotes",
"version": "3.3.1"
},
{
"is_local": false,
"plugin": "mccabe",
"version": "0.6.1"
},
{
"is_local": false,
"plugin": "naming",
"version": "0.12.1"
},
{
"is_local": false,
"plugin": "pycodestyle",
"version": "2.8.0"
},
{
"is_local": false,
"plugin": "pyflakes",
"version": "2.4.0"
},
{
"is_local": false,
"plugin": "rst-docstrings",
"version": "0.2.5"
},
{
"is_local": false,
"plugin": "wemake_python_styleguide",
"version": "0.16.0"
}
],
"version": "4.0.1"
}
pip information
pip 21.2.4 via poetry
OS information
MacOs Big Sur 11.5.2 Chip Apple M1
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Tool to convert Python code to be PEP8 compliant
You can use autopep8! Whilst you make yourself a cup of coffee this tool happily removes all those pesky PEP8 violations which don't...
Read more >7 tips to make an effective Python Style Guide - luminousmen
The code review is one of the top and most complicated steps of the pyramid: you cannot automate the code review, and when...
Read more >Beginners Guide to Auto Formatting - DEV Community
Autopep8, Just like its name, it automatically formats Python code to conform to the PEP-8 style guide. A simple hands-on approach autopep8 ......
Read more >AutoPEP8 - Package Control
Sublime Auto PEP8 Formatting ... Note: project is no longer supported. About. Automatically formats Python code to conform to the PEP 8 style...
Read more >Starting New Python Project in VSCode | Yury Zhauniarovich
In the previous article, I have described how poetry can be used to configure Python workspace and to create a new Python package...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Let’s put it the other way: I don’t like any tools that change my code 🙂
Do you format the code manually?