Short code generates INTERNAL ERROR on second pass #2102
Labels
C: unstable formatting
Formatting changed on the second pass
R: duplicate
This issue or pull request already exists
T: bug
Something isn't working
Describe the bug code generates INTERNAL ERROR: Black produced different code on the second pass of the formatter.
To Reproduce Steps to reproduce the behavior:
Enter this code:
class SciSigFig:
def dump(self):
numstr = str(self)
return ' xxxnumber:%s\n str(number):%s\n sfcode:%s\n sfid:%s\n sfcount:%s\n uexp:%s\n notation:%s' %
(self.number,numstr, self.sfcode,self.sfid,self.sfcount,self.uexp,self.notation)
into Black playground https://black.vercel.app/ (accessed 11:40 EDT 04-12-2021)
** Error message:**
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: /tmp/blk_6fjvz6ci.log
Mode(target_versions=set(), line_length=88, string_normalization=True, experimental_string_processing=False, is_pyi=False)
--- source
+++ first pass
@@ -1,6 +1,15 @@
class SciSigFig:
def dump(self):
numstr = str(self)
--- first pass
+++ second pass
@@ -1,15 +1,12 @@
class SciSigFig:
def dump(self):
numstr = str(self)
Expected behavior A clear and concise description of what you expected to happen.
Expected reformatted code
Environment (please complete the following information):
Does this bug also happen on master? To answer this, you have two options:
latest master branch.
Yes, it occurs on the master
The text was updated successfully, but these errors were encountered: