black
The uncompromising Python code formatter (by psf)
autopep8
A tool that automatically formats Python code to conform to the PEP 8 style guide. (by hhatto)
Our great sponsors
black | autopep8 | |
---|---|---|
204 | 9 | |
27,262 | 4,062 | |
2.1% | - | |
9.5 | 6.5 | |
6 days ago | 26 days ago | |
Python | Python | |
MIT License | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
black
Posts with mentions or reviews of black.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-05-12.
-
Didn't get the job, code review please
Code linting/formatters + good practices: flake8, black , isort,... BONUS do this on pre-commit BONUS BONUS set black to run when you save a file 🤩
- 1000Words — easily share your data analysis, directly from Jupyter
- a web based youtube downloader I built
-
Can someone explain to me what's wrong with this code?
A good idea to have https://github.com/psf/black run on save =)
-
Prettier keeps breaking lines!!
Prettier doesn't support Python so you must be using something else. Maybe you are using black?
- Suomalaisia, yleishyödyllisiä avoimen lähdekoodin projekteja haussa
-
Black formatter - Ignore specific multi-line code
np.array( [ [1, 0, 0, 0], [0, -1, 0, 0], [0, 0, 1, 0], [0, 0, 0, -1], ])# Will be formatted tonp.array([[1, 0, 0, 0], [0, -1, 0, 0], [0, 0, 1, 0], [0, 0, 0, -1]]) I found this issue in black github, but that only works for inline command, which is not what I have here.
-
RegEx, Data Classes and Type Hints with Python: Learning from tweet text
I've found many bugs with the help of mypy since I started using it two years ago, so let's make our project a bit better. Let's apply black and isort also. Here's the script to evaluate our project:
-
Can this code be made faster, or is this a job for a super computer?
Is a much better name and clearly expresses intent. https://github.com/psf/black Is a linter we run over our code to make sure it is formatted correctly.
-
dethklok: The most uncompromising Python code formatter ever!
Looks like it hasn’t been touched in 2 years. Just use black.
autopep8
Posts with mentions or reviews of autopep8.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-05-01.
-
autopep8 or styler equivalent in Julia
Is there a tool that automatically styles Julia code according to some style guide similar to autopep8 in Python (https://pypi.org/project/autopep8/) or styler in R (https://www.tidyverse.org/blog/2017/12/styler-1.0.0/)?
-
PEP8 and long if and/or statements
I use autopep8 most of the time, but it does not even attempt to split these long conditionals. 😅
- J’ai créé un générateur de mdp pour ceux que ça intéresse !
-
Should I feel embarassed when I share my code with someone with better practise or my potential employer?
Format and lint code, try that tools or that. Or check your IDE extensions.
-
Am I crazy?
Python: autopep8 -JavaScript, TypeScript and a bunch of others: prettier
-
Code Quality Tools in Python
autopep8 is an unofficial, yet popular, tool that automatically formates Python code to conform to PEP 8. It uses pycodestyle, Python’s official PEP-8 violation checker tool, to determine what parts of the code need to be formatted.
-
Automate Clean Code and Linting in Python
autopep8 3.9k+ ⭐️
-
Coding beginner! First program! Password Generator
Linting and formatting have some overlap and formatting is another debated concept. I am personally a fan of Black, but there are others such as autopep8 which will attempt to make your code fit the style described in PEP8.
-
Any way to format code in Sublime text like on VS Code?
First of all, pick a formatter that you'd like to use. black has been very popular recently, but good old autopep8 works well too.
What are some alternatives?
When comparing black and autopep8 you can also consider the following projects:
yapf - A formatter for Python files
prettier - Prettier is an opinionated code formatter.
isort - A Python utility / library to sort imports.
Flake8 - flake8 is a python tool that glues together pycodestyle, pyflakes, mccabe, and third-party plugins to check the style and quality of some python code.
Pylint - It's not just a linter that annoys you!
black - The uncompromising Python code formatter [Moved to: https://github.com/psf/black]
pycodestyle - Simple Python style checker in one Python file
autoflake - Removes unused imports and unused variables as reported by pyflakes
mypy - Optional static typing for Python
awesome-python-typing - Collection of awesome Python types, stubs, plugins, and tools to work with them.