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 fails if types are strings #6

Closed
samuelcolvin opened this issue Feb 23, 2022 · 1 comment
Closed

Black fails if types are strings #6

samuelcolvin opened this issue Feb 23, 2022 · 1 comment

Comments

@samuelcolvin
Copy link

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
pawamoy added a commit that referenced this issue Feb 24, 2022
@pawamoy
Copy link
Member

pawamoy commented Feb 24, 2022

Thanks for the report! Fixed in 0.6.5 🙂

@pawamoy pawamoy closed this as completed Feb 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants