-
ipython
Official repository for IPython itself. Other repos in the IPython organization contain things like the website, documentation builds, etc.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
pip-audit
Audits Python environments, requirements files and dependency trees for known security vulnerabilities, and can automatically fix them
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
“the next release will likely revert it”
— Carreau, https://github.com/ipython/ipython/issues/13463#issuecomment...
I'm a huge fan of black, and have been using it in most of my projects for a long time.
That being said, my biggest gripe with it is that it has at some point started reformatting docstrings [0] in addition to the code -- strictly following PEP 257 [1] -- without any way to disable that behaviour. While I understand the desire to standardise, docstrings are not executable code, and should be allowed more flexibility when it comes to formatting.
[0] https://github.com/psf/black/issues/1779
[1] https://www.python.org/dev/peps/pep-0257/
Hooray!
Loosely related - This is Python pip. Trail of Bits has a tool pip-audit that audits Python environments and dependency trees for known vulnerabilities.
https://github.com/trailofbits/pip-audit
Congratulations. I'm a Python developer of 17+ years and Black is truly a huge blessing in the Python ecosystem.
That said, I'm a little sad to see it's gone stable without adding support for tabs, which would be extremely simple to add at this point (cf. https://github.com/jleclanche/tan/commit/e23c038167528bdacdd...). I have a lot of people using this tab-capable fork, that I did not advertise anywhere.
Łukasz seems to have a personal grudge against tabs which may be why the issue for tab support was closed early on, but there's a plethora of good reasons to support it behind a flag. I don't want to rehash those arguments here on HN but you think you could re-think the approach a bit?
I'd be happy to do a PR if it's not getting rejected right away with "no discussion allowed" like the last one was (before Black was moved to PSF maintainership).
Although the constructs are nearly structurally identical, they can be formatted very differently, which sometimes hinders understanding them.
A different approach would be to instead normalize all words to a certain fixed width. So, "to_add" and "to_remove" would have the same virtual width.
A related issue is that leading indentation counts towards the width limit. This causes refactorings which simply move code around (changing its indentation level) to change the code's shape, even when the code hasn't otherwise changed. This is exacerbated by that one often needs to shape code in such a way that Black formats it in an agreeable way, but this is generally not done during refactorings, so the readability of the code suffers.
I had the opportunity to write a formatter (for SQL, also unconfigurable/opinionated); it seems to successfully avoid these problems: https://github.com/CyberShadow/squelch
Have been a long time user of yapf along with isort, yapf is way less opionated and its been good till now. https://github.com/google/yapf
Related posts
-
We should format code on demand
-
Write better Python - with some help!
-
Thanks to Pycharms pep8 hints I've been making my code proudly and beautifully pep8 for years. Started working at a company on a very big python project a month ago and I'm stunned by how other people code. Is it normal to work to Pep8?
-
Let's meet Black: Python Code Formatting
-
Auto-formater for Android (Kotlin)