Skip to content

Python: Make unescaped single quote (' or ") strings non-multiline

Jan Paul Batrina requested to merge work/python-singleline-strings into master

In Python, the following lines are invalid:

a = "this is a
multiline string"

since the string should be ended on the same line, or continued with a \ escape at the end.

When such invalid strings are found, all succeeding lines will be marked as an error so that the unfinished/unescaped string is easier to spot.

The behavior of strings and the \ escape will now be mostly the same except for the error case

kate-python-unescaped-singlestring

Edited by Jan Paul Batrina

Merge request reports