Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Black produced different code on the second pass of the formatter. #4384

Closed
peterdsharpe opened this issue Jun 18, 2024 · 2 comments
Closed
Labels
C: unstable formatting Formatting changed on the second pass T: bug Something isn't working

Comments

@peterdsharpe
Copy link

Describe the bug

Black reports an error upon formatting a file, and asks me to make a bug report.

To Reproduce

For example, take this entire file,

And run it with these arguments:

$ black field_lengths.py

The resulting error is:

AeroSandbox\aerosandbox\library\field_lengths.py: INTERNAL ERROR: Black produced different 
code on the second pass of the formatter.  Please report a bug on 
https://github.com/psf/black/issues.  This diff might be helpful: C:\Users\peter\AppData\Local\Temp\blk_2loifc8n.log

Environment

  • Black's version: 24.4.2
  • OS and Python version: Windows 11, Python 3.11.7

Additional context

The resulting log file (blk_2loifc8n.log) can be viewed here.

@peterdsharpe peterdsharpe added the T: bug Something isn't working label Jun 18, 2024
@JelleZijlstra JelleZijlstra added the C: unstable formatting Formatting changed on the second pass label Jun 18, 2024
@JelleZijlstra
Copy link
Collaborator

Thanks, reduced reproduction case:

if 1:
    takeoff_effective_friction_coefficient = (  # From Torenbeek, Eq. 5-76; an approximation
            friction_coefficient +
            0.72 * (CD_zero_lift / CL_max)
    )

@JelleZijlstra
Copy link
Collaborator

This looks basically the same as #3701.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: unstable formatting Formatting changed on the second pass T: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants