Comments (4)
Hi, my friend, @peterkra25 , and I are two students from the University of Michigan enrolled in a software engineering class (EECS 481), and our final project is to contribute to an open-source Github project. We came across Black and saw this issue, and reached out to @JelleZijlstra regarding this. We're looking into this issue and will try to resolve it over the next few weeks.
from black.
One more thought: I haven't looked at the code, but I suspect the changes in #3796 are closely related to this bug, so looking at the code affected by that change will be a good way to start finding the location of the bug.
from black.
Confirmed:
% black -c '''class C:
def f(self):
...
'''
class C:
def f(self):
...
error: cannot format <string>: unindent does not match any outer indentation level (<tokenize>, line 5)
Black should instead format this as:
class C:
def f(self): ...
from black.
Thank you for resolving this issue!
from black.
Related Issues (20)
- black could more efficiently skip directories listed in .gitignore HOT 2
- Allow valid version specifier when specifying Black version in `pyproject.toml` HOT 2
- Black failed to reformat HOT 1
- Cannot parse nested f-strings if the same quote char is used inside and outside. HOT 2
- global config not possible if project contains a `pyproject.toml`
- Error in the setup docs for black. HOT 4
- INTERNAL ERROR: Black produced code that is not equivalent to the source HOT 6
- Make Readability your main focus. HOT 2
- Cannot parse multiline f-string starting with backslash `\` HOT 2
- Offer more architectures in GitHub releases
- black formatter not working when file contains several comments HOT 4
- Newlines between classes do not get added when the last method of one ends with ellipses
- Crash on f-string with `\{` HOT 8
- Black does not add trailing commas when using typed_params_trailing_comma HOT 1
- Add more documentation about preview style features
- `--line-ranges` formats lines outside of range HOT 3
- Black fails to format f strings in function kwargs with dictionaries HOT 1
- Improve vim plugin error message if vim is too old or python support is missing HOT 1
- Support Python 3.13 free-threaded build HOT 3
- Black won't format file as it produces invalid code 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.