Closed hippocookie closed 2 weeks ago
I believe we fixed this recently, could you try with the latest release?
If not, could you isolate the failure to a single file you can attach here?
I bumped into this as well. Minimal repro is:
for i in _:
""" foo"""
But it's been fixed in 24.4.0
Describe the bug
Running UFMT lint on PyTorch main branch code, and has following error message.
$ lintrunner -a --take UFMT test/quantization/*/ Warning: Could not find a lintrunner config at: '.lintrunner.private.toml'. Continuing without using configuration file. WARNING: The init commands have changed since you last ran lintrunner. You may need to run
lintrunner init
.Advice (UFMT) command-failed Failed due to ASTSafetyError: INTERNAL ERROR: Black produced code that is not equivalent to the source. Please report a bug on https://github.com/psf/black/issues. This diff might be helpful: /tmp/blk_d666mo2u.log
/tmp/blk_d666mo2u.log
To Reproduce
Download source code from PyTorch github repo
Remove below escape config in file
.lintrunner.toml
, in exclude_patterns of ufmt linter config sectionRun lint command
Expected behavior
Environment
Get versions info from conda
Black's version: Name Version Build Channel black 23.12.1 pypi_0 pypi
OS and Python version: Name Version Build Channel python 3.12.2 hab00c5b_0_cpython conda-forge
Additional context