Skip to content

INTERNAL ERROR: Black produced code that is not equivalent to the source. #2467

@pipiche38

Description

@pipiche38

Describe the bug

I'm using black, version 20.8b1 and I have an error on a specifi file.

black -l 120 myfile.py

`--- src
+++ dst
@@ -9854,11 +9854,11 @@
value=
Constant(
kind=
None, # NoneType
value=

  •                '<address mode: uint8_t>\n<target short address: uint16_t>\n<source endpoint: uint8_t>\n<destination endpoint: uint8_t>\n<direction: uint8_t>\n<manufacturer specific: uint8_t>\n<manufacturer id: uint16_t>\n<SquawkModeStrobeAndLevel: uint8_t>\nBits \tDescription\n0-3 \tSquawk Mode - indicates the meaning of the required ‘squawk’:\n0 - System is armed\n1 - System is disarmed\nAll other values are reserved\n4 \tStrobe - indicates whether a visual strobe indication of the ‘squawk’ is required:\n0 - No strobe\n1 - Use strobe\n5 \tReserved\n6-7 \tSquawk Level - indicates the requested level of the audible squawk sound:\n0 - Low level\n1 - Medium level\n2 - High level\n3 - Very high level',  # str
    
  •                '<address mode: uint8_t>\n<target short address: uint16_t>\n<source endpoint: uint8_t>\n<destination endpoint: uint8_t>\n<direction: uint8_t>\n<manufacturer specific: uint8_t>\n<manufacturer id: uint16_t>\n<SquawkModeStrobeAndLevel: uint8_t>\nBits    Description\n0-3     Squawk Mode - indicates the meaning of the required ‘squawk’:\n0 - System is armed\n1 - System is disarmed\nAll other values are reserved\n4       Strobe - indicates whether a visual strobe indication of the ‘squawk’ is required:\n0 - No strobe\n1 - Use strobe\n5   Reserved\n6-7     Squawk Level - indicates the requested level of the audible squawk sound:\n0 - Low level\n1 - Medium level\n2 - High level\n3 - Very high level',  # str
               )  # /Constant
           )  # /Expr
           Assign(
             targets=
               Name(
    

@@ -10570,11 +10570,11 @@
value=
Constant(
kind=
None, # NoneType
value=

  •                'Zigate -> Obj\t0x0111 \tWrite Attribute request IAS_WD (from v3.1a)\n<address mode: uint8_t>\n<target short address: uint16_t>\n<source endpoint: uint8_t>\n<destination endpoint: uint8_t>\n<direction: uint8_t>\n<manufacturer specific: uint8_t>\n<manufacturer id: uint16_t>\n<Warning Mode: uint8_t>\n<Warning Duration: uint16_t>\n<Strobe duty cycle : uint8_t>\n<Strobe level : uint8_t>',  # str
    
  •                'Zigate -> Obj   0x0111  Write Attribute request IAS_WD (from v3.1a)\n<address mode: uint8_t>\n<target short address: uint16_t>\n<source endpoint: uint8_t>\n<destination endpoint: uint8_t>\n<direction: uint8_t>\n<manufacturer specific: uint8_t>\n<manufacturer id: uint16_t>\n<Warning Mode: uint8_t>\n<Warning Duration: uint16_t>\n<Strobe duty cycle : uint8_t>\n<Strobe level : uint8_t>',  # str
               )  # /Constant
           )  # /Expr
           Assign(
             targets=
               Name(`
    

Metadata

Metadata

Assignees

No one assigned

    Labels

    T: bugSomething isn't working
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions