Skip to content

Black fails if types are strings #6

Closed
@samuelcolvin

Description

Describe the bug

Strings seem to have html escaped before being passed to black.

To Reproduce
Steps to reproduce the behavior:

Add some code like

https://github.com/samuelcolvin/dirty-equals/blob/c690abbb32e5893d3bb2634e1345ab30a2f46791/dirty_equals/_dict.py#L39-L45

Where the return type is a string.

On build you'll get an error like:

  File "/Users/samuel/code/dirty-equals/env/lib/python3.10/site-packages/black/parsing.py", line 132, in lib2to3_parse
    raise exc from None
black.parsing.InvalidInput: Cannot parse: 1:162: def settings(self, *, strict: Optional[bool] = None, partial: Optional[bool] = None, ignore_values: Union[None, Container[Any], Callable[[Any], bool]] = None) -> 'IsDict': pass

System (please complete the following information):

  • Python version: 3.10
  • OS: Linux/macos

docs requirements:

black==21.12b0
mkdocs==1.2.3
mkdocs-material==8.2.1
mkdocstrings[python]==0.18

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions