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

cercis reports "Cannot parse:" on a file containing '''"test"''' #33

Open
cmaeder opened this issue Sep 4, 2023 · 1 comment
Open

Comments

@cmaeder
Copy link

cmaeder commented Sep 4, 2023

cercis replaces triple single quotes with triple double quotes (despite to use single quotes) and then complains about quadruple double quotes.

For example, take this code (a double quoted string within triple single quotes):

'''"test"'''

And run it with these arguments:

$ cercis test.py

The resulting error is (showing quadruple double quotes):

error: cannot format test.py: Cannot parse: 1:11: """"test""""

Expected behavior

no error, as with the option "single-quote = false"

Environment

  • Cercis's version: cercis, 0.2.1 (compiled: no)
  • OS and Python version: Linux, Python (CPython) 3.10.12
@jsh9
Copy link
Owner

jsh9 commented Sep 10, 2023

Hi @cmaeder , thanks for raising this issue.

This is indeed a bug of Cercis, but I haven't had time yet to further investigate how to solve it. I'll keep this in mind and maybe get back to it in a few weeks.

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