Comments (2)
Similar to #3889, which was fixed in preview mode. However, this issue is not fixed even in the preview mode. I thought we might mess up some length calculation due to the Greek letters, but that's not the case as it also reproduces with Latin letters:
% black -c '''m2 = None if not isinstance(dist, Normal) else m**2 + s**2
m2 = None if ... else m**2 + s**2
''' --preview
m2 = None if not isinstance(dist, Normal) else m ** 2 + s**2
m2 = None if ... else m**2 + s**2
from black.
Hi @JelleZijlstra! Please review #4154, it is my proposed to fix the bug.
from black.
Related Issues (20)
- Preview style feedback: Parenthesizing long dict, conditional, and type annotations HOT 6
- Black fails to format complicated f-string HOT 2
- What can I / should I expect when working with huge files (100 MB+)? HOT 1
- `wrap_long_dict_value_in_parens` can introduce unnecessary nesting for dicts in dicts
- Installation and update of black over a docker container HOT 1
- f-string with internal same-quote expression HOT 1
- Error on invalid configuration HOT 6
- Method argument values as multi-line strings and continuation visual indents HOT 1
- Whitespace before `fmt: skip` comment is normalised HOT 8
- Add option for single quoted strings as default HOT 2
- Possible to format a Python code contained in a string variable? HOT 1
- Formatting of long lines only work when line-length is specified HOT 2
- Can not format `method` code when method str parameter length default value too long HOT 5
- INTERNAL ERROR: Black produced invalid code: f-string: expecting '}' HOT 7
- [ISSUE] Github Action Black failing after successful reformatting. HOT 1
- wrap_long_dict_values_in_parens can remove parentheses HOT 1
- `multiline_string_handling` sometimes leads to worse formatting HOT 6
- Can we add a json schema to complete pyproject.toml's `[tool.black]`? HOT 9
- Latest docker images fail with an ImportError HOT 3
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 black.